Skip to content

Commit 6535f47

Browse files
giotherobotrandaz81
authored andcommitted
Fix bash completions to be used also in zsh
1 parent 3b509af commit 6535f47

File tree

1 file changed

+3
-1
lines changed
  • data/bash-completion

1 file changed

+3
-1
lines changed

data/bash-completion/yarp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ _yarp()
4242
COMP_WORDS=$words
4343
COMP_CWORD=$cword ;
4444
else
45-
local cur=$(_get_cword) ;
45+
# Fallback for older bash-completion or zsh
46+
local cur="${COMP_WORDS[COMP_CWORD]}"
47+
local prev="${COMP_WORDS[COMP_CWORD-1]}"
4648
fi;
4749
local command="${COMP_WORDS[1]}"
4850
local cmds=$(_get_yarp_help)

0 commit comments

Comments
 (0)