Added tmuxp completions

Right now, it only completes ~/.tmuxp projects (xml and yaml), I'll add local file and projectdir completions later.
This commit is contained in:
Andrej Radovic 2017-05-08 17:45:19 +02:00 committed by GitHub
parent fa1c720584
commit fdbcdc86e2
1 changed files with 16 additions and 0 deletions

16
src/_tmuxp Normal file
View File

@ -0,0 +1,16 @@
#compdef tmuxp
if (( CURRENT == 2 )); then
_alternative 'act:actions:((\
convert\:"Convert a tmuxp config between JSON and YAML."\ \
freeze\:"Snapshot a session into a config." \
import\:"Import a teamocil/tmuxinator config." \
load\:"Load tmuxp workspaces." \))'
return
else
case "$words[2]" in
(load)
_alternative 'user:user sessions:_files -W ~/.tmuxp -g \*.\(yaml\|json\)\(:r\)'
;;
esac
fi