summaryrefslogtreecommitdiff
path: root/.zsh
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2013-10-22 16:35:30 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2013-10-22 16:36:26 +0200
commita9143229e92251062642a81eb4514e04f5035c0b (patch)
treef9e2ea212d5070eddeccd9965e9da424de5fa76a /.zsh
parent183835aa74e66f886a458ea21aeb9a7695e34a45 (diff)
downloaddotfiles-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/zshrc15
1 files changed, 14 insertions, 1 deletions
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 {{{