From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22045 invoked by alias); 28 Jan 2013 15:49:49 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31008 Received: (qmail 1299 invoked from network); 28 Jan 2013 15:49:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf-ipv4.yandex.ru designates 77.88.46.8 as permitted sender) From: Dmitry Roshchin To: zsh-workers@zsh.org Subject: PATCH: zypper and ocs completion Date: Mon, 28 Jan 2013 19:44:05 +0400 Message-ID: <3656783.WKvq4JDrfD@main> User-Agent: KMail/4.10 rc3 (Linux/3.4.11-2.16-desktop; KDE/4.9.98; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Patch for _zypper fixes completion in some locales and help messages splitting (for details see https://bugzilla.novell.com/show_bug.cgi?id=752112). Patch for _osr sets current openSUSE versions. Index: zsh/Completion/openSUSE/Command/_zypper =================================================================== --- zsh.orig/Completion/openSUSE/Command/_zypper +++ zsh/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 Index: zsh/Completion/openSUSE/Command/_osc =================================================================== --- zsh.orig/Completion/openSUSE/Command/_osc +++ zsh/Completion/openSUSE/Command/_osc @@ -16,8 +16,8 @@ # version 0.2 # -OSC_BUILD_TARGETS="openSUSE_11.2 openSUSE_11.3 openSUSE_11.4 openSUSE_12.1 openSUSE_Tumbleweed openSUSE_Factory SLE_11_SP1" -OSC_PROJECTS="openSUSE:Factory openSUSE:Tumbleweed openSUSE:12.1 openSUSE:11.4 openSUSE:11.2 openSUSE:11.3" +OSC_BUILD_TARGETS="openSUSE_12.1 openSUSE_12.2 openSUSE_12.3 openSUSE_Tumbleweed openSUSE_Factory SLE_11_SP2" +OSC_PROJECTS="openSUSE:Factory openSUSE:Tumbleweed openSUSE:12.3 openSUSE:12.2 openSUSE:12.1" # user defined variables $OSC_BUILD_TARGETS_EXTRA and # $OSC_PROJECTS_EXTRA can add to the project/build target list