From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3867 invoked from network); 2 Jun 2003 06:35:44 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 2 Jun 2003 06:35:44 -0000 Received: (qmail 14134 invoked by alias); 2 Jun 2003 06:35:33 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6142 Received: (qmail 14127 invoked from network); 2 Jun 2003 06:35:33 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 2 Jun 2003 06:35:33 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [192.35.17.28] by sunsite.dk (MessageWall 1.0.8) with SMTP; 2 Jun 2003 6:35:33 -0000 Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by goliath.siemens.de (8.11.7/8.11.7) with ESMTP id h526ZW507135; Mon, 2 Jun 2003 08:35:32 +0200 (MEST) Received: from MOWD019A.mow.siemens.ru ([163.242.196.119]) by mail3.siemens.de (8.11.7/8.11.7) with ESMTP id h526ZV611810; Mon, 2 Jun 2003 08:35:31 +0200 (MEST) Received: by mowd019a.mow.siemens.ru with Internet Mail Service (5.5.2653.19) id ; Mon, 2 Jun 2003 10:40:25 +0400 Received: from mw2b210c (163.242.193.12 [163.242.193.12]) by MOWD019A.mow.siemens.ru with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id L96NMW14; Mon, 2 Jun 2003 10:40:22 +0400 From: Borzenkov Andrey To: "'Danek Duvall'" Cc: "'Eric Mangold'" , zsh-users@sunsite.dk Subject: RE: using command aliases with sudo Date: Mon, 2 Jun 2003 10:35:21 +0400 Message-ID: <6134254DE87BD411908B00A0C99B044F05A0C930@mowd019a.mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 In-Reply-To: <20030602062454.GE16251@lorien.emufarm.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal > Andrey Borzenkov wrote: >=20 > > sudo() { > > ... add sudo options parsing here that sets sudo_options and > > sudo_command... > > command sudo $sudo_options zsh -c "$sudo_command" > > } > > > > with obvious caveat that you have to modify sudoers to account for = this. >=20 > What about >=20 > if [[ -n $aliases[$sudo_command[1]] ]]; then > sudo_command[1]=3D( $=3Daliases[$sudo_command[1]] ) > fi > command sudo $sudo_options "$sudo_command" >=20 excellent :) -andrey