From 1ccec532f065ee5a5df97a5b19732656d9410126 Mon Sep 17 00:00:00 2001 From: exploide Date: Mon, 11 May 2020 18:25:49 +0200 Subject: [PATCH] __fish_print_hostnames: skip ssh host definitions containing wildcards --- share/functions/__fish_print_hostnames.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/functions/__fish_print_hostnames.fish b/share/functions/__fish_print_hostnames.fish index 9d3d3322f..5376176aa 100644 --- a/share/functions/__fish_print_hostnames.fish +++ b/share/functions/__fish_print_hostnames.fish @@ -109,7 +109,7 @@ function __fish_print_hostnames -d "Print a list of known hostnames" # Print hosts from system wide ssh configuration file # Multiple names for a single host can be given separated by spaces, so just split it explicitly (#6698). - string replace -rfi '^\s*Host\s+(\S.*?)\s*$' '$1' -- $contents | string split " " | string match -v '*\**' + string replace -rfi '^\s*Host\s+(\S.*?)\s*$' '$1' -- $contents | string split " " | string match -rv '[\*\?]' # Also extract known_host paths. set known_hosts $known_hosts (string replace -rfi '.*KnownHostsFile\s*' '' -- $contents) end