projects
/
selector.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f83ef2
)
Fixed a bug when checking the existence of a dir in selector-cd-search.
author
Francois Fleuret
<francois@fleuret.org>
Sat, 21 Jul 2012 08:36:51 +0000
(10:36 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Sat, 21 Jul 2012 08:36:51 +0000
(10:36 +0200)
bash-selector.sh
patch
|
blob
|
history
diff --git
a/bash-selector.sh
b/bash-selector.sh
index
87df02c
..
38991b1
100755
(executable)
--- 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}