Damien Miller:

> CVSROOT:      /cvs
> Module name:  src
> Changes by:   d...@cvs.openbsd.org    2021/08/02 17:38:27
> 
> Modified files:
>       usr.bin/ssh    : scp.1 scp.c 
>       usr.bin/ssh/scp: Makefile 
> 
> Log message:
> support for using the SFTP protocol for file transfers in scp, via a
> new "-M sftp" option. Marked as experimental for now.
[...]

You want to test this but
* are tired of typing "-M sftp" all the time, and
* can't use alias scp='scp -M sftp' because you frequently use -3?

Here you go, this simple wrapper should take care of it:

------------------->
#!/bin/sh

sftp='-M sftp'

while getopts :12346ABCTdfpqrtvD:F:J:M:P:S:c:i:l:o: name; do
        case $name in
        [3M])   sftp='' ;;
        esac
done

exec /usr/bin/scp $sftp "$@"
<-------------------

-- 
Christian "naddy" Weisgerber                          na...@mips.inka.de

Reply via email to