projects
/
selector.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
106d4dc
)
Fixed redirections to make them noclobber-compliant (Andrew Martin)
author
Francois Fleuret
<francois@fleuret.org>
Mon, 22 Jun 2015 14:34:31 +0000
(16:34 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Mon, 22 Jun 2015 14:34:31 +0000
(16:34 +0200)
bash-selector.sh
patch
|
blob
|
history
diff --git
a/bash-selector.sh
b/bash-selector.sh
index
dc7373b
..
661d4f0
100755
(executable)
--- a/
bash-selector.sh
+++ b/
bash-selector.sh
@@
-72,8
+72,8
@@
function selector-cd () {
if [[ -f "${SELECTOR_CD_HISTORY}" ]]; then
TMP=$(mktemp /tmp/selector-cd.XXXXXX)
- tail -$((SELECTOR_CD_HISTORY_SIZE-1)) < "${SELECTOR_CD_HISTORY}" > "${TMP}" && \
- cat "${TMP}" > "${SELECTOR_CD_HISTORY}"
+ tail -$((SELECTOR_CD_HISTORY_SIZE-1)) < "${SELECTOR_CD_HISTORY}" >
|
"${TMP}" && \
+ cat "${TMP}" >
|
"${SELECTOR_CD_HISTORY}"
\rm -f "${TMP}"
fi