Skip to content

Instantly share code, notes, and snippets.

@davidcelis
Created July 22, 2011 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidcelis/1100206 to your computer and use it in GitHub Desktop.
Save davidcelis/1100206 to your computer and use it in GitHub Desktop.
To make zsh behave like bash and preserve current working directory when opening a new shell
# Auto-restore paths on launch
if [ $(uname) = "Darwin" ]; then
precmd () { print -Pn "\e]7;file://%M${PWD// /%%20}\a" }
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment