From 19c67db731074a65bef853674180ff3c5f55b460 Mon Sep 17 00:00:00 2001 From: axel Date: Fri, 3 Feb 2006 10:41:14 +1000 Subject: [PATCH] Make hostname completion code more robust darcs-hash:20060203004114-ac50b-54fda8fe89649d404cd6981d7783e18f5092f217.gz --- init/fish_complete.fish.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/init/fish_complete.fish.in b/init/fish_complete.fish.in index f892394ae..4d160b79f 100644 --- a/init/fish_complete.fish.in +++ b/init/fish_complete.fish.in @@ -140,10 +140,13 @@ end function __fish_print_hostnames -d "Print a list of known hostnames" # Print all hosts from /etc/hosts - cat /etc/hosts|sed -e 's/[0-9.]*\( \|\t\)*\(.*\)/\2/'|sed -e 's/\#.*//'|sed -e 'y/\t/\n/'|grep -v '^$' - + if test -f /etc/hosts + sed