Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: about alias
- X-seq: zsh-users 872
- From: Hrvoje Niksic <hniksic@xxxxxxx>
- To: "Zhong, Kaixiang" <kzhong@xxxxxxxxxxx>
- Subject: Re: about alias
- Date: 29 May 1997 19:57:23 +0200
- Cc: "'zsh-users@xxxxxxxxxxxxxxx'" <zsh-users@xxxxxxxxxxxxxxx>
- In-reply-to: "Zhong, Kaixiang"'s message of Thu, 29 May 1997 13:50:09 -0400
- References: <c=US%a=_%p=OneWave%l=OW56-970529175009Z-37524@xxxxxxxxxxxxxxxx>
"Zhong, Kaixiang" <kzhong@xxxxxxxxxxx> writes:
> I wonder if there is a easy way to use original command instead of
> using alias or functions temporarily in zsh. E.g:
>
> I defined rm as
> rm() {
> mv $* ~/.wastebaseket
> }
>
> However sometimes I just want to use /bin/rm temporarily.
> I know I can do that in csh by using "\rm". But this don't work in
> zsh.
It works in Zsh for aliases, too. For functions, you should use
`command':
command rm something.
If you really want to use \, you can do something like this:
my_rm() {
mv "$@" ~/.wastebasket
}
alias rm=my_rm
Now `rm' will normally call the function `my_rm', and `\rm' will
circumvent the alias, and call the command `rm'.
--
Hrvoje Niksic <hniksic@xxxxxxx> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
main(){printf(&unix["\021%six\012\0"],(unix)["have"]+"fun"-0x60);}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author