[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 2.0-81-g41a37d7

Ville Skyttä ville.skytta at iki.fi
Sat Dec 8 08:40:44 UTC 2012


The following commit has been merged in the master branch:
commit 41a37d767940af7928282874618e3dc60549de54
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sat Dec 8 10:37:07 2012 +0200

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

diff --git a/completions/ssh b/completions/ssh
index 590ad88..9030aab 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}

-- 
bash-completion



More information about the Bash-completion-commits mailing list