• Gamma@programming.dev
        link
        fedilink
        English
        arrow-up
        5
        ·
        6 days ago

        Single quotes don’t allow any escaping in shell, you need

        'I don'\''t know what you mean, I'\''ve never encountered any annoyances'
        

        Or, in Zsh with setopt rcquotes:

        'I don''t know what you mean, I''ve never encountered any annoyances'
        
  • cally [he/they]@pawb.social
    link
    fedilink
    English
    arrow-up
    16
    ·
    6 days ago

    not sure why the default behavior is this:

    file\ name\ with\ a\ bunch\ of\ spaces

    instead of this:

    "file name with a bunch of spaces"

    but you can just press " before pressing tab to auto-complete, and it will use the 2nd form

  • lengau@midwest.social
    link
    fedilink
    arrow-up
    8
    ·
    6 days ago

    I very intentionally have all my code in Personal Projects 🥰 and Work Projects 🏦 directories so I can find bugs in the handling of file paths.

  • Korne127@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    4 days ago

    Can’t relate. I use shell all the time, and I always use spaces in file paths, especially to make sure scripts I make still work then

  • notarobot@lemmy.zip
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    6 days ago

    Don’t try svelte kit. This is pseudocode but it’s valid. The only symbol show here that is not real is the / that I’ve placed at the end of folder to show that they are folders. There are other special cases

    routes/
    +page.ts
    (admin)/
      +page.ts
      [user=uuid]/
        [[community]]/
          +page.ts
        posts/
          [...postIds@]/
            +page.ts
    
      • notarobot@lemmy.zip
        link
        fedilink
        arrow-up
        2
        ·
        6 days ago

        Im trying it out yet. It seems fun, the tutorial is amazing. I don’t think I’d want to do large enterprise projects with it

        • dogs0n@sh.itjust.works
          link
          fedilink
          arrow-up
          2
          ·
          6 days ago

          Have you noticed issues that you think would arrise at scale, etc for an enterprise project?

          I’m using it for a small/medium sized project and it’s great and has not got in the way once. Wondering how you feel, since I don’t have experience with much enterprise code.

          • notarobot@lemmy.zip
            link
            fedilink
            arrow-up
            1
            ·
            6 days ago

            Oh. No. You win. Mine is a gut feeling that modeling all routes with folders would become a paid. To navigate and manage, while you have actual experience

  • jbk@discuss.tchncs.de
    link
    fedilink
    arrow-up
    9
    arrow-down
    2
    ·
    6 days ago

    smells like skill issue tbh

    tools which cant handle being installed/run on directories with spaces are so annoying

      • ulterno@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        6 days ago

        I vaguely remember zsh in Manjaro (by default) having a tab completion that automatically added the slashes.
        Never set it up myself though.

        But I really hate having to worry about quoting my file variables in scripts.
        So much, that after a certain complexity, I just give up the script and make the thing in C++.


        Oh, and if I make a script that doesn’t handle file names properly (because it’s not required in that specific use case), I make sure to delete it after use, to prevent mistaken use later, which would otherwise cause more headache than just having to rewrite a script.

    • rumba@lemmy.zip
      link
      fedilink
      English
      arrow-up
      5
      ·
      6 days ago

      agreed, “still worth it”

      I do, however, tend to keep spaces out of my folder names so i can just use quotes at the end.

      /Images/Halloween/Projections/“Creepy Crawlies.mp4”

  • katy ✨@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    8
    ·
    7 days ago

    the struggle between spaces in filenames look cute and oh fuck what’s the code to reference a space in a filename in terminal?

  • bob_lemon@feddit.org
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    6 days ago

    My work has me working with Matlab Simulink paths, which may (and sometimes actually do) contain newlines.

  • zerofk@lemmy.zip
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    6 days ago

    Computers should just know when I want a space to be part of a file name, and when I want them to be argument separators. No more escaping or quoting.