浏览代码

Allow mac zsh to keep current working directory

Andrew Swistak 11 年之前
父节点
当前提交
f4c85ddc6b
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      zshrc

+ 4 - 0
zshrc

@@ -29,6 +29,10 @@ alias vimdiff="mvimdiff"
 # OS X completions
 fpath=(/usr/local/share/zsh-completions $fpath)
 
+# OS X keep current PWD when opening new tabs/windows
+precmd () {print -Pn "\e]2; %~/ \a"}
+preexec () {print -Pn "\e]2; %~/ \a"}
+
 # Set Home, End, Del, PgUp, PgDown keys to actually do something.
 bindkey '^[OH' beginning-of-line
 bindkey '^[OF' end-of-line