aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/scp.bash
blob: cd2f8521bdcb3afdda5f894927fcadbb7b395d7e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
# Wrap scp(1) to check for missing colons
scp() {
    # shellcheck disable=SC2048
    if (($# >= 2)) && [[ $* != *:* ]] ; then
        printf 'bash: %s: Missing colon, probably an error\n' \
            "$FUNCNAME" >&2
        return 2
    fi
    command scp "$@"
}