Skip to content

Commit

Permalink
fix(etc-hosts): Made path regex match more strict.
Browse files Browse the repository at this point in the history
This got me in a lot of trouble with a file path containing /vhosts/ so made it more strict.

Originally proposed in scopatz#386
  • Loading branch information
bravoman authored and galenguyer committed Nov 2, 2022
1 parent e2d2ded commit 961f871
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions etc-hosts.nanorc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Make /etc/hosts nicer to read, see `man hosts 5` to see the format
syntax "/etc/hosts" "hosts"
syntax "/etc/hosts" "^/etc/hosts$"

# IPv4
color yellow "^[0-9\.]+\s"
Expand All @@ -12,4 +12,3 @@ color normal "[.:]"

# comments
color brightblack "^#.*"

0 comments on commit 961f871

Please sign in to comment.