diff options
| author | Lukas Fürmetz <fuermetz@mailbox.org> | 2019-08-03 15:35:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-03 15:35:39 +0200 |
| commit | 887025823b22a3ca5cdaacbba6e0bf771a68b154 (patch) | |
| tree | 57bccec4d8fb93956791a8a0eb8b7c42881f549a /README.md | |
| parent | 3d0b5e4c46e66b37b258e948469f7c010d49c077 (diff) | |
| parent | dd012fa9986171221c0bce9d9fdb64332e1044a1 (diff) | |
Merge pull request #110 from akermu/directory_tracking
Add directory tracking via OSC callback
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -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 |
