diff options
author | Jonas Smedegaard <dr@jones.dk> | 2016-10-22 13:39:11 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2016-10-22 13:54:35 +0200 |
commit | 6894d585ff50ed1f48e973f358c5171fb08fa87f (patch) | |
tree | a9268a19faa7a35ec253d6fb21576111b2aa1724 | |
parent | 99dcf872d0d77130559f54abe4a367fb1843668d (diff) |
Simplify stripping @ from host.
-rwxr-xr-x | xsh | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 |