5
tientq64
11d

First, the motherfucker CRLF. I wrote some test cases, split the string into lines. It worked fine until I pulled it from Git. Spent 30 minutes fixing it until I looked down at the VSCode statusbar and saw... "CRLF"!

Comments
  • 2
    This is why I always add a `.gitattributes`

    Then you can set the rules e.g:

    * text=auto

    *.sh text eol=lf
  • 1
    Wow, it's even displayed there? Never noticed. I don't notice things, I don't notice all the things! Also more on the vimmy side lately. It's just what app I've opened first I guess.
  • 0
    @BordedDev Better to make whatever is splitting it into lines accept both \n and \r\n. Mixed/mangled line endings are inevitable, just like leading/trailing whitespace.
  • 1
    @donkulator Let me know when you fix `sh` ;P
  • 1
    used to annoy me that os's couldn't standardize their line endings.
  • 1
    Blame windows for this, every other OS manages to use non-retarded line endings
    Not to mention \ and case insensitive paths... Who thought that's a good idea
  • 1
    @devRancid Case insensitive paths are a very good idea if you want non-techies to use the OS.

    An accountant or a lawyer or whatever, upon finding that they have two files in the same folder called Report and report, will conclude that the OS is unreliable. They'll be wrong, but they still won't want to use it.
Add Comment