pshosts icon indicating copy to clipboard operation
pshosts copied to clipboard

Add support for aliases

Open richardszalay opened this issue 8 years ago • 1 comments

The hosts format actually uses:

127.0.0.1 host.local alias1.host.local alias2.host.local

  • [ ] Add an Aliases property to HostEntry
  • [ ] Add a third parameter (-Aliases) to Add-HostEntry that can either be a string or an array
  • [ ] Have Get-HostEntry match against aliases
  • [ ] Have Remove-HostEntry remove an alias when not matched against the primary

TODO: Should the entire entry still be removed when the primary host is removed, even though there are aliases remaining? I'm thinking yes...

richardszalay avatar Jan 29 '17 21:01 richardszalay

Please add this!

I have done it once: https://github.com/star-citizen-vr/scvr-patcher/blob/csharp/Classes/HostsFile.cs#L146

Bluscream avatar Apr 14 '25 02:04 Bluscream