News for hackers. Stuff that matters.
Re:Show HN: ssh and cd get married by bkase on Wednesday February 12, 2014 @07:38AM (#7223923)
I like to take advantage of temporal locality. My zshrc is configured to take me to the most recent place that I have been whenever I open a new shell:

  autoload -U add-zsh-hook
  record_pwd() { pwd > ~/.cwd }
  add-zsh-hook chpwd record_pwd
  touch ~/.cwd
  cd `cat ~/.cwd`

There are no comments on this comment yet.