Skip to content

Instantly share code, notes, and snippets.

@mattmc3
Created June 30, 2022 23:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mattmc3/0d0948c3af752f5fe474dcf0b4bae664 to your computer and use it in GitHub Desktop.
Zsh cd-ls
# 'ls' after every 'cd'
if ! (( $chpwd_functions[(I)chpwd_cdls] )); then
chpwd_functions+=(chpwd_cdls)
fi
function chpwd_cdls() {
if [[ -o interactive ]]; then
emulate -L zsh
ls
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment