←back to thread

422 points km | 1 comments | | HN request time: 0s | source
Show context
perching_aix ◴[] No.41831129[source]
Well, at least the title is honest. Straight up asking people to break standards out of sheer conviction is a new one for me personally, but it's definitely one of the attitudes of all time, so maybe it's just me being green.

Can we ask for the typical *nix text editors to disobey the POSIX standard of a text file next, so that I don't need to use hex editing to get trailing newlines off the end of files?

replies(4): >>41831233 #>>41831275 #>>41831592 #>>41833146 #
201984 ◴[] No.41831233[source]
What's wrong with trailing newlines?
replies(2): >>41831241 #>>41831375 #
perching_aix ◴[] No.41831241[source]
Other than select software being pissy about it, not much. Just like how there's nothing wrong with CRLF, except for select software being pissy about that too.
replies(2): >>41832054 #>>41832819 #
tryauuum ◴[] No.41832819[source]
I do like concatenating files with cat, and if a file has its final line not ending in newline symbol the result is ugly.

I know it's just me but my worldview is that the world would be better if all editors had "insert final newline" behavior

replies(1): >>41832858 #
perching_aix ◴[] No.41832858[source]
My problem is that what I input (and observe!) doesn't match what's persisted. Worse still, editors lie about it to me until I close the file and reopen it. And just to really turn the knife, various programs will then throw a fit that a character that I did not input and my editor lies about not being present, is present. I hope it's appreciable why I find this frustrating.

I expect my editor to do what I say, not secretly(!) guess what I might have wanted, or will potentially want sometime in the future. Having to insert a newline while concatenating files is a chore, but a predictable annoyance. Having to hunt for mystery bytes, maybe less so.

replies(2): >>41833180 #>>41834447 #
1. eviks ◴[] No.41834447{3}[source]
Wait, are they're no editors that don't lie to you?