3 # Copyright Gerhard Rieger and contributors (see file CHANGES)
4 # Published under the GNU General Public License V.2, see file COPYING
6 # this is an attempt for a socat based readline wrapper
7 # usage: readline.sh <command>
13 X-nh|X-nohist
*) withhistfile
=; shift; continue ;;
19 if [ "$withhistfile" ]; then
20 HISTFILE
="$HOME/.$1_history"
21 HISTOPT
=",history=$HISTFILE"
25 mkdir
-p /tmp
/$USER ||
exit 1
29 exec socat
-d readline
"$HISTOPT",noecho
='[Pp]assword:' exec:"$PROGRAM",sigint
,pty
,setsid
,ctty
,raw
,echo=0,stderr
2>/tmp
/$USER/stderr2