mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
Fix zypper commands completion [zypper <TAB>].
Signed-off-by: Mariusz Fik <fisiu@opensuse.org>
This commit is contained in:
parent
6ebb9f6a31
commit
2dcf053106
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2014-03-16 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* Mariusz Fik: 32847: Completion/openSUSE/Command/_zypper: new
|
||||
options.
|
||||
|
||||
2014-03-14 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* unposted: Doc/Zsh/options.yo: document effect of 32479.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue