3 ms·
> The alias itself looks a bit weird in that to pass arguments to an aliased command you need to use a function (in Bash at least AFACIT) but it all works fine.
by blep_ 4y ago
> The alias itself looks a bit weird in that to pass arguments to an aliased command you need to use a function (in Bash at least AFACIT) but it all works fine.
No you don't:
$ alias say=echo
$ say beep
beep
You do need to do something special the other way around (if you wrap a command in a function it needs to explicitly pass the arguments on).
- tomjakubowski 4y agoAnother advantage of aliases: in zsh at least, autocompletions of the aliased command Just Work (it breaks in wrapper functions)