From 7072c10ae223e24f601b3ee99e89dfcc35397122 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 25 Mar 2007 12:51:43 +0000 Subject: users/11333: fix users-hosts for ssh when user matched --- Completion/Unix/Command/_ssh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Completion/Unix/Command/_ssh') diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh index 11be5d1d0..c52b38c3e 100644 --- a/Completion/Unix/Command/_ssh +++ b/Completion/Unix/Command/_ssh @@ -326,11 +326,12 @@ _ssh_hosts () { local config integer ind + # If users-hosts matches, we shouldn't complete anything else. if [[ "$IPREFIX" == *@ ]]; then - _combination -s '[:@]' my-accounts users-hosts "users=${IPREFIX/@}" hosts "$@" + _combination -s '[:@]' my-accounts users-hosts "users=${IPREFIX/@}" hosts "$@" && return else _combination -s '[:@]' my-accounts users-hosts \ - ${opt_args[-l]:+"users=${opt_args[-l]:q}"} hosts "$@" + ${opt_args[-l]:+"users=${opt_args[-l]:q}"} hosts "$@" && return fi if (( ind = ${words[(I)-F]} )); then config=${~words[ind+1]} -- cgit 1.4.1