Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions completions/sub.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ _sub() {
if [ "$COMP_CWORD" -eq 1 ]; then
COMPREPLY=( $(compgen -W "$(sub commands)" -- "$word") )
else
local command="${COMP_WORDS[1]}"
local completions="$(sub completions "$command")"
local command="${COMP_WORDS[@]:1:${#COMP_WORDS[@]}-2}"
local completions="$(sub completions $command)"
COMPREPLY=( $(compgen -W "$completions" -- "$word") )
fi
}
Expand Down