Files
tmuxifier/completion/tmuxifier.zsh
2012-04-22 11:28:38 +01:00

20 lines
341 B
Bash

if [[ ! -o interactive ]]; then
return
fi
compctl -K _tmuxifier tmuxifier
_tmuxifier() {
local word words completions
read -cA words
word="${words[2]}"
if [ "${#words}" -eq 2 ]; then
completions="$(tmuxifier commands)"
else
completions="$(tmuxifier completions "${word}")"
fi
reply=("${(ps:\n:)completions}")
}