diff options
Diffstat (limited to 'test/fixtures/_comp_compgen/completions')
-rw-r--r-- | test/fixtures/_comp_compgen/completions/compgen-cmd1 | 19 | ||||
-rw-r--r-- | test/fixtures/_comp_compgen/completions/compgen-cmd2 | 11 |
2 files changed, 30 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 diff --git a/test/fixtures/_comp_compgen/completions/compgen-cmd2 b/test/fixtures/_comp_compgen/completions/compgen-cmd2 new file mode 100644 index 0000000..6b6255f --- /dev/null +++ b/test/fixtures/_comp_compgen/completions/compgen-cmd2 @@ -0,0 +1,11 @@ +# Dummy completion file for _comp_compgen tests -*- shell-script -*- + +_comp_cmd_compgen_cmd2() { + local cur prev words cword comp_args + _comp_initialize -- "$@" || return + _comp_compgen -- -W '012 123 234' + _comp_compgen -ax compgen-cmd1 generator1 +} && + complete -F _comp_cmd_compgen_cmd2 compgen-cmd2 + +# ex: filetype=sh |