diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-19 23:22:51 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-19 23:22:51 +1200 |
commit | 6daae9a75afa12f929be810a52ad21139233adfa (patch) | |
tree | 409f8935029dca341ee4809581d375bd3a42cae4 /sh/shrc.d/scp.sh | |
parent | Merge branch 'master' into freebsd (diff) | |
parent | Update documentation for br(1) and xgo(1) (diff) | |
download | dotfiles-6daae9a75afa12f929be810a52ad21139233adfa.tar.gz dotfiles-6daae9a75afa12f929be810a52ad21139233adfa.zip |
Merge branch 'master' into freebsd
Diffstat (limited to 'sh/shrc.d/scp.sh')
-rw-r--r-- | sh/shrc.d/scp.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sh/shrc.d/scp.sh b/sh/shrc.d/scp.sh new file mode 100644 index 00000000..cc46b229 --- /dev/null +++ b/sh/shrc.d/scp.sh @@ -0,0 +1,14 @@ +# Wrap scp(1) to check for missing colons +scp() { + # shellcheck disable=SC2048 + if [ "$#" -ge 2 ] ; then + case $* in + *:*) ;; + *) + printf >&2 'scp(): Missing colon, probably an error\n' + return 2 + ;; + esac + fi + command scp "$@" +} |