From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22440 invoked from network); 26 Jan 2009 21:17:18 -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.8 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; 26 Jan 2009 21:17:18 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 99488 invoked from network); 26 Jan 2009 21:17:13 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Jan 2009 21:17:13 -0000 Received: (qmail 15355 invoked by alias); 26 Jan 2009 21:17:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26451 Received: (qmail 15337 invoked from network); 26 Jan 2009 21:17:07 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 26 Jan 2009 21:17:07 -0000 Received: from uucp.gnuu.de (uucp.gnuu.de [83.246.114.63]) by bifrost.dotsrc.org (Postfix) with ESMTP id CE2BC80271F0 for ; Mon, 26 Jan 2009 22:17:03 +0100 (CET) Received: by uucp.gnuu.de (Postfix, from userid 10) id D8884EC063; Mon, 26 Jan 2009 22:17:02 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.5.2 uucp.gnuu.de D8884EC063 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gnuu.de; s=banki; t=1233004622; i=@alea.gnuu.de; bh=FQrV5XloKJCqwJkDz7UTz2ENAP2s+I3rg /BWBogDGfY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Type:Content-Transfer-Encoding; b=iZo/lVmUySlFLWteyK/Q4Tw1DtN7Rnt3px017vkScmd7VsQkd21kvNWqr2XU7Tu4M XDZC71abkOOWTNSH0/dtEFFlmoyOVpP8h0cN65ZPNCqSUyvp1+7fgkYshHJMtXCYACR fbIQ1FKsW1gxhEhXC+6CfbBuIqMVmPnBd7Oczfw= Received: from ibook.localnet ([192.168.0.5] helo=alea.gnuu.de) by alea.gnuu.de with esmtp (Exim 4.69) (envelope-from ) id 1LRYjK-00024A-8V for zsh-workers@sunsite.dk; Mon, 26 Jan 2009 22:10:50 +0100 Received: from joerg by alea.gnuu.de with local (Exim 4.69) (envelope-from ) id 1LRYjI-0006Fc-UX; Mon, 26 Jan 2009 22:10:48 +0100 From: =?utf-8?q?J=C3=B6rg=20Sommer?= To: zsh-workers@sunsite.dk Cc: =?utf-8?q?J=C3=B6rg=20Sommer?= Subject: [PATCH 2/3] Replace obsolate modprobe -l by file search Date: Mon, 26 Jan 2009 22:10:47 +0100 Message-Id: <1233004248-24000-2-git-send-email-joerg@alea.gnuu.de> X-Mailer: git-send-email 1.6.0.6 In-Reply-To: <1233004248-24000-1-git-send-email-joerg@alea.gnuu.de> References: <1233004248-24000-1-git-send-email-joerg@alea.gnuu.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV 0.92.1/8905/Mon Jan 26 18:29:36 2009 on bifrost X-Virus-Status: Clean In the manual page of the current modprobe (version 3.4) the option -l is marked as obsolate; “This option is provided for backwards compatibility.” So use Zsh tools to get the name of the modules. The base directory is takes from the manual page that says: “modprobe looks in the module directory /lib/modules/‘uname -r‘ for all the modules […].” --- Completion/Linux/Command/_modutils | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Completion/Linux/Command/_modutils b/Completion/Linux/Command/_modutils index db419ac..fe1b58e 100644 --- a/Completion/Linux/Command/_modutils +++ b/Completion/Linux/Command/_modutils @@ -77,7 +77,7 @@ case "$state" in ;& all_modules) - modules=( ${${${${(f)"$(_call_program modules ${(M)words[1]##*/}modprobe -l 2>/dev/null)"}:#}##*/}%%.*} ) + modules=( /lib/modules/$(uname -r)/(*~source)/**/*(.:t:r) ) if [[ $state = loadable_modules ]]; then modules=( ${modules:#(${(j:|:)~${=loaded_modules//_/-}})} ) -- 1.6.0.6