projects
/
selector.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
79409fb
)
Set the maximum size of the history to 1000 lines.
author
Francois Fleuret
<francois@fleuret.org>
Tue, 25 Oct 2011 06:37:19 +0000
(08:37 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Tue, 25 Oct 2011 06:37:19 +0000
(08:37 +0200)
bash-selector.sh
patch
|
blob
|
history
diff --git
a/bash-selector.sh
b/bash-selector.sh
index
abf4059
..
64cda91
100755
(executable)
--- a/
bash-selector.sh
+++ b/
bash-selector.sh
@@
-17,8
+17,6
@@
# Contact <francois.fleuret@idiap.ch> for comments & bug reports #
#########################################################################
# Contact <francois.fleuret@idiap.ch> for comments & bug reports #
#########################################################################
-set -e
-
# Selector based history
function selector-history () {
# Selector based history
function selector-history () {
@@
-38,7
+36,11
@@
function selector-cd () {
else
cd "$@"
fi
else
cd "$@"
fi
- echo $PWD | sed -e "s!${HOME}!~!" >> ${SELECTOR_CD_HISTORY}
+ TMP=$(mktemp /tmp/selector-cd.XXXXXX)
+ tail -1000 < ${SELECTOR_CD_HISTORY} > ${TMP}
+ echo $PWD | sed -e "s!${HOME}!~!" >> ${TMP}
+ cat ${TMP} > ${SELECTOR_CD_HISTORY}
+ rm -f ${TMP}
}
function selector-cd-search () {
}
function selector-cd-search () {