• LiveLM@lemmy.zip
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      2 months 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

      • Fushuan [he/him]@lemm.ee
        link
        fedilink
        arrow-up
        0
        ·
        2 months 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.

        • Artyom@lemm.ee
          link
          fedilink
          arrow-up
          1
          ·
          2 months ago
          cs () {
              cd $1;
              ls ${@:2}
          }
          

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