• over_clox@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    2 days ago

    Honestly I haven’t tried this on Linux yet, but didn’t Windows implement this somewhere along the way?..

    cd ....

      • over_clox@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        2 days ago

        Interesting, I might have to check that out someday.

        Though when I write scripts, I’m not a fan of blind folder navigation like that, there’s a good reason for the pushd and popd script commands.

        • Ephera@lemmy.ml
          link
          fedilink
          English
          arrow-up
          2
          ·
          2 days ago

          Oh yeah, I wouldn’t use that for scripts. I wouldn’t use zsh for scripts either.
          I mean, I believe, it’s generally compatible with bash, but just throwing a shebang like #!/bin/sh or #!/bin/bash into the first line of the script will make it execute with sh or bash, even when you run it from zsh.

    • vortic@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      edit-2
      2 days ago

      I aliased cd to a custom funtion in my bashrc to do this at one point, but cd ../../../.. is too engrained so I never rembered to use it.