Initial commit

This commit is contained in:
2012-04-22 11:28:38 +01:00
commit ed8743facb
14 changed files with 348 additions and 0 deletions

14
completion/tmuxifier.bash Normal file
View File

@@ -0,0 +1,14 @@
_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

19
completion/tmuxifier.zsh Normal file
View File

@@ -0,0 +1,19 @@
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}")
}