Why not a program or script put “ls” after I enter cd .. or cd – ?

1 points by rajasimon ↗ HN
Every time I enter into folder or back I'm curious to know what inside the folder. So why not the program can inject every time when I use " cd ". I know this may can't be done. I just expecting reviews from developer perspective.

8 comments

[ 2.9 ms ] story [ 30.5 ms ] thread
The folder you just changed into has 30,000 files and you're ssh'd in over a slow network.
It would create a lot of noise with large folders, but if you want that behavior you can just replace "cd" with an alias in your shell that does what you want.
can you explain bit more ? how ?
(comment deleted)
cd_(){

cd $*

ls

}

alias cd=cd_

hope that helps, have a nice day

oh wow... this is what I exactly look for...