ALT Linux Bugzilla
– Attachment 4905 Details for
Bug 25490
[FR] vzctl completion
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
/usr/share/zsh/Completion/Linux/_vzctl
_vzctl (text/plain), 3.25 KB, created by
Michael Shigorin
on 2011-04-21 20:45:57 MSK
(
hide
)
Description:
/usr/share/zsh/Completion/Linux/_vzctl
Filename:
MIME Type:
Creator:
Michael Shigorin
Created:
2011-04-21 20:45:57 MSK
Size:
3.25 KB
patch
obsolete
>#compdef vzctl > >_vzctl() { > _arguments \ > '--quiet[Quiet]' \ > '--verbose[Verbose output]' \ > '*::OpenVZ command:_OpenVZ_command' >} > >(( $+functions[_OpenVZ_command] )) || >_OpenVZ_command() { > (($+_OpenVZ_cmds )) || _OpenVZ_cmds=( > 'start:Start a VE' \ > 'restart:Restart a VE' \ > 'status:Show VE status' \ > 'stop:Stop a VE' \ > 'enter:Enter into a VE' \ > 'mount:Mount VE private area' \ > 'umount:Umount VE private area' \ > 'set:Set various VE parameters' \ > 'destroy:Destroy a zone' \ > 'runscript:Run specified shell script into a VE' \ > 'create:Create a new VE area' \ > 'exec:Execute' \ > 'exec2:Execute' > ) > > if (( CURRENT == 1 )); then > _describe -t commands 'OpenVZ command' _OpenVZ_cmds > else > local curcontext="$curcontext" > cmd="${_OpenVZ_cmds[(r)$words[1]:*]%%:*}" > if (( $#cmd )); then > curcontext="${curcontext%:*:*}:OpenVZ-${cmd}:" > _call_function ret _OpenVZ_$cmd || _message 'no more arguments' > else > _message "Unknow OpenVZ command: $words[1]" > fi > return ret > fi >} > >### Utility functions > >### OpenVZ functions >(( $+functions[_OpenVZ_set] )) || >_OpenVZ_set(){ > #runvms=(${${(M)${(f)"$(vzlist -H -a -o veid,status,hostname)"}:#[[:blank:]]##[[:digit:]]*running*}/(#b)[[:blank:]]##([[:digit:]]##)[[:blank:]]##[[:alpha:]]##[[:blank:]]##/$match[1]:}) > runvms=(${${(M)${(f)"$(vzlist -H -a -o veid,status,hostname)"}:#[[:blank:]]##[[:digit:]]**}/(#b)[[:blank:]]##([[:digit:]]##)[[:blank:]]##[[:alpha:]]##[[:blank:]]##/$match[1]:}) > _arguments -s \ > '1:veid:(($runvms))' \ > '--onboot[yes|no]:onboot:(yes no)' \ > '--root' \ > '--userpasswd[user:passwd]' \ > '--save' >} > >(( $+functions[_OpenVZ_start] )) || >_OpenVZ_start(){ > runvms=(${${(M)${(f)"$(vzlist -H -a -o veid,status,hostname)"}:#[[:blank:]]##[[:digit:]]*stopped*}/(#b)[[:blank:]]##([[:digit:]]##)[[:blank:]]##[[:alpha:]]##[[:blank:]]##/$match[1]:}) > _arguments -s \ > '1:veid:(($runvms))' >} > >(( $+functions[_OpenVZ_restart] )) || >_OpenVZ_restart(){ > runvms=(${${(M)${(f)"$(vzlist -H -a -o veid,status,hostname)"}:#[[:blank:]]##[[:digit:]]*stopped*}/(#b)[[:blank:]]##([[:digit:]]##)[[:blank:]]##[[:alpha:]]##[[:blank:]]##/$match[1]:}) > _arguments -s \ > '1:veid:(($runvms))' >} > >(( $+functions[_OpenVZ_stop] )) || >_OpenVZ_stop(){ > runvms=(${${(M)${(f)"$(vzlist -H -a -o veid,status,hostname)"}:#[[:blank:]]##[[:digit:]]*running*}/(#b)[[:blank:]]##([[:digit:]]##)[[:blank:]]##[[:alpha:]]##[[:blank:]]##/$match[1]:}) > _arguments -s \ > '1:veid:(($runvms))' >} > >(( $+functions[_OpenVZ_reload] )) || >_OpenVZ_reload(){ > runvms=(${${(M)${(f)"$(vzlist -H -a -o veid,status,hostname)"}:#[[:blank:]]##[[:digit:]]*running*}/(#b)[[:blank:]]##([[:digit:]]##)[[:blank:]]##[[:alpha:]]##[[:blank:]]##/$match[1]:}) > _arguments -s \ > '1:veid:(($runvms))' >} > >(( $+functions[_OpenVZ_exec] )) || >_OpenVZ_exec(){ > >} > >(( $+functions[_OpenVZ_exec2] )) || >_OpenVZ_exec2(){ > >} > >(( $+functions[_OpenVZ_enter] )) || >_OpenVZ_enter(){ > runvms=(${${(M)${(f)"$(vzlist -H -a -o veid,status,hostname)"}:#[[:blank:]]##[[:digit:]]*running*}/(#b)[[:blank:]]##([[:digit:]]##)[[:blank:]]##[[:alpha:]]##[[:blank:]]##/$match[1]:}) > _arguments -s \ > '1:veid:(($runvms))' >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 25490
: 4905