Skip to content

Instantly share code, notes, and snippets.

@clifferson
Forked from grantm/gist:4367372
Last active December 10, 2015 07:09
Show Gist options
  • Save clifferson/4399205 to your computer and use it in GitHub Desktop.
Save clifferson/4399205 to your computer and use it in GitHub Desktop.
scp override function for when you forget the :.
# a useful addition to anyone's .bashrc
#
# Note, you don't want this function in effect on the remote host side of the scp transfer,
# so make sure to only define it for interactive shells, e.g.: wrap with: if [ ! -z "$PS1" ]
function scp() {
if echo "$@" | grep -q ':'
then
/usr/bin/scp "$@"
else
echo -e "\e[31;1mYou want to put your what in my where!?!?\e[0m"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment