We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1e44266 + 0703fa9 commit 86d8407Copy full SHA for 86d8407
autocomplete/zsh_autocomplete
@@ -3,9 +3,19 @@
3
_cli_zsh_autocomplete() {
4
5
local -a opts
6
- opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} --generate-bash-completion)}")
+ local cur
7
+ cur=${words[-1]}
8
+ if [[ "$cur" == "-"* ]]; then
9
+ opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} ${cur} --generate-bash-completion)}")
10
+ else
11
+ opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} --generate-bash-completion)}")
12
+ fi
13
- _describe 'values' opts
14
+ if [[ "${opts[1]}" != "" ]]; then
15
+ _describe 'values' opts
16
17
+ _files
18
19
20
return
21
}
0 commit comments