summaryrefslogtreecommitdiff
path: root/xsh
diff options
context:
space:
mode:
Diffstat (limited to 'xsh')
-rwxr-xr-xxsh6
1 files changed, 2 insertions, 4 deletions
diff --git a/xsh b/xsh
index 9324a6e..1391640 100755
--- a/xsh
+++ b/xsh
@@ -37,7 +37,8 @@ while [ $# -gt 0 ]; do
--port|-p) ssh_opts="$ssh_opts -p $2"; shift;;
--) shift; break;;
-*) usage; exit 1;;
- *@*|@*) HOST=$1;;
+ @*) HOST=${1#@};;
+ *@*) HOST=$1;;
*) break;;
esac
shift
@@ -73,9 +74,6 @@ case "$HOST" in
termwrapper $prg
fi
;;
- @*)
- HOST=$(echo "$HOST" | sed 's/^@//')
- ;;&
*)
if [ -n "$SU" ]; then
termwrapper ssh $ssh_opts $HOST $prg_su