mirror of
https://repo.or.cz/socat.git
synced 2025-07-13 23:13:24 +00:00
socat V1.6.0.0 (initial GIT commit)
This commit is contained in:
commit
b819572f5e
170 changed files with 59193 additions and 0 deletions
30
readline.sh
Executable file
30
readline.sh
Executable file
|
@ -0,0 +1,30 @@
|
|||
#! /bin/bash
|
||||
# $Id: readline.sh,v 1.3 2004/08/25 15:52:59 gerhard Exp $
|
||||
# Copyright Gerhard Rieger 2003-2004
|
||||
# Published under the GNU General Public License V.2, see file COPYING
|
||||
|
||||
# this is an attempt for a socat based readline wrapper
|
||||
# usage: readline.sh <command>
|
||||
|
||||
withhistfile=1
|
||||
|
||||
while true; do
|
||||
case "X$1" in
|
||||
X-nh|X-nohist*) withhistfile=; shift; continue ;;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
|
||||
PROGRAM="$@"
|
||||
if [ "$withhistfile" ]; then
|
||||
HISTFILE="$HOME/.$1_history"
|
||||
HISTOPT=",history=$HISTFILE"
|
||||
else
|
||||
HISTOPT=
|
||||
fi
|
||||
mkdir -p /tmp/$USER || exit 1
|
||||
#
|
||||
#
|
||||
|
||||
exec socat -d readline"$HISTOPT",noecho='[Pp]assword:' exec:"$PROGRAM",sigint,pty,setsid,ctty,raw,echo=0,stderr 2>/tmp/$USER/stderr2
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue