Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: precommand modifiers and alias sudo="sudo "
- X-seq: zsh-users 13569
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: precommand modifiers and alias sudo="sudo "
- Date: Wed, 10 Dec 2008 12:31:15 +0000
- In-reply-to: <5FE916F5-AC66-4D8C-B86F-BB7A5A41F245@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <5FE916F5-AC66-4D8C-B86F-BB7A5A41F245@xxxxxxxxxxx>
Sebastian Stark wrote:
> I have set up an alias sudo="sudo " that enables use of aliases with
> sudo.
>
> But now precommand modifiers like "nocorrect" or "env"* stopped working.
>
> p% alias mkdir
> mkdir='nocorrect mkdir'
> % sudo mkdir foo
> sudo: nocorrect: command not found
> %
>
> Anything I can do? Or should I forget about the idea of using aliases
> with sudo?
I don't see anything you can do automatically, offhand, but you can
suppress alias expansion by quoting any part of mkdir (e.g. \mkdir).
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author