-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(_comp_compgen): support
-i cmd
and -x cmd
- Loading branch information
1 parent
d678b9f
commit 39cc200
Showing
4 changed files
with
82 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters