From a9143229e92251062642a81eb4514e04f5035c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Tue, 22 Oct 2013 16:35:30 +0200 Subject: Add cwd-spawn to urxvt to allow spawning a new terminal from the current working dir. --- .zsh/zshrc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to '.zsh') diff --git a/.zsh/zshrc b/.zsh/zshrc index 74974fd..87a5876 100644 --- a/.zsh/zshrc +++ b/.zsh/zshrc @@ -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 {{{ -- cgit v1.2.3