mirror of
https://github.com/aquatix/dotfiles.git
synced 2025-12-06 20:35:11 +01:00
Updated tmuxinator bash completion with latest from Git
This commit is contained in:
@@ -2,18 +2,21 @@
|
||||
|
||||
_tmuxinator() {
|
||||
COMPREPLY=()
|
||||
local word="${COMP_WORDS[COMP_CWORD]}"
|
||||
local word
|
||||
word="${COMP_WORDS[COMP_CWORD]}"
|
||||
|
||||
if [ "$COMP_CWORD" -eq 1 ]; then
|
||||
local commands="$(compgen -W "$(tmuxinator commands)" -- "$word")"
|
||||
local projects="$(compgen -W "$(tmuxinator completions start)" -- "$word")"
|
||||
|
||||
COMPREPLY=( $commands $projects )
|
||||
else
|
||||
local words=("${COMP_WORDS[@]}")
|
||||
elif [ "$COMP_CWORD" -eq 2 ]; then
|
||||
local words
|
||||
words=("${COMP_WORDS[@]}")
|
||||
unset words[0]
|
||||
unset words[$COMP_CWORD]
|
||||
local completions=$(tmuxinator completions "${words[@]}")
|
||||
local completions
|
||||
completions=$(tmuxinator completions "${words[@]}")
|
||||
COMPREPLY=( $(compgen -W "$completions" -- "$word") )
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user