about summary refs log tree commit diff
path: root/Completion/openSUSE/Command/_zypper
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2013-01-29 19:30:42 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2013-01-29 19:30:42 +0000
commit543be645a9f174bcc2ba08b7801ac69e1c617abf (patch)
tree7b558a92fe15c4ea4db3daf28f862709435aa9c6 /Completion/openSUSE/Command/_zypper
parent2b75cf571e45fae6344ee6681a2d4418ab5ea165 (diff)
downloadzsh-543be645a9f174bcc2ba08b7801ac69e1c617abf.tar.gz
zsh-543be645a9f174bcc2ba08b7801ac69e1c617abf.tar.xz
zsh-543be645a9f174bcc2ba08b7801ac69e1c617abf.zip
Dmitry Roshchin: 31008: updates for openSUSE completions
Diffstat (limited to 'Completion/openSUSE/Command/_zypper')
-rw-r--r--Completion/openSUSE/Command/_zypper5
1 files changed, 2 insertions, 3 deletions
diff --git a/Completion/openSUSE/Command/_zypper b/Completion/openSUSE/Command/_zypper
index 03818eaa5..4f2477a41 100644
--- a/Completion/openSUSE/Command/_zypper
+++ b/Completion/openSUSE/Command/_zypper
@@ -28,11 +28,10 @@ _zypper() {
 	local hline
 	local -a cmdlist
 	local tag=0
-	_call_program help-commands zypper help | while read -A hline; do
+	_call_program help-commands LANG=C zypper help | sed -e ':a;N;$!ba;s/\n\t\t\t\t/ /g' | while read -A hline; do
 	    # start parsing with "Global Options:"
 	    [[ $hline =~ "^Global Options:" ]] && tag=1
 	    [[ $tag = 0 ]] && continue
-	    [[ $hline[1] =~ ^\t\t\t\t ]] && continue
 	    # all commands have to start with lower case letters
 	    [[ $hline[1] =~ ^[A-Z] ]] && continue
 	    (( ${#hline} < 2 )) && continue
@@ -51,7 +50,7 @@ _zypper_cmd_do() {
     local hline
     local -a cmdlist
     local tag=0
-    _call_program help-commands zypper help $cmd | while read -A hline; do
+    _call_program help-commands LANG=C zypper help $cmd | while read -A hline; do
 	# start parsing from "Options:"
 	[[ $hline =~ "^Command options:" ]] && tag=1
 	[[ $tag = 0 ]] && continue