scp: Treat strings with slash before colon or starting with [.~] as local.
This commit is contained in:
parent
ff11fed5f8
commit
41a37d7679
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user