mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 23:22:53 +08:00
fix bug introduced by fish_indent
Commit 11a60c8 restyled all the fish scripts using fish_indent. Sadly a bug in fish_indent did not correctly reformat an unusual structure.
This commit is contained in:
parent
c8d2e6d972
commit
1ca1667786
@ -9,9 +9,8 @@ function __fish_print_hostnames -d "Print a list of known hostnames"
|
||||
# Ignore zero ips
|
||||
getent hosts | string match -r -v '^0.0.0.0' | string replace -r '[0-9.]*\s*' '' | string split " "
|
||||
else if test -r /etc/hosts
|
||||
# Ignore commented lines and functionally empty lines
|
||||
string match -r -v '^\s*0.0.0.0|^\s*#|^\s*$' </etc/hosts # Strip comments
|
||||
| string replace -ra '#.*$' '' | string replace -r '[0-9.]*\s*' '' | string trim | string replace -ra '\s+' '\n'
|
||||
# Ignore commented lines and functionally empty lines. Strip comments.
|
||||
string match -r -v '^\s*0.0.0.0|^\s*#|^\s*$' </etc/hosts | string replace -ra '#.*$' '' | string replace -r '[0-9.]*\s*' '' | string trim | string replace -ra '\s+' '\n'
|
||||
end
|
||||
|
||||
# Print nfs servers from /etc/fstab
|
||||
|
Loading…
x
Reference in New Issue
Block a user