Autocompletion
Opened this issue · 0 comments
felixSchl commented
It should be fairly doable to match the current input and then upon success (or failure) use the longest match to offer choices to complete the next thing.
Problems:
-
Deal with user typing in string. Or do we have to? In bash, typing
"--
is the same as typing--
. -
There may be more than one branch that qualifies. Show all relevant options.
-
Need to provide hooks, so users can bring their own completion function for option arguments and arguments.
-
We need to know "where" we are in a branch after completion stops:
foo --bar QUX --foo --moo $ # -> [--bar] $ --bar # -> [] $ --bar "qux" --foo # -> [--moo] $ --bar "qux" --foo --moo # -> []