3 ms·
scripting is your friend: $ function newcd(){ cd $1; ls;} $ alias cd=newcd $ cd .. $ cd Desktop EDIT: I had accidentally put a "$1" in the ls command, now
by maerF0x0 14y ago
scripting is your friend:
$ function newcd(){ cd $1; ls;}
$ alias cd=newcd
$ cd ..
$ cd Desktop
EDIT: I had accidentally put a "$1" in the ls command, now removed.
- jiyinyiyong 14y agoThat's my solution right now. There's a bug I don't kown if you can grt rid of it or not. When I type `cd a\ dir`, it works, while `c a\ dir` fails. `$1` seems not to cover the whole parameter. Can you fix this?