mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 20:33:08 +00:00
Fixed appearance of ssh hostnames with [] in them
refs https://github.com/fish-shell/fish-shell/issues/1355
This commit is contained in:
parent
aa1b065dd1
commit
1270384ede
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ function __fish_print_hostnames -d "Print a list of known hostnames"
|
|||
|
||||
# Print hosts with known ssh keys
|
||||
# Does not match hostnames with @directives specified
|
||||
sgrep -Eoh '^[^#@|, ]*' ~/.ssh/known_hosts{,2} ^/dev/null
|
||||
sgrep -Eoh '^[^#@|, ]*' ~/.ssh/known_hosts{,2} ^/dev/null | sed -E 's/^\[([^]]+)\]:([0-9]+)$/\1/'
|
||||
|
||||
# Print hosts from system wide ssh configuration file
|
||||
if [ -e /etc/ssh/ssh_config ]
|
||||
|
|
Loading…
Reference in a new issue