_hostnamectl   _hostnamectl 
#compdef hostnamectl #compdef hostnamectl
_hostnamectl_set-hostname() {
if (( CURRENT <= 3 )); then
_message "new hostname"
else
_message "no more options"
fi
}
_hostnamectl_set-icon-name() {
if (( CURRENT <= 3 )); then
_message "new icon name"
else
_message "no more options"
fi
}
_hostnamectl_set-chassis() {
if (( CURRENT <= 3 )); then
_chassis=( desktop laptop server tablet handset watch vm container
)
_describe chassis _chassis
else
_message "no more options"
fi
}
_hostnamectl_set-deployment() {
if (( CURRENT <= 3 )); then
_message "new environment"
else
_message "no more options"
fi
}
_hostnamectl_command() { _hostnamectl_command() {
local -a _hostnamectl_cmds local -a _hostnamectl_cmds
_hostnamectl_cmds=( _hostnamectl_cmds=(
"status:Show current hostname settings" "status:Show current hostname settings"
"set-hostname:Set system hostname" "set-hostname:Set system hostname"
"set-icon-name:Set icon name for host" "set-icon-name:Set icon name for host"
"set-chassis:Set chassis type for host" "set-chassis:Set chassis type for host"
"set-deployment:Set deployment environment"
) )
if (( CURRENT == 1 )); then if (( CURRENT == 1 )); then
_describe -t commands 'hostnamectl commands' _hostnamectl_cmds || c ompadd "$@" _describe -t commands 'hostnamectl commands' _hostnamectl_cmds || c ompadd "$@"
else else
local curcontext="$curcontext" local curcontext="$curcontext"
cmd="${${_hostnamectl_cmds[(r)$words[1]:*]%%:*}}" cmd="${${_hostnamectl_cmds[(r)$words[1]:*]%%:*}}"
if (( $#cmd )); then if (( $#cmd )); then
[[ $cmd == status ]] && msg="no options" || msg="options for $c if [[ $cmd == status ]]; then
md" _message "no options"
_message "$msg" else
_hostnamectl_$cmd
fi
else else
_message "unknown hostnamectl command: $words[1]" _message "unknown hostnamectl command: $words[1]"
fi fi
fi fi
} }
_arguments -s \ _arguments -s \
{-h,--help}'[Show this help]' \ {-h,--help}'[Show this help]' \
'--version[Show package version]' \ '--version[Show package version]' \
'--transient[Only set transient hostname]' \ '--transient[Only set transient hostname]' \
 End of changes. 3 change blocks. 
3 lines changed or deleted 40 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/