zsh-users
 help / color / mirror / code / Atom feed
From: Danek Duvall <duvall@emufarm.org>
To: Borzenkov Andrey <Andrey.Borzenkov@siemens.com>
Cc: "'Eric Mangold'" <teratorn@world-net.net>, zsh-users@sunsite.dk
Subject: Re: using command aliases with sudo
Date: Sun, 1 Jun 2003 23:24:54 -0700	[thread overview]
Message-ID: <20030602062454.GE16251@lorien.emufarm.org> (raw)
In-Reply-To: <6134254DE87BD411908B00A0C99B044F05A0C92F@mowd019a.mow.siemens.ru>

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"

Danek


  reply	other threads:[~2003-06-02  6:25 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 [this message]
2003-06-02  6:35     ` Borzenkov Andrey
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=20030602062454.GE16251@lorien.emufarm.org \
    --to=duvall@emufarm.org \
    --cc=Andrey.Borzenkov@siemens.com \
    --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).