5 ms·
Why not a program or script put “ls” after I enter cd .. or cd – ?
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.
- sglane 10y agoThe folder you just changed into has 30,000 files and you're ssh'd in over a slow network.
- rajasimon 10y agoha ha! I never expected that!
- detaro 10y agoIt 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.
- rajasimon 10y agocan you explain bit more ? how ?
- deleted 10y ago[deleted]
- neeksHN 10y agoIn Unix one could always write a function (not alias because it requires a parameter) that does this - http://askubuntu.com/questions/16106/how-can-i-create-an-alias-for-cd-and-ls http://askubuntu.com/questions/16106/how-can-i-create-an-ali.... I'm sure there's equivalents in Command Prompt/PowerShell as well. Better for the shells' builtins to be simple and extendable - rather than be optionated.
- tsukikage 10y agocd_(){ cd $* ls } alias cd=cd_ hope that helps, have a nice day
- rajasimon 10y agooh wow... this is what I exactly look for...