Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: alias -- do not pass args
- X-seq: zsh-users 10707
- From: Jean-Rene David <jrdavid@xxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: alias -- do not pass args
- Date: Mon, 11 Sep 2006 15:11:16 -0400
- In-reply-to: <20060911185045.GA15092@localdomain>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20060911185045.GA15092@localdomain>
* Roman Cheplyaka [2006.09.11 15:00]:
> I want to define alias which would /not/ pass its args to program.
> E.g.
> $ alias foo='echo lol'
> $ foo a b
> should just print lol, not "lol a b". How can I do this?
Well in this case the alias does not pass its args
to the program. The alias is just expanded and the
whole line is passed to 'echo' by the shell.
You could obtain what you want with a shell
function:
% foo() { echo lol; }
% foo a b
lol
%
It doesn't make much sense to do it with an alias
anyway. Unless I'm missing something...
--
JR
Messages sorted by:
Reverse Date,
Date,
Thread,
Author