diff options
-rw-r--r-- | bash/bashrc.d/scp.bash | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bash/bashrc.d/scp.bash b/bash/bashrc.d/scp.bash new file mode 100644 index 00000000..3d5fc1dd --- /dev/null +++ b/bash/bashrc.d/scp.bash @@ -0,0 +1,9 @@ +# Wrap scp to check for missing colons +scp() { + if (($# >= 2)) && [[ $* != *:* ]] ; then + printf 'scp: Missing colon, probably an error\n' >&2 + return 1 + fi + command scp "$@" +} + |