Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: alias -- do not pass args



Roman Cheplyaka <roman.cheplyaka@xxxxxxxxx>:
> 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?

Use a function for that:

[snip]
zsh% function foo() { echo bar } ; foo Hello World.
bar
[snap]

Regards, Frank



Messages sorted by: Reverse Date, Date, Thread, Author