guumaster / hostctl

Your dev tool to manage /etc/hosts like a pro!
http://guumaster.github.io/hostctl
MIT License
1.04k stars 45 forks source link

Comments turn into entries #72

Closed Zaffy closed 2 years ago

Zaffy commented 3 years ago

Describe the bug

In this hosts file you can find the following line:

# 0.0.0.0  www.youtube-nocookie.com #[affects various videos]

When you add the file with hostctl, it becomes:

0.0.0.0 www.youtube-nocookie.com
0.0.0.0 #[affects
0.0.0.0 various
0.0.0.0 videos]

To Reproduce

Download the list and add it via hostctl add

Expected behavior Comments should not turn into entries. They should be either stripped altogether or preserved.

System (please complete the following information):