3 ##################################################################
6 # Written by Francois Fleuret #
7 # Contact <francois.fleuret@idiap.ch> for comments & bug reports #
10 ##################################################################
12 # You can add in your ~/.inputrc something like
13 # Control-h: "smarthist.sh\n"
14 # so that C-h will invoke this script
18 # We do not want a security breach
20 OUT=`mktemp /tmp/selector.XXXXXX`
24 ${EXE} -o ${OUT} -f ~/.bash_history
28 OLD_SETTINGS=`stty -g`
31 # Put the line we got into the tty buffer
33 writevt `tty` "`cat ${OUT}`"
35 # Set back the echo as it was
39 # Remove the file containing what we got from the selector