mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 01:46:40 +00:00
15 lines
377 B
Bash
15 lines
377 B
Bash
_tmuxifier() {
|
|
COMPREPLY=()
|
|
local word="${COMP_WORDS[COMP_CWORD]}"
|
|
|
|
if [ "$COMP_CWORD" -eq 1 ]; then
|
|
COMPREPLY=( $(compgen -W "$(tmuxifier commands)" -- "$word") )
|
|
else
|
|
local command="${COMP_WORDS[1]}"
|
|
local completions="$(tmuxifier completions "$command")"
|
|
COMPREPLY=( $(compgen -W "$completions" -- "$word") )
|
|
fi
|
|
}
|
|
|
|
complete -F _tmuxifier tmuxifier
|