diff options
author | Fabian Homborg <FHomborg@gmail.com> | 2016-03-22 11:09:36 +0100 |
---|---|---|
committer | Fabian Homborg <FHomborg@gmail.com> | 2016-03-22 11:09:36 +0100 |
commit | a81bd697a8237ada71a24ebbf58fcf1b127e8f34 (patch) | |
tree | cdd0b53a546293008ccae6a1e562a3c2836cb289 /share/functions/__fish_print_hostnames.fish | |
parent | 2e0205a7462c812559952c069f21aec58515785a (diff) |
Make reading ssh files case-insensitive
Fixes #2843
Diffstat (limited to 'share/functions/__fish_print_hostnames.fish')
-rw-r--r-- | share/functions/__fish_print_hostnames.fish | 6 |
1 files changed, 3 insertions, 3 deletions
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 |