You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
599 B
35 lines
599 B
6 years ago
|
#compdef laminarc
|
||
|
#autoload
|
||
|
|
||
|
_laminarc() {
|
||
|
if (( CURRENT == 2 )); then
|
||
|
_values "Operation" \
|
||
|
"queue" \
|
||
|
"start" \
|
||
|
"run" \
|
||
|
"set" \
|
||
|
"show-jobs" \
|
||
|
"show-queued" \
|
||
|
"show-running" \
|
||
|
"abort"
|
||
|
else
|
||
|
case "${words[2]}" in
|
||
|
queue|start|run)
|
||
|
if (( CURRENT == 3 )); then
|
||
|
_values "Jobs" $(laminarc show-jobs)
|
||
|
fi
|
||
|
;;
|
||
|
abort)
|
||
|
if (( CURRENT == 3 )); then
|
||
|
_values "Jobs" $(laminarc show-running | cut -d : -f 1)
|
||
|
elif (( CURRENT == 4 )); then
|
||
|
_values "Runs" $(laminarc show-running | cut -d : -f 2)
|
||
|
fi
|
||
|
;;
|
||
|
esac
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
_laminarc
|
||
|
# vim: ft=zsh
|