Maybe there is a tool that does that? Maybe I’m doing this all wrong and there is a different way I should browse?

  • notabot@piefed.social
    link
    fedilink
    English
    arrow-up
    16
    ·
    15 hours ago

    Type cd then press Alt+. and it’ll copy the last argument of the previous command, make sure it’s what you want, and press Enter.

    • sin_free_for_00_days@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      3
      ·
      10 hours ago

      Nice, I don’t remember having seen that before. I’m sure I’ll just keep using !$, because muscle memory, but I like seeing new approaches.

      • notabot@piefed.social
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 hours ago

        The shell, and lots of other things that take per-line input, use readline to do it. The readline man page is… extensive… to say the least. There are many more useful shortcuts in there, but I doubt anyone uses more than a fraction of them.