From a85d6c53c428012bd48b32279f290a7b0616ef2f Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Thu, 23 Feb 2023 14:25:33 +0100 Subject: [PATCH] zsh:keys:go-shcwd: Only exclude exact $PWD Fix the grep call to only exclude lines that are exactly the PWD instead of containing it. --- .config/zsh/zshrc.d/60-keys.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/zsh/zshrc.d/60-keys.zsh b/.config/zsh/zshrc.d/60-keys.zsh index 3e378f1..0e6e208 100644 --- a/.config/zsh/zshrc.d/60-keys.zsh +++ b/.config/zsh/zshrc.d/60-keys.zsh @@ -203,7 +203,7 @@ ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(cmd-on-enter) # Fuzzy PWD selector of all open shells function go-shcwd { - dir="$(shcwd | grep -vF "$PWD" | fzf)" + dir="$(shcwd | grep -vFx "$PWD" | fzf)" [[ -z $dir ]] || pushd -q "$dir" redraw-prompt }