From fd3a1f581d47e1dbf0a4db57734bc5c1e4b617e8 Mon Sep 17 00:00:00 2001 From: omri Date: Sat, 8 Jul 2023 15:20:41 +0300 Subject: [PATCH] Fix - fzfcd would quit when no path is chosen and cd to ~ --- .config/scripts/util/cdfzf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/scripts/util/cdfzf b/.config/scripts/util/cdfzf index 748d522..8fff559 100644 --- a/.config/scripts/util/cdfzf +++ b/.config/scripts/util/cdfzf @@ -3,4 +3,6 @@ selection=$(fzf) selection=$(echo $selection | sed 's,/[^/]*$,,') -cd $selection +if [ ! $selection = "\S" ]; then + cd $selection +fi