Bugfix: renamed the internal variables $USER and $HOST to $RUSER and $RHOST,

because $USER will be inherited to the shell within the term.
This commit is contained in:
heinzel
2006-11-11 18:35:38 +00:00
parent c6e6deed89
commit 0e62dbc88f

View File

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# ~/scripts/xtermmaker.sh # ~/scripts/xtermmaker.sh
# $Id: xtermmaker.sh,v 1.9 2006/02/10 11:43:53 heinzel Exp $ # $Id: xtermmaker.sh,v 1.10 2006/11/11 18:35:38 heinzel Exp $
VERSION='XTermMaker Version 4.1 $Revision: 1.9 $ ($Date: 2006/02/10 11:43:53 $ $Author: heinzel $)' VERSION='XTermMaker Version 4.2 $Revision: 1.10 $ ($Date: 2006/11/11 18:35:38 $ $Author: heinzel $)'
### config ### ### config ###
CONFIG="${HOME}/.xtermmakerrc" CONFIG="${HOME}/.xtermmakerrc"
@@ -16,8 +16,8 @@ XTERM="xterm"
XTERM_OPTS="-sb -sl 1024" XTERM_OPTS="-sb -sl 1024"
RSH="ssh" RSH="ssh"
HOST="" RHOST=""
USER="" RUSER=""
# if cols > 0, we arange the possitions of the xterms in $cols columns # if cols > 0, we arange the possitions of the xterms in $cols columns
COLS=0 COLS=0
@@ -191,12 +191,12 @@ while test $# -gt 0 ; do
shift shift
;; ;;
-u|-user|--user) -u|-user|--user)
USER="$2" RUSER="$2"
shift shift
shift shift
;; ;;
-r|-host|--host) -r|-host|--host)
HOST="$2" RHOST="$2"
shift shift
shift shift
;; ;;
@@ -301,10 +301,10 @@ until test $xterm_count -gt $NUMBER ; do
pos_opt="" pos_opt=""
fi fi
if test "X${HOST}" != "X" ; then if test "X${RHOST}" != "X" ; then
t="$HOST" t="$RHOST"
if test "X${USER}" != "X" ; then if test "X${RUSER}" != "X" ; then
t="${USER}@${HOST}" t="${RUSER}@${RHOST}"
fi fi
exec_opt="-e $RSH $t" exec_opt="-e $RSH $t"
fi fi