zsh for emacs default-directory

This commit is contained in:
guobao.jiang 2015-07-12 22:20:32 +08:00
parent a7a39f280d
commit 8bbca9b867
1 changed files with 7 additions and 0 deletions

View File

@ -55,3 +55,10 @@ zstyle ':completion:*' verbose true
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
## 为emacs提供default-directory自动更新
if [ -n "$INSIDE_EMACS" ]; then
chpwd() { print -P "\033AnSiTc %d" }
print -P "\033AnSiTu %n"
print -P "\033AnSiTc %d"
fi