initial
This commit is contained in:
parent
d67e39f3f7
commit
58ef6d327f
1725 changed files with 129819 additions and 0 deletions
26
dot_oh-my-zsh/plugins/lxd/lxd.plugin.zsh
Normal file
26
dot_oh-my-zsh/plugins/lxd/lxd.plugin.zsh
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
_lxc_get_command_list () {
|
||||
$_comp_command1 | sed "1,/Available Commands/d" | awk '/^[ \t]*[a-z]+/ { print $1 }'
|
||||
}
|
||||
|
||||
_lxc_get_subcommand_list () {
|
||||
$_comp_command1 ${words[2]} | sed "1,/Available Commands/d" | awk '/^[ \t]*[a-z]+/ { print $1 }'
|
||||
}
|
||||
|
||||
_lxc () {
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
_arguments \
|
||||
'1: :->command'\
|
||||
'*: :->args'
|
||||
|
||||
case $state in
|
||||
command)
|
||||
compadd $(_lxc_get_command_list)
|
||||
;;
|
||||
*)
|
||||
compadd $(_lxc_get_subcommand_list)
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
compdef _lxc lxc
|
||||
Loading…
Add table
Add a link
Reference in a new issue