Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hosts File Editor: Adds no whitespace option #36386

Open
WalterWolf49 opened this issue Dec 17, 2024 · 3 comments
Open

Hosts File Editor: Adds no whitespace option #36386

WalterWolf49 opened this issue Dec 17, 2024 · 3 comments
Labels
Good first issue Good for newcomers. Help Wanted We encourage anyone to jump in on these and submit a PR. Issue-Feature A planned feature addition to a product Product-Hosts File Editor Refers to the Hosts file editor Status-In progress This issue or work-item is under development

Comments

@WalterWolf49
Copy link

Microsoft PowerToys version

0.87.0

Installation method

WinGet

Running as admin

Yes

Area(s) with issue?

Hosts File Editor

Steps to reproduce

Create or modify any hosts file entry or simply enabling/disabling them.

✔️ Expected Behavior

creates or modifies any entry without adding leading spaces for every entry.

❌ Actual Behavior

creates or modifies entries with two leading spaces for every entry. Those leading spaces cause issues with some software, e.g. squid.

Other Software

Squid proxy (4.14)

@WalterWolf49 WalterWolf49 added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Dec 17, 2024
@TheJoeFin TheJoeFin added the Product-Hosts File Editor Refers to the Hosts file editor label Dec 18, 2024
@crutkas crutkas added Issue-Feature A planned feature addition to a product and removed Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Dec 19, 2024
@crutkas crutkas changed the title Hosts File Editor: Adds leading whitespaces Hosts File Editor: Adds no whitespace option Dec 19, 2024
@crutkas
Copy link
Member

crutkas commented Dec 19, 2024

The double space is intentional so enabled and disabled all are aligned when you view the file.

I have extra white space in files all the time, feels a bit odd that they can't handle extra white space. most people would just delete the # in a comment.

Shifting this to a feature request as that file can have white space there.

@crutkas crutkas added Help Wanted We encourage anyone to jump in on these and submit a PR. Good first issue Good for newcomers. labels Dec 19, 2024
@github-project-automation github-project-automation bot moved this to ⚠️Needs Walkthrough in 3. Help Wanted Dec 19, 2024
@WalterWolf49
Copy link
Author

This behaviour makes sense from an aesthetic point of view then.

So this is more likely a problem from squid's side, if the file is allowed to have white spaces. I guess their handling of the whitespace as a delimiter at the beginning might be a bit weird.

@htcfreek htcfreek added the Status-In progress This issue or work-item is under development label Jan 20, 2025
@htcfreek
Copy link
Collaborator

@blakestack
Your contribution is welcome and thank you for your work on this. Feel free to open a PR. If you have any further questions don't worry to ask them.

I think this should be a compatibility setting defaulting to off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Good for newcomers. Help Wanted We encourage anyone to jump in on these and submit a PR. Issue-Feature A planned feature addition to a product Product-Hosts File Editor Refers to the Hosts file editor Status-In progress This issue or work-item is under development
Projects
Status: ⚠️Needs Walkthrough
Development

No branches or pull requests

4 participants