From a81bd697a8237ada71a24ebbf58fcf1b127e8f34 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 22 Mar 2016 11:09:36 +0100 Subject: Make reading ssh files case-insensitive Fixes #2843 --- share/functions/__fish_print_hostnames.fish | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'share/functions') diff --git a/share/functions/__fish_print_hostnames.fish b/share/functions/__fish_print_hostnames.fish index 492954a4..38515776 100644 --- a/share/functions/__fish_print_hostnames.fish +++ b/share/functions/__fish_print_hostnames.fish @@ -26,9 +26,9 @@ function __fish_print_hostnames -d "Print a list of known hostnames" if test -r $file # Print hosts from system wide ssh configuration file # Note the non-capturing group to avoid printing "name" - string match -r '\s*Host(?:name)? \w.*' < $file | string replace -r '^\s*Host(?:name)?\s*(\S+)' '$1' - set known_hosts $known_hosts (string match -r '^\s*UserKnownHostsFile|^\s*GlobalKnownHostsFile' <$file \ - | string replace -r '.*KnownHostsFile\s*' '') + string match -ri '\s*Host(?:name)? \w.*' < $file | string replace -ri '^\s*Host(?:name)?\s*(\S+)' '$1' + set known_hosts $known_hosts (string match -ri '^\s*UserKnownHostsFile|^\s*GlobalKnownHostsFile' <$file \ + | string replace -ri '.*KnownHostsFile\s*' '') end end for file in $known_hosts -- cgit v1.2.3