aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-01-15 12:00:39 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-01-15 12:27:21 +1300
commita583f7a2b1284ba68999d81492f3befe223cdd30 (patch)
treee82ddef8090ce22e12fb9843d96941bec8893409
parentcee464e67edd5124bfa954fd601fde5c4a939322 (diff)
downloaddotfiles-a583f7a2b1284ba68999d81492f3befe223cdd30.tar.gz
dotfiles-a583f7a2b1284ba68999d81492f3befe223cdd30.zip
Change double-quote printf pattern to single-quote
ShellCheck 0.4.7 pointed to this indirectly: In bin/sshi line 24: printf "%s:%u -> %s:%u (%s)\n" \ ^-- SC1117: Backslash is literal in "\n". Prefer explicit escaping: "\\n".
-rw-r--r--bin/sshi.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/sshi.sh b/bin/sshi.sh
index 0d1591f1..4872765d 100644
--- a/bin/sshi.sh
+++ b/bin/sshi.sh
@@ -20,7 +20,7 @@ printf '%s\n' "$SSH_CONNECTION" "${SSH_TTY:-unknown}" |
sh=$(dig -x "$si" +short 2>/dev/null | sed 's/\.$//;1q')
# Print the results in a human-readable format
- printf "%s:%u -> %s:%u (%s)\n" \
+ printf '%s:%u -> %s:%u (%s)\n' \
"${ch:-"$ci"}" "$cp" \
"${sh:-"$si"}" "$sp" \
"$tty"