- in known hosts completion, check for known hosts files in

/etc/ssh/ssh_known_hosts and /etc/ssh/ssh_known_hosts2
This commit is contained in:
ianmacd 2002-12-23 07:51:39 +00:00
parent 5f037f4730
commit cf5e81465d

View File

@ -1,6 +1,6 @@
# bash_completion - some programmable completion functions for bash 2.05b # bash_completion - some programmable completion functions for bash 2.05b
# #
# $Id: bash_completion,v 1.495 2002/12/22 18:45:02 ianmacd Exp $ # $Id: bash_completion,v 1.496 2002/12/23 08:51:39 ianmacd Exp $
# #
# Copyright (C) Ian Macdonald <ian@caliban.org> # Copyright (C) Ian Macdonald <ian@caliban.org>
# #
@ -1829,8 +1829,10 @@ _known_hosts()
if [ -r "$global_kh" ]; then if [ -r "$global_kh" ]; then
kh=( "$global_kh" ) kh=( "$global_kh" )
else else
[ -r /etc/known_hosts ] && kh[0]=/etc/known_hosts [ -r /etc/ssh/ssh_known_hosts ] && kh[0]=/etc/ssh/ssh_known_hosts
[ -r /etc/known_hosts2 ] && kh[1]=/etc/known_hosts2 [ -r /etc/ssh/ssh_known_hosts2 ] && kh[1]=/etc/ssh/ssh_known_hosts2
[ -r /etc/known_hosts ] && kh[0]=/etc/known_hosts
[ -r /etc/known_hosts2 ] && kh[1]=/etc/known_hosts2
fi fi
# choose which user known hosts file to use # choose which user known hosts file to use