zsh: minor prompt update
This commit is contained in:
21
zsh/.local/share/zsh/functions/_eph
Normal file
21
zsh/.local/share/zsh/functions/_eph
Normal file
@@ -0,0 +1,21 @@
|
||||
#compdef eph
|
||||
_eph() {
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
'(-h --help)'{-h,--help}'[display help]' \
|
||||
'--completion[generate completion script]:shell:(zsh)' \
|
||||
'--list[list all containers]' \
|
||||
'1: :->containers'
|
||||
|
||||
case $state in
|
||||
containers)
|
||||
local -a subcmds
|
||||
subcmds=(${(f)"$(lxc ls -c n -f csv 2>/dev/null)"})
|
||||
_describe 'containers' subcmds
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_eph "$@"
|
||||
Reference in New Issue
Block a user