[Bash-completion-commits] [SCM] bash-completion branch, master, updated. cdf0e826869e797c0ecc1d4ff98f329e99005a9e

Freddy Vulto (none) freddy at rebase.
Wed Jun 17 21:46:37 UTC 2009


The following commit has been merged in the master branch:
commit cdf0e826869e797c0ecc1d4ff98f329e99005a9e
Author: Freddy Vulto <freddy at rebase.(none)>
Date:   Wed Jun 17 23:45:00 2009 +0200

    Fix contrib/ssh command completion
    Only complete with command names (compgen -c) if argc > 1

diff --git a/contrib/ssh b/contrib/ssh
index 8a9993a..f50d07f 100644
--- a/contrib/ssh
+++ b/contrib/ssh
@@ -95,7 +95,9 @@ _ssh()
 			shift
 		done
 		_known_hosts_real -a "$optconfigfile" -h "$cur"
-		COMPREPLY=( "${COMPREPLY[@]}" $( compgen -c -- $cur ) )
+		if [ $COMP_CWORD -ne 1 ]; then
+			COMPREPLY=( "${COMPREPLY[@]}" $( compgen -c -- $cur ) )
+		fi
 	fi
 
 	return 0

-- 
bash-completion



More information about the Bash-completion-commits mailing list