mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 02:13:38 +08:00
Fixes issue #1234. Fish now parses system wide ssh configuration file in addition to user config.
This commit is contained in:
parent
2927514e68
commit
75b02e1d27
|
@ -16,10 +16,15 @@ function __fish_print_hostnames -d "Print a list of known hostnames"
|
|||
# Does not match hostnames with @directives specified
|
||||
sgrep -Eoh '^[^#@|, ]*' ~/.ssh/known_hosts{,2} ^/dev/null
|
||||
|
||||
# Print hosts from system wide ssh configuration file
|
||||
if [ -e /etc/ssh/ssh_config ]
|
||||
# Ignore lines containing wildcards
|
||||
sgrep -Eoi '^ *host[^*]*$' /etc/ssh/ssh_config | cut -d '=' -f 2 | tr ' ' '\n'
|
||||
end
|
||||
|
||||
# Print hosts from ssh configuration file
|
||||
if [ -e ~/.ssh/config ]
|
||||
# Ignore lines containing wildcards
|
||||
sgrep -Eoi '^ *host[^*]*$' ~/.ssh/config | cut -d '=' -f 2 | tr ' ' '\n'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user