aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-01-06 11:13:40 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-01-06 11:13:40 +1300
commitb4bddc7c6b7f97504335a811575ec8b4231ff34e (patch)
tree8466fe813d72cbf07f581f27bbedc20ceb33945a /bin
parentAdd nlbr(1df) and brnl(1df) (diff)
downloaddotfiles-b4bddc7c6b7f97504335a811575ec8b4231ff34e.tar.gz
dotfiles-b4bddc7c6b7f97504335a811575ec8b4231ff34e.zip
Replace subshell in sshi(1df) with compound cmd
It doesn't need to be a subshell and probably already is one in all non-ksh shells
Diffstat (limited to 'bin')
-rwxr-xr-xbin/sshi8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/sshi b/bin/sshi
index bf710b8a..80e00a10 100755
--- a/bin/sshi
+++ b/bin/sshi
@@ -7,9 +7,9 @@ if [ -z "$SSH_CONNECTION" ] ; then
exit 1
fi
-# Print the two variables into a subshell so we can chop them up with read
-printf '%s\n' "$SSH_CONNECTION" "${SSH_TTY:-unknown}" | (
-
+# Print the two variables into a compound command so we can `read` them
+printf '%s\n' "$SSH_CONNECTION" "${SSH_TTY:-unknown}" |
+{
# Read connection details from first line
read -r ci cp si sp
@@ -25,4 +25,4 @@ printf '%s\n' "$SSH_CONNECTION" "${SSH_TTY:-unknown}" | (
"${ch:-"$ci"}" "$cp" \
"${sh:-"$si"}" "$sp" \
"$tty"
-)
+}