4 # terminitor zsh completion
6 _terminitor_available_scripts() {
7 scripts=(`for SCRIPT in ~/.config/terminitor/*.term ; do basename $SCRIPT .term ; done`)
10 local -a _1st_arguments
12 'create:create a Termfile in directory'
13 'delete:delete terminitor script'
14 'edit:open termitor script'
15 'fetch:clone the designated repo and run setup'
16 'help:Describe available tasks or one specific task'
17 'init:create initial root terminitor folder'
18 'list:lists all terminitor scripts'
19 'setup:execute setup in the terminitor script'
20 'start:runs the terminitor script'
21 'update:update Terminitor to new global path(.config/.terminitor)'
27 '*:: :->subcmds' && return 0
29 if (( CURRENT == 1 )); then
30 _describe -t commands "terminitor task" _1st_arguments
35 start|edit|delete|setup)
36 _terminitor_available_scripts
37 _wanted scripts expl 'installed scripts' compadd -a scripts ;;