Automatically ls after a cd

See: Improved Version

I’ve been meaning to get around to this for a while. I finally googled a solution.

Put this in your .bashrc:

alias cdd="builtin cd"
cd () {
  builtin cd "$*"
  if [ $? -eq 0 ]; then
    ls
  fi
}

Source

I’m only running the original fix right now, I had some issue with the “fixed” Tsubashi version in the source’s comments. I’ll have to take a look at it sometime.

Leave a Reply

Your email address will not be published. Required fields are marked *