Alias for Multiple Sequential Commands?
How Do I Create an Alias C That Will Cd and Then Immediately Ls? Alias C='Cd; Ls' Is There Some Kind of Way to Insert a Special Variable That Represents the...
How do I create an alias c that will cd and then immediately ls?
alias c='cd; ls'
Is there some kind of way to insert a special variable that represents the input? Or is that not the way that alias operates at all?
1 Answer
Correct. Use a function instead.
c() { cd "$1" ; ls ; }