-
-
Save clifferson/4399205 to your computer and use it in GitHub Desktop.
scp override function for when you forget the :.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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