Skip to content

Latest commit

 

History

History
42 lines (35 loc) · 850 Bytes

README.md

File metadata and controls

42 lines (35 loc) · 850 Bytes

shcompcomp

Generate command completion scripts using simple configs

supported shells

  • bash

Examples

List of options

shcomp2 - > ~/.bash_completion.d/examplecli.bash <<EOF
cfg cli_name=examplecli
opt --help
opt -h
EOF

# behavior
--help -h
$ examplecli [TAB]
-h
$ examplecli --help [TAB]

Positional with choices

shcomp2 - > ~/.bash_completion.d/examplecli.bash <<EOF
cfg cli_name=examplecli
pos --choices="do_thing do_other nothing"
EOF

# behavior
do_thing do_other nothing
$ examplecli [TAB]
do_thing do_other
$ examplecli do_ [TAB]