# Contact <francois.fleuret@idiap.ch> for comments & bug reports #
#########################################################################
-set -e
-
# Selector based history
function selector-history () {
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 () {