aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--vterm-module.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/README.md b/README.md
index 00107b4..eb332b4 100644
--- a/README.md
+++ b/README.md
@@ -100,7 +100,7 @@ For `zsh` put this in your `.zshrc`:
```zsh
function chpwd() {
- print -Pn "\e]51;$(pwd)\e\\";
+ print -Pn "\e]51;A$(pwd)\e\\";
}
```
@@ -110,7 +110,7 @@ command (please als have a look the answers [here](https://unix.stackexchange.co
```bash
cd() {
builtin cd "$@" || return
- [ "$OLDPWD" = "$PWD" ] || echo -e "\e]51;$(pwd)\e\\"
+ [ "$OLDPWD" = "$PWD" ] || echo -e "\e]51;A$(pwd)\e\\"
}
```
@@ -120,7 +120,7 @@ Put this in your *remote* .zshrc:
```zsh
function chpwd() {
- print -Pn "\e]51;$(whoami)@$(hostname):$(pwd)\e\\"
+ print -Pn "\e]51A;$(whoami)@$(hostname):$(pwd)\e\\"
}
```
diff --git a/vterm-module.c b/vterm-module.c
index d47cb61..a4f9918 100644
--- a/vterm-module.c
+++ b/vterm-module.c
@@ -654,13 +654,13 @@ static int osc_callback(const char *command, size_t cmdlen, void *user) {
buffer[cmdlen] = '\0';
memcpy(buffer, command, cmdlen);
- if (cmdlen > 3 && buffer[0] == '5' && buffer[1] == '1' && buffer[2] == ';') {
+ if (cmdlen > 4 && buffer[0] == '5' && buffer[1] == '1' && buffer[2] == ';'&& buffer[3] == 'A') {
if (term->directory != NULL) {
free(term->directory);
term->directory = NULL;
}
- term->directory = malloc(cmdlen - 3 + 1);
- strcpy(term->directory, &buffer[3]);
+ term->directory = malloc(cmdlen - 4 + 1);
+ strcpy(term->directory, &buffer[4]);
term->directory_changed = true;
return 1;
}