How do I access the command line argument variable when making an alias in
Terminal?
I'm making a few aliases to speed up my development processes.
Right now I'm trying to make a cdls which is quite obviously a cd
{arbitrary-file} && ls {arbitrary-file}
I was under the impression that alias cdls='cd $@ && ls $@ would work, but
it looks like I was mistaken about $@ carrying the argument (file path)
since this sends me back to my $HOME directory every time.
No comments:
Post a Comment