- _ssh() and _known_hosts(): ssh config file directives are case-insensitive

This commit is contained in:
ianmacd 2002-05-13 21:43:29 +00:00
parent 7e08858b4c
commit b491877197

View File

@ -1,6 +1,6 @@
# bash_completion - some programmable completion functions for bash 2.05a # bash_completion - some programmable completion functions for bash 2.05a
# #
# $Id: bash_completion,v 1.314 2002/05/13 23:40:40 ianmacd Exp $ # $Id: bash_completion,v 1.315 2002/05/13 23:43:29 ianmacd Exp $
# #
# Copyright (C) Ian Macdonald <ian@caliban.org> # Copyright (C) Ian Macdonald <ian@caliban.org>
# #
@ -1582,9 +1582,9 @@ _known_hosts()
if [ ${#config[@]} -gt 0 ]; then if [ ${#config[@]} -gt 0 ]; then
# expand path (if present) to global known hosts file # expand path (if present) to global known hosts file
global_kh=$( eval echo $( sed -ne 's/^GlobalKnownHostsFile['$'\t '']*\(.*\)$/\1/p' ${config[@]} ) ) global_kh=$( eval echo $( sed -ne 's/^GlobalKnownHostsFile['$'\t '']*\(.*\)$/\1/ip' ${config[@]} ) )
# expand path (if present) to user known hosts file # expand path (if present) to user known hosts file
user_kh=$( eval echo $( sed -ne 's/^UserKnownHostsFile['$'\t '']*\(.*\)$/\1/p' ${config[@]} ) ) user_kh=$( eval echo $( sed -ne 's/^UserKnownHostsFile['$'\t '']*\(.*\)$/\1/ip' ${config[@]} ) )
fi fi
# choose which global known hosts file to use # choose which global known hosts file to use
@ -1668,7 +1668,7 @@ _ssh()
# get host aliases from config files # get host aliases from config files
if [ ${#config[@]} -gt 0 ]; then if [ ${#config[@]} -gt 0 ]; then
hosts=$( compgen -W "$( echo $( sed -ne "s/^Host["$'\t '"]*\([^*?]*\)$/\1/p" ${config[@]} ) )" -- $cur ) hosts=$( compgen -W "$( echo $( sed -ne "s/^Host["$'\t '"]*\([^*?]*\)$/\1/ip" ${config[@]} ) )" -- $cur )
COMPREPLY=( ${COMPREPLY[@]} $hosts ) COMPREPLY=( ${COMPREPLY[@]} $hosts )
fi fi