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 input? Or is that not the way that alias operates at all?
1 Answer
Correct. Use a function instead.
c() { cd "$1" ; ls ; } 2