From a78596c42d43a01de85c7ada95d15b165743f6ff Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Sun, 2 Oct 2016 04:47:31 +0000 Subject: lib: explicitly support the case of empty input for completions When the user tab- or ?-completes when the character prior to the position of the cursor is a space, completion logic is passed null. Explicitly handle this case instead of using partly_match, which has special logic associated with it to allow abbreviating certain tokens. Signed-off-by: Quentin Young --- lib/command_match.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/command_match.h') diff --git a/lib/command_match.h b/lib/command_match.h index 728d9c1d95..ac4e70c316 100644 --- a/lib/command_match.h +++ b/lib/command_match.h @@ -50,9 +50,10 @@ enum matcher_rv /* completion match types */ enum match_type { - no_match, - partly_match, - exact_match + trivial_match, // the input is null + no_match, // the input does not match + partly_match, // the input matches but is incomplete + exact_match // the input matches and is complete }; /* Defines which matcher_rv values constitute an error. Should be used with -- cgit v1.2.3