-
-
Notifications
You must be signed in to change notification settings - Fork 171
Implementations of Shell Autocompletion
andychu edited this page Nov 22, 2019
·
6 revisions
Back to Shell Autocompletion
- GNU readline does ad hoc tokenization of the shell command. Does not use its parser.
- builtins:
complete,compopt,compgen - global variables:
COMP_WORDS,COMPREPLY(out)
- completions maintained out of tree in
bash-completion
-
lineedit/compparse.{c,h}(~1300 lines) is a "simple parser for command line completion" that duplicates knowledge of the shell language. It doesn't use its own parser much, if at all. -
help completeshows help for the extensive completion builtin. Doesn't seem to understand the flags of its own builtins.
- completions maintained in-tree in
share/completion
TODO
- completions maintained in-tree
- has a
completebuiltin - completions maintained in-tree