Let completion functions set the match_required state.
Currently the match_required state is set at the beginning when input
is being read. This commit allows completers to change that state
during the input. In particular, this can be used to allow a webjump
with a limited set of valid inputs to prevent invalid inputs from
being accepted.
For example, the following webjump can now be defined and will only
allow valid bookmarks to be chosen. Without $match_required, the webjump
will try to visit any arbitrary input, which is confusing and not useful.
/* Access bookmarks via completion from a webjump. */
define_webjump("bookmark",
function(term) {return term;},
$completer = history_completer($use_history = false,
$use_bookmarks = true,
$match_required = true));
Another example is in the upcoming index webjump feature.