diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2013-10-22 16:35:30 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2013-10-22 16:36:26 +0200 |
commit | a9143229e92251062642a81eb4514e04f5035c0b (patch) | |
tree | f9e2ea212d5070eddeccd9965e9da424de5fa76a /.zsh | |
parent | 183835aa74e66f886a458ea21aeb9a7695e34a45 (diff) | |
download | dotfiles-a9143229e92251062642a81eb4514e04f5035c0b.tar.gz dotfiles-a9143229e92251062642a81eb4514e04f5035c0b.tar.bz2 dotfiles-a9143229e92251062642a81eb4514e04f5035c0b.zip |
Add cwd-spawn to urxvt to allow spawning a new terminal from the current
working dir.
Diffstat (limited to '.zsh')
-rw-r--r-- | .zsh/zshrc | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -194,7 +194,19 @@ _set_title () { echo -ne "${pre}${USER}@${HOST}:${PWD/$HOME/~}${post}" } -chpwd_functions=( ${chpwd_functions} _set_title ) +_set_cwd () { + local update="\0033]777;cwd-spawn;path;$PWD\0007" + + case $TERM in + screen*) + # pass through to parent terminal emulator + update="\0033P$update\0033\\";; + esac + + echo -ne "$update" +} + +chpwd_functions=( ${chpwd_functions} _set_title _set_cwd ) case $TERM in xterm*) @@ -205,6 +217,7 @@ esac # exec once for initialization _set_title +_set_cwd # }}} # Key bindings {{{ |