From cac78e3408f72a96860356cd22ad38efc1e0067e Mon Sep 17 00:00:00 2001 From: ianmacd <> Date: Sat, 11 May 2002 15:22:12 +0000 Subject: [PATCH] - _ssh(): fix newline from making it into compgen -W and consuming all of system memory --- bash_completion | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bash_completion b/bash_completion index 066ceab1..d98eeb38 100644 --- a/bash_completion +++ b/bash_completion @@ -1,6 +1,6 @@ # bash_completion - some programmable completion functions for bash 2.05a # -# $Id: bash_completion,v 1.311 2002/05/11 09:28:58 ianmacd Exp $ +# $Id: bash_completion,v 1.312 2002/05/11 17:22:12 ianmacd Exp $ # # Copyright (C) Ian Macdonald # @@ -1668,7 +1668,7 @@ _ssh() # get host aliases from config files if [ ${#config[@]} -gt 0 ]; then - hosts=$( compgen -W "$( sed -ne "s/^Host["$'\t '"]*\([^*?]*\)$/\1/p" ${config[@]} )" -- $cur) + hosts=$( compgen -W "$( echo $( sed -ne "s/^Host["$'\t '"]*\([^*?]*\)$/\1/p" ${config[@]} ) )" -- $cur ) COMPREPLY=( ${COMPREPLY[@]} $hosts ) fi