Sample Header Ad - 728x90

How to make alias trailing with space hack works with parameter supplied

1 vote
3 answers
910 views
I have two aliases watchExpand and l. I know that you can make bash expansion work with aliases by placing a trailing space like so: alias watchExpand='watch ' l is aliased to ls -larthiF --context. So when I type the command watchExpand l it works like a charm. However if I supply a parameter to watchExpand command, e.g. watchExpand -n 1 l My l alias no longer works. How can I get bash expansion after arguments?
Asked by 林果皞 (5546 rep)
Oct 21, 2016, 05:47 PM
Last activity: Feb 15, 2024, 10:56 AM