diff options
Diffstat (limited to 'test/fixtures/_comp_compgen/completions/compgen-cmd1')
-rw-r--r-- | test/fixtures/_comp_compgen/completions/compgen-cmd1 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/fixtures/_comp_compgen/completions/compgen-cmd1 b/test/fixtures/_comp_compgen/completions/compgen-cmd1 new file mode 100644 index 0000000..70199ba --- /dev/null +++ b/test/fixtures/_comp_compgen/completions/compgen-cmd1 @@ -0,0 +1,19 @@ +# Dummy completion file for _comp_compgen tests -*- shell-script -*- + +_comp_xfunc_compgen_cmd1_compgen_generator1() { + _comp_compgen -- -W '5foo 6bar 7baz' +} + +_comp_cmd_compgen_cmd1__compgen_generator2() { + _comp_compgen -- -W '5abc 6def 7ghi' +} + +_comp_cmd_compgen_cmd1() { + local cur prev words cword comp_args + _comp_initialize -- "$@" || return + _comp_compgen -- -W '012 123 234' + _comp_compgen -ai compgen-cmd1 generator2 +} && + complete -F _comp_cmd_compgen_cmd1 compgen-cmd1 + +# ex: filetype=sh |