Hosts: Add seperate raw unified hosts for Windows for readability / editability

Created on 18 Aug 2017  路  14Comments  路  Source: StevenBlack/hosts

The raw unified hosts link posted on root of README.md seems to work however it becomes a slightly difficult to edit any section/entry as all the entries becomes a single line on Windows OS for unix("n") and DOS("rn") newline differences.

Suggestion: Another column can be added separating raw file for Windows OS replacing all "n" with "rn" for better readability/edit-ability.

Most helpful comment

P.S., @Tobias-B-Besemer: I am not being a hater with the CRLF like SOME people we may know... I am just trying to find a happy medium for this project, its devs, the consumers, as well as its contributors (who are not necessarily devs) and to keep everything as efficient as possible.

All 14 comments

There is already both an issue and PR open for this. Can you copy and past your comments to one of those just to keep the approval support and momentum together and then close this issue?

https://github.com/StevenBlack/hosts/issues/370
https://github.com/StevenBlack/hosts/pull/377

As a side note, it's posted in the related issue, but you can also check out the CRLF Normalizer to automatically convert all your hosts files for you. This will also work for any other repos you may have similar troubles with.

https://github.com/ScriptTiger/CRLF-Normalizer

@dxwc another option is, don't use Notepad. It's not a "Windows OS" thing. It's a shitty-text-editor thing.

A problem beyond the editor, however, is even if a Windows user opened it in a smarter editor on Windows, many Windows editors will then automatically save it as CRLF instead of LF and automatically convert while saving. Then when they push a PR, it will diff every line here. So it does have the potential of coming back to bite the repo. I would say we should just account for it since this repo depends on the suggestions of helpful citizens that may know what ads and malware are but don't necessarily understand about CRLF/LF etc.

@ScriptTiger I understand what you're saying.

In several years, that hasn't happened once.

Windows users who use Notepad seems to be a good place to draw the line. Beyond that line, there are few prospects. There's just an endless sea of non-developers.

Due to the nature of this project, I think it's fair to say non-developers are the largest source of the data being acted upon by this project.

@ScriptTiger oh I agree. Which is why, at the repo level, we need a filter.

I'm happy to be convinced otherwise :-) but at the moment, I sense that a good filter is a precious thing.

So from the filter perspective, would it be better to normalize the repo to LF instead of CRLF? Normalizing in general would protect the repo. Normalizing to CRLF would cater to Windows users, while normalizing to LF would filter that out.

From my view, as (still) a Windows-User, a user that use notepad.exe instead of Word, is at least a good power-user/admin. :D

Psst, all the scripts I made on my GitHub have been with notepad, which explains why my first feedback here was to fix the tabbing. I have been programming in BASIC since the days of black screens and green letters when we used cassette tapes instead of CDs and flash drives. If I need anything else at this point, I feel as though I failed myself somewhere. I type anywhere between 15,000 and 20,000 words a day to make a living, so every mistake is time wasted to fix it. Even using an auto-correct feature takes a good hour to review at the end of the day because everything must still be checked individually by a human. However, I also have Cygwin, the Linux subsystem on Windows, as well as both physical Windows and Ubuntu machines, so making things native or using conversions either way also isn't a problem.

P.S., @Tobias-B-Besemer: I am not being a hater with the CRLF like SOME people we may know... I am just trying to find a happy medium for this project, its devs, the consumers, as well as its contributors (who are not necessarily devs) and to keep everything as efficient as possible.

LOL @ScriptTiger I'm a lova, not a hater.

It's just that I get a kick out of gently saying to new acquaintances here, "You know, you should consider an editor upgrade", and perhaps also "... and about that default Windows Terminal...".

It's a compelling public service.

So... CRLF or LF in the .gitattributes so we can close all these issues and pending PR? Will it be the open embrace of acceptance in good standing with Canadian tradition or a great cleansing of the filthy CRLF scum?

Closing

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tgy picture tgy  路  42Comments

MattWeatherford picture MattWeatherford  路  25Comments

vixie picture vixie  路  51Comments

StevenBlack picture StevenBlack  路  36Comments

mitchellkrogza picture mitchellkrogza  路  55Comments