From 9ab77834b683d83a47b3f7327138ed14e3ab35cf Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Sat, 21 Jul 2012 10:36:51 +0200 Subject: [PATCH] Fixed a bug when checking the existence of a dir in selector-cd-search. --- bash-selector.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash-selector.sh b/bash-selector.sh index 87df02c..38991b1 100755 --- a/bash-selector.sh +++ b/bash-selector.sh @@ -77,7 +77,7 @@ function selector-cd-search () { PATH_TEMP=$(mktemp /tmp/selector-cd-path.XXXXXX) selector -j -y -u -t "cd" -l 1000 -d -i -c 7,2,0,3 -o ${PATH_TEMP} -q ${SELECTOR_CD_HISTORY} NEW_PATH="$(cat ${PATH_TEMP} | sed -e 's!~!'${HOME}'!')" - if [[ -s "${NEW_PATH}" ]]; then + if [[ -d "${NEW_PATH}" ]]; then selector-cd "$(cat ${PATH_TEMP} | sed -e 's!^~!'${HOME}'!')" fi \rm ${PATH_TEMP} -- 2.39.5