From 65aeaab0545cef840daee0c64de8ac763ae2e4a8 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sat, 27 Feb 2016 14:33:03 +0100 Subject: [PATCH] print_hostname: Avoid matches in fstab comments harder --- share/functions/__fish_print_hostnames.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/functions/__fish_print_hostnames.fish b/share/functions/__fish_print_hostnames.fish index 625b8fa62..4910d3f83 100644 --- a/share/functions/__fish_print_hostnames.fish +++ b/share/functions/__fish_print_hostnames.fish @@ -14,9 +14,10 @@ function __fish_print_hostnames -d "Print a list of known hostnames" | string replace -ra '#.*$' '' \ | string replace -r '[0-9.]*\s*' '' | string trim | string replace -ra '\s+' '\n' end + # Print nfs servers from /etc/fstab if test -r /etc/fstab - string match -r '^\s*[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3]:|[a-zA-Z\.]*:'