1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-31 15:12:18 +01:00
zsh/Completion/openSUSE/Command/_yast2
2011-04-30 16:58:26 +00:00

30 lines
819 B
Text

#compdef yast2 yast
local curcontext="$curcontext" state line
typeset -A opt_args
if [[ -z "$_yast2_modules" ]]; then
for i in $(/sbin/yast2 --list | grep -v "Available.*modules"); do
_yast2_modules=($_yast2_modules $i)
done
fi
_arguments -s \
'(--list)-l[list all available modules]' '(-l)--list' \
'(--help)-h[help]' '(-h)--help'\
\
{'(--geometry)-g[default window size (qt only)]','(-g)--geometry'}':geometry:(800x600+0+0)' \
'(--style)-s[widget style (qt only)]' '(-s)--style' \
\
{'(--install)-i[install rpm package]','(-i)--install'}':filename:_files' \
\
'--noborder[no window manager border for main window]' '--noborder' \
'--fullscreen[use full screen]' '--fullscreen' \
\
':module:->module' && return 0
case $state in
module) compadd $_yast2_modules; _files -g "*.ycp";;
esac