• oni ᓚᘏᗢ
      link
      fedilink
      1
      edit-2
      23 days ago

      I was about to post something similar. With fish you can do your own functions, right? So, you can pass any dots as arguments to a function called cd, so, for every extra dot after .., you append a /.. at the end.

      • zitrone 🍋
        link
        fedilink
        1
        edit-2
        22 days ago

        yeah, but its less visual

        cd ..... is harder to understand than cd ../../../..

        also the extension work with any commend, not just cd

    • Pup Biru
      link
      fedilink
      English
      1
      edit-2
      23 days ago

      - returns you to the previous path rather than repeat the last cd right? so cd - would undo the cd …

      • @[email protected]
        link
        fedilink
        English
        123 days ago

        Point was: most of the time I see someone spending time counting the requisite number of ..s, all they really wanna do is “go back to where I was before”.

        cd foo/bar/baz/qux and cd - is better than cd foo/bar/baz/qux and cd ../../../..

    • Eyedust
      link
      fedilink
      English
      423 days ago

      Well, mom said I could be anything when I grew up…

  • @[email protected]
    link
    fedilink
    29
    edit-2
    23 days ago
    alias cd..='cd ..'
    alias cd...='cd ../..'
    alias cd....='cd ../../..
    alias cd.....='cd ../../../..'
    
  • Fushuan [he/him]
    link
    fedilink
    124 days ago

    Sometimes I have to swap between two routed for several things, so I create a quick in-memory alias like aa=$(pwd)

    Then I can cd $aa

  • @[email protected]
    link
    fedilink
    522 days ago

    Easiest solution, use fish instead of bash! Default fish keybindings will allow you to just type . . or name a directory similar to how you could do with Zoxide.

    Also, wait until you find about pushd and popd ;)

    • sleet01
      link
      fedilink
      1
      edit-2
      22 days ago

      Really buried the lede there: pushd and popd are what I use instead of cd most times!

  • @[email protected]
    link
    fedilink
    55
    edit-2
    24 days ago
    In your rc:
    alias ..='cd ..'
    alias ...='cd ../..'
    alias ....='cd ../../..'
    
    Usage:
    1/2/3 $ ...
    1 $
    
  • @[email protected]
    link
    fedilink
    English
    1
    edit-2
    22 days ago

    The good thing about Dolphin is you can have the real tree following your navigation. Want to go up a few levels, just click once, directly where you want to go next. None of this up, up, up nonsense. Great for snooping in many different folders in quick succession.

    • Pup Biru
      link
      fedilink
      English
      223 days ago

      and then rinse and repeat for every level because you just don’t trust that mischievous cd

  • Bappity
    link
    fedilink
    English
    198
    edit-2
    24 days ago
    $ cd ..
    $ ls
    $ cd ..
    $ ls
    

    “hmm yes… everything seems to be in order”

    • @[email protected]
      link
      fedilink
      English
      224 days ago

      Sometimes I throw off the linux admin reading my log by throwing in a pwd before going to the next one. Know it’s not gonna be in that directory you know?

    • LiveLM
      link
      fedilink
      English
      43
      edit-2
      24 days ago

      I need a shell/plugin/tool/whatever that always shows me the content of the current dir in a little popup or something.

      Anything I do in the shell is like cd this, ls, cd there, ls *, I feel like a have the navigational awareness of a amnesiac goldfish

      • @[email protected]
        link
        fedilink
        322 days ago

        You probably want rangerfm or vifm. They use miller columns for to show you your surrounding context.

      • Eyedust
        link
        fedilink
        English
        1023 days ago

        Alternatively, you could use a TUI file manager. Once you get the navigation down you can manage things pretty quickly. Especially with ones that have options for dual directory layouts, like Midnight Commander or vifm.

      • Bappity
        link
        fedilink
        English
        424 days ago

        that, or you have to make ABSOLUTELY SURE that you haven’t accidentally pressed a button on your keyboard that has inevitably resulted in the total destruction of the directory contents

      • @[email protected]
        link
        fedilink
        624 days ago

        It is called windows 2000 explorer and it’s great for file operations :) In Linux i have yet to find a really good replacement ;(

      • Fushuan [he/him]
        link
        fedilink
        2124 days ago

        Put this in bashrc or whatever flavour of shells’s bashrc you use:

        function cs () { cd “$@” && ls }

        I didnt remember the function sintax of bash so I just copied it from SO.

        • @[email protected]
          link
          fedilink
          2024 days ago
          cs () {
              cd $1;
              ls ${@:2}
          }
          

          You (probably) only want to pass the first argument to cd, this’ll send the rest to ls.

          • @[email protected]
            link
            fedilink
            523 days ago

            Did that years ago, just called it cds. I also have an “up” command which is an alias to “cds …”. Oh, and I have a “setup server_name” they copy all my aliases to a server and create an alias that allow me to “ssh -A server_name” using only server_name.

      • @[email protected]
        link
        fedilink
        English
        1324 days ago

        Doesn’t let you rifle through things approvingly as you go. "Yes this is the correct directory because it has the three files I was looking at earlier–

        You know what let’s do a ls -al just to be super sure it’s the right modification