diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2012-12-08 10:37:07 +0200 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2012-12-08 10:37:07 +0200 |
commit | 41a37d767940af7928282874618e3dc60549de54 (patch) | |
tree | 139f02365f69212db5254750d909af27c6159d9a | |
parent | ff11fed5f8f1d73b02d515da3af335644807ab4d (diff) | |
download | bash-completion-41a37d767940af7928282874618e3dc60549de54.tar.gz |
scp: Treat strings with slash before colon or starting with [.~] as local.
-rw-r--r-- | completions/ssh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/completions/ssh b/completions/ssh index 590ad88d..9030aab6 100644 --- a/completions/ssh +++ b/completions/ssh @@ -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} |