diff --git a/share/functions/__fish_print_hostnames.fish b/share/functions/__fish_print_hostnames.fish index 0f3facbbc..7e4c23bff 100644 --- a/share/functions/__fish_print_hostnames.fish +++ b/share/functions/__fish_print_hostnames.fish @@ -13,7 +13,7 @@ function __fish_print_hostnames -d "Print a list of known hostnames" end # Print hosts with known ssh keys - cat ~/.ssh/known_hosts{,2} ^/dev/null|cut -d ' ' -f 1| cut -d , -f 1 + cat ~/.ssh/known_hosts{,2} ^/dev/null | grep -v '^|' | cut -d ' ' -f 1| cut -d , -f 1 # Print hosts from ssh configuration file if [ -e ~/.ssh/config ]