aboutsummaryrefslogtreecommitdiffhomepage
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/functions/__fish_print_hostnames.fish2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/functions/__fish_print_hostnames.fish b/share/functions/__fish_print_hostnames.fish
index dd62b5c8..1e9f8143 100644
--- a/share/functions/__fish_print_hostnames.fish
+++ b/share/functions/__fish_print_hostnames.fish
@@ -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 ]