aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc.d/scp.sh
blob: cc46b229faa6616cf2729a50b94c6f81869ed5e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Wrap scp(1) to check for missing colons
scp() {
    # shellcheck disable=SC2048
    if [ "$#" -ge 2 ] ; then
        case $* in
            *:*) ;;
            *)
                printf >&2 'scp(): Missing colon, probably an error\n'
                return 2
                ;;
        esac
    fi
    command scp "$@"
}