diff options
author | Mariusz Fik <fisiu@opensuse.org> | 2014-03-15 20:23:51 +0100 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2014-03-16 18:30:12 +0000 |
commit | 2dcf05310612d9bc9980d57f15d500fcf220a974 (patch) | |
tree | d9884b245e5bff66a7950b09d0ca9a2ef0fd9c81 /Completion/openSUSE | |
parent | 6ebb9f6a31f362ecd55c79e647fe09c0b0712039 (diff) | |
download | zsh-2dcf05310612d9bc9980d57f15d500fcf220a974.tar.gz zsh-2dcf05310612d9bc9980d57f15d500fcf220a974.tar.xz zsh-2dcf05310612d9bc9980d57f15d500fcf220a974.zip |
Fix zypper commands completion [zypper <TAB>].
Signed-off-by: Mariusz Fik <fisiu@opensuse.org>
Diffstat (limited to 'Completion/openSUSE')
-rw-r--r-- | Completion/openSUSE/Command/_zypper | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Completion/openSUSE/Command/_zypper b/Completion/openSUSE/Command/_zypper index ef8ca203c..25a32c3f1 100644 --- a/Completion/openSUSE/Command/_zypper +++ b/Completion/openSUSE/Command/_zypper @@ -2,6 +2,7 @@ # # Copyright (C) 2009 Holger Macht <holger@homac.de> # Copyright (C) 2014 Thomas Mitterfellner <thomas.mitterfellner@gmail.com> +# Copyright (C) 2014 Mariusz Fik <fisiu@opensuse.org> # # This file is released under the GPLv2. # @@ -45,8 +46,10 @@ _zypper() { # start parsing with "Global Options:" [[ $hline =~ "^Global Options:" ]] && tag=1 [[ $tag = 0 ]] && continue + # skip empty lines + [[ $hline =~ ^\s*$ ]] && continue # all commands have to start with lower case letters - [[ $hline[1] =~ ^[A-Z] ]] && continue + [[ $hline == [[:upper:]]* ]] && continue (( ${#hline} < 2 )) && continue # cut comma at end of command |