aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-07-05 19:54:49 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-07-05 19:54:49 -0700
commit641452dc964c6807aef17ca47e02da798152dc04 (patch)
tree681655135cf080b02bfbc9b42106cc00952c9ffa
parentf5ebe5f2b8507a59b3c6c0c7c0336a25eae61cc9 (diff)
Fix for bcd on zsh
-rw-r--r--README.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/README.md b/README.md
index 6e0664a..77c1af5 100644
--- a/README.md
+++ b/README.md
@@ -131,7 +131,11 @@ bind '"\C-b":"bcd\n"'
For zsh, instead put this in your `~/.zshrc`:
```zsh
-bcd() { cd "$(bb -d "$@" <$TTY)"; }
+bcd() { # Change directory with bb
+ cd "$(bb -d "$@" <$TTY)"
+ precmd >/dev/null 2>/dev/null # If precmd sets your $PS1, you may need to re-run it
+ zle reset-prompt
+}
zle -N bcd
bindkey '^B' bcd
```