microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
110.28k stars 6.49k forks source link

[Hosts File Editor] ability to sort entries and identify duplicates #21663

Open ChrisJohnTaylor opened 1 year ago

ChrisJohnTaylor commented 1 year ago

Description of the new feature / enhancement

It would be cool if you could click an option to sort the entries in the HOSTS file.

Even if it is not a permanent sort, just having column headers that you can click on to sort would be useful.

Scenario when this would be used?

When you have lots of entries in HOSTS, and you are troubleshooting to see why (for example) you can't get to a site, it can be tedious to browse through the file looking for a particular IP address or host name. If you could click a header to temporarily sort by either IP address of hostname, this would make it much swifter.

Optionally, allowing the sorted order to be written back to the HOSTS file could be useful (I guess)

Supporting information

No response

htcfreek commented 1 year ago

You can filter the list.

ChrisJohnTaylor commented 1 year ago

Thanks, @htcfreek, I had not tried the filter option. I just tried it and it works quite well.

I still think, if it wouldn't be too much trouble, that adding sortable headers could be useful. It would permit spotting oddities such as multiple hostnames resolving to the same IP address, duplicate entries, etc.

Not really a big deal. Only really an issue where the HOSTS file is quite large. And then only marginally more useful than using a filter to find a specific entry that might be causing a problem.

Thanks again.

davidegiacometti commented 1 year ago

I agree! Sorting and duplicates find will be are really nice features.