scp: Treat strings with slash before colon or starting with [.~] as local.

This commit is contained in:
Ville Skyttä 2012-12-08 10:37:07 +02:00
parent ff11fed5f8
commit 41a37d7679

View File

@ -343,10 +343,10 @@ _scp()
_expand || return 0
if [[ "$cur" == *:* ]]; then
_scp_remote_files
return 0
fi
case $cur in
!(*:*)/*|[.~]*) ;; # looks like a path
*:*) _scp_remote_files ; return 0 ;;
esac
if [[ "$cur" == -F* ]]; then
cur=${cur#-F}