From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16414 invoked from network); 22 Sep 2008 17:10:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 22 Sep 2008 17:10:09 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 38903 invoked from network); 22 Sep 2008 17:09:47 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 22 Sep 2008 17:09:46 -0000 Received: (qmail 18350 invoked by alias); 22 Sep 2008 17:09:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25717 Received: (qmail 18272 invoked from network); 22 Sep 2008 17:09:29 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 22 Sep 2008 17:09:29 -0000 Received: from uucp.gnuu.de (banki.eumelnet.de [83.246.114.63]) by bifrost.dotsrc.org (Postfix) with ESMTP id 1C4D880561C8 for ; Mon, 22 Sep 2008 19:08:51 +0200 (CEST) Received: by uucp.gnuu.de (Postfix, from userid 10) id A607FEC02B; Mon, 22 Sep 2008 19:08:14 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.5.2 uucp.gnuu.de A607FEC02B DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gnuu.de; s=banki; t=1222103294; i=@alea.gnuu.de; bh=7obxHDTSjRnF11blkwFraoPndGf12o380 dJD91j9ppU=; h=To:From:Subject:Date:Message-ID:References: Mime-Version:Content-Type:Content-Transfer-Encoding:Sender; b=PUpn yMFlae2wxrmPAxl1s5pIWBP+2FgeRK6dPnjXVV9rLaRNWT63r/4Di+R2ZcOVKrPgZvM NzjKuj+bAV1LgBr4Lb6TiWbrpGbuXBK81kFfVB852cgvWYM2+Cd/FhFIa7KXhV4xNzo BC2nLt4qQ1yDQV6VyuQkaDKE2osm54B5g= Received: from news by alea.gnuu.de with local (Exim 4.63) (envelope-from ) id 1Khofg-0004BL-33 for zsh-workers@sunsite.dk; Mon, 22 Sep 2008 18:54:00 +0200 To: zsh-workers@sunsite.dk Path: not-for-mail From: =?UTF-8?Q?J=C3=B6rg?= Sommer Newsgroups: local.mailinglist.zsh Subject: Re: [PATCH] Completion for chrt and ionice Date: Mon, 22 Sep 2008 16:53:59 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: alea.gnuu.de 1222102439 16077 192.168.0.5 (22 Sep 2008 16:53:59 GMT) X-Complaints-To: usenet@alea.gnuu.de User-Agent: slrn/0.9.9 (Linux) Sender: news X-Virus-Scanned: ClamAV 0.92.1/8308/Mon Sep 22 15:43:13 2008 on bifrost X-Virus-Status: Clean Hi, Jörg Sommer wrote: > commit 14b01890163625d1aa41610beb46e00155090308 > Author: Jörg Sommer > Date: Sun Sep 21 15:51:36 2008 +0200 > > Completion for the Linux command ionice > > The command ionice is used on Linux to get or set the IO scheduling > attributes of a process. This completion is not correct. Here are patches for it: commit 0488523c0581a74a321d8c1e1852bc0aa58a2003 Author: Jörg Sommer Date: Mon Sep 22 16:50:03 2008 +0200 Reverse the order of unnamed priorities The completion was printed in reverse order. So add the entries in descending order to get the ascending ording in the help message. diff --git a/Completion/Linux/Command/_ionice b/Completion/Linux/Command/_ionice index e3b64aa..fd49dcd 100644 --- a/Completion/Linux/Command/_ionice +++ b/Completion/Linux/Command/_ionice @@ -9,7 +9,7 @@ _arguments \ '-c[scheduling class]:class:(( 1\:realtime 2\:best-effort 3\:idle ))' \ '-n[scheduling class priority]:class-pririty:(( 0\:high\ priority - {1..6}\: + {6..1}\: 7\:low\ priority ))' \ '*::command or pid:->cmd_or_prio' \ commit e2da3b57bfa4145811aa3b3921edb329b7bef1f7 Author: Jörg Sommer Date: Mon Sep 22 16:54:28 2008 +0200 The pid for -p must follow the option The process ID is the mandatory argument of the -p option. diff --git a/Completion/Linux/Command/_ionice b/Completion/Linux/Command/_ionice index fd49dcd..b7cd21b 100644 --- a/Completion/Linux/Command/_ionice +++ b/Completion/Linux/Command/_ionice @@ -1,23 +1,12 @@ #compdef ionice -local context state line -typeset -A opt_args - _arguments \ '(* -)-h[display usage information]' \ - '-p[interpret args as process ID]' \ + '(*)-p[interpret args as process ID]:pid:_pids' \ '-c[scheduling class]:class:(( 1\:realtime 2\:best-effort 3\:idle ))' \ '-n[scheduling class priority]:class-pririty:(( 0\:high\ priority {6..1}\: 7\:low\ priority ))' \ - '*::command or pid:->cmd_or_prio' \ - && return 0 - -if (( $+opt_args[-p] )) -then - _pids -else - _normal -fi + '*::command:_normal' Bye, Jörg. -- “…anytime you install something new on the Windows platform, you risk spending the next five or six hours trying to figure out what happened” (Robert Roblin, Adobe)