__fish_print_hostnames: Fix regex

This used `]` when it should have been `}`, which made the regex nonsensical

Broken since 94c12d84e2 in 2016
This commit is contained in:
Fabian Boehm 2023-07-11 20:50:26 +02:00
parent 1a11cee559
commit 2b0e3ba3b8

View file

@ -19,7 +19,7 @@ function __fish_print_hostnames -d "Print a list of known hostnames"
# 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\.]*:' </etc/fstab |
string match -r '^\s*[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}:|^[a-zA-Z\.]*:' </etc/fstab |
string replace -r ':.*' ''
end