- Published on
List Directory After CDing by Default
- Authors
- Name
- Yair Mark
- @yairmark
When using a Linux or Unix environment I often find myself lsing a directory after cding into it. I found a nice way of doing this here.
To streamline my workflow a bit I added the following commandline function to my .zshrc file. It replaces the standard cd with a cd and ls:
function cd () {
builtin cd "$@" && pwd && ls -F
}
This has to be done in your rc file. Trying to source it from another folder doe not work properly.