diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-01-06 11:13:40 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-01-06 11:13:40 +1300 |
commit | b4bddc7c6b7f97504335a811575ec8b4231ff34e (patch) | |
tree | 8466fe813d72cbf07f581f27bbedc20ceb33945a /bin | |
parent | Add nlbr(1df) and brnl(1df) (diff) | |
download | dotfiles-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-x | bin/sshi | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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" -) +} |