aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorLukas Fürmetz <fuermetz@mailbox.org>2019-08-03 15:35:39 +0200
committerGitHub <noreply@github.com>2019-08-03 15:35:39 +0200
commit887025823b22a3ca5cdaacbba6e0bf771a68b154 (patch)
tree57bccec4d8fb93956791a8a0eb8b7c42881f549a /README.md
parent3d0b5e4c46e66b37b258e948469f7c010d49c077 (diff)
parentdd012fa9986171221c0bce9d9fdb64332e1044a1 (diff)
Merge pull request #110 from akermu/directory_tracking
Add directory tracking via OSC callback
Diffstat (limited to 'README.md')
-rw-r--r--README.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/README.md b/README.md
index 9ab5e0a..4f84f1f 100644
--- a/README.md
+++ b/README.md
@@ -94,6 +94,25 @@ color you like:
- vterm-color-cyan
- vterm-color-white
+## Directory tracking
+
+For `zsh` put this in your `.zshrc`:
+
+```zsh
+function chpwd() {
+ echo -e "\e]51;$(pwd)\e\\"
+}
+```
+
+For bash there's no real change directory hook, so you have to rewrite the cd
+command (please als have a look the answers [here](https://unix.stackexchange.com/q/170279)):
+
+```bash
+cd() {
+ builtin cd "$@" || return
+ [ "$OLDPWD" = "$PWD" ] || echo -e "\e]51;$(pwd)\e\\"
+}
+```
## Related packages