From: Borzenkov Andrey <Andrey.Borzenkov@siemens.com>
To: "'Danek Duvall'" <duvall@emufarm.org>
Cc: "'Eric Mangold'" <teratorn@world-net.net>, zsh-users@sunsite.dk
Subject: RE: using command aliases with sudo
Date: Mon, 2 Jun 2003 10:35:21 +0400 [thread overview]
Message-ID: <6134254DE87BD411908B00A0C99B044F05A0C930@mowd019a.mow.siemens.ru> (raw)
In-Reply-To: <20030602062454.GE16251@lorien.emufarm.org>
> Andrey Borzenkov wrote:
>
> > 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.
>
> What about
>
> if [[ -n $aliases[$sudo_command[1]] ]]; then
> sudo_command[1]=( $=aliases[$sudo_command[1]] )
> fi
> command sudo $sudo_options "$sudo_command"
>
excellent :)
-andrey
next prev parent reply other threads:[~2003-06-02 6:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-28 7:04 Eric Mangold
2003-06-02 5:54 ` Borzenkov Andrey
2003-06-02 6:24 ` Danek Duvall
2003-06-02 6:35 ` Borzenkov Andrey [this message]
2003-06-02 6:23 ` Stephen Rueger
2003-06-02 6:36 ` Wayne Davison
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6134254DE87BD411908B00A0C99B044F05A0C930@mowd019a.mow.siemens.ru \
--to=andrey.borzenkov@siemens.com \
--cc=duvall@emufarm.org \
--cc=teratorn@world-net.net \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).