about summary refs log tree commit diff
path: root/Completion/openSUSE/Command/_yast2
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-04-30 16:58:26 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-04-30 16:58:26 +0000
commitf8e254aa85cdf79c48a44d4d42f905478aaa9c37 (patch)
treeef7cbdbec03bb06af90b63aeef5b2cd0ba35c56e /Completion/openSUSE/Command/_yast2
parent2938c58c82ddbd342e0750c15be2ced12bf98e3c (diff)
downloadzsh-f8e254aa85cdf79c48a44d4d42f905478aaa9c37.tar.gz
zsh-f8e254aa85cdf79c48a44d4d42f905478aaa9c37.tar.xz
zsh-f8e254aa85cdf79c48a44d4d42f905478aaa9c37.zip
İsmail Dönmez: 29020: new openSUSE completions
Diffstat (limited to 'Completion/openSUSE/Command/_yast2')
-rw-r--r--Completion/openSUSE/Command/_yast230
1 files changed, 30 insertions, 0 deletions
diff --git a/Completion/openSUSE/Command/_yast2 b/Completion/openSUSE/Command/_yast2
new file mode 100644
index 000000000..b9c7f2489
--- /dev/null
+++ b/Completion/openSUSE/Command/_yast2
@@ -0,0 +1,30 @@
+#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
+
+