• lengau@midwest.social
    link
    fedilink
    arrow-up
    17
    ·
    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.

  • cally [he/they]@pawb.social
    link
    fedilink
    English
    arrow-up
    20
    ·
    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

    • killeronthecorner@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 days ago

      Because quoting requires token expansion (e.g. ~ to /home/you). Escaping gives you a much shorter path in that case.

      That said I’m with you, full quoted paths read better to me.

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

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

  • Korne127@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    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

  • zitrone 🍋@lemmings.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    5 days ago

    i y’all just started using fish shell, you’d have proper shell completions and argument splitting that doesn’t care about spaces in file names

    • rumba@lemmy.zip
      link
      fedilink
      English
      arrow-up
      7
      ·
      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”

  • notarobot@lemmy.zip
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    7 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
        3
        ·
        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
            3
            ·
            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
    10
    arrow-down
    2
    ·
    7 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
        ·
        7 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.

        • TarantulaFudge@startrek.website
          link
          fedilink
          arrow-up
          3
          ·
          5 days ago

          You can just start the path with a quote and it will auto complete with spaces. I spend a lot of time correcting files with spaces replaced now. The spaces are better. I think music is the most annoying, since I like to use tools like EasyTag to extract metadata from filenames.

          So please stop.naming_files.like_this.its_stupid

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

            You can just start the path with a quote and it will auto complete with spaces.

            Oh, you’re right. I just tried it out and it worked the same way.
            I wonder what gave me the misconception the it doesn’t by default.

  • zerofk@lemmy.zip
    link
    fedilink
    arrow-up
    4
    ·
    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.

  • Seefra 1@lemmy.zip
    link
    fedilink
    arrow-up
    1
    ·
    5 days ago

    The number of keystrokes needed to type an underscore is the same that you need to type backslash space, so I don’t see how underscores are in improvement