Browse Source

Extra params handling in SSH wrapper. Closes krishnasrinivas/wetty#130

pull/139/head
Oleg Kurapov 6 years ago
committed by Cian Butler
parent
commit
6d80e3895d
  1. 6
      bin/ssh

6
bin/ssh

@ -1,6 +1,6 @@
#!/usr/bin/env sh
userAtAddress="$1"
userAtAddress="$1"; shift
USER=$(echo "$userAtAddress" | cut -d"@" -f1);
HOST=$(echo "$userAtAddress" | cut -d"@" -f2);
@ -9,7 +9,7 @@ then
printf "Enter your username: "
read -r USER
USER=$(echo "${USER}" | tr -d '[:space:]')
ssh "$USER"@"$HOST"
ssh "$USER"@"$HOST" ${@}
else
ssh "$userAtAddress"
ssh "$userAtAddress" ${@}
fi

Loading…
Cancel
Save