aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-04-16 16:39:51 +1200
committerTom Ryder <tom@sanctum.geek.nz>2015-04-16 16:39:51 +1200
commit36c783f71f4b44f479f7f6d74cdce67731102908 (patch)
tree4598e3722ad7d851bb16b61ed7917ece7a09dd81 /bash/bashrc.d
parenthistverify for safety (diff)
downloaddotfiles-36c783f71f4b44f479f7f6d74cdce67731102908.tar.gz
dotfiles-36c783f71f4b44f479f7f6d74cdce67731102908.zip
Whoops, didn't mean to delete it
Diffstat (limited to 'bash/bashrc.d')
-rw-r--r--bash/bashrc.d/scp.bash9
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 "$@"
+}
+