Here is a re-done version of the recently closed pull request for this functionality, based on the the latest clean HEAD. Also tidied up a few things and added more explicit tests around the tokens themselves.
Note, this will have an unexpected effect on someone who is already using ghost, since it will start ignoring their previously entered entries. They'd have to re-add things, or add the #ghost start and # ghost end comments to the hosts file. Probably worth mentioning in the docs.
Here is a re-done version of the recently closed pull request for this functionality, based on the the latest clean HEAD. Also tidied up a few things and added more explicit tests around the tokens themselves.
Note, this will have an unexpected effect on someone who is already using ghost, since it will start ignoring their previously entered entries. They'd have to re-add things, or add the
#ghost start
and# ghost end
comments to the hosts file. Probably worth mentioning in the docs.