• Bappity@lemmy.world
    link
    fedilink
    English
    arrow-up
    176
    arrow-down
    1
    ·
    edit-2
    1 month ago
    $ cd ..
    $ ls
    $ cd ..
    $ ls
    

    “hmm yes… everything seems to be in order”

    • LiveLM@lemmy.zip
      link
      fedilink
      English
      arrow-up
      37
      ·
      edit-2
      1 month 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
        19
        ·
        1 month 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
          17
          ·
          1 month ago
          cs () {
              cd $1;
              ls ${@:2}
          }
          

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

          • ka1ikasan@lemmy.zip
            link
            fedilink
            arrow-up
            5
            ·
            1 month 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.

      • Prime@lemmy.sdf.org
        link
        fedilink
        arrow-up
        5
        ·
        1 month 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 ;(

      • Bappity@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        1 month 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

      • grrgyle@slrpnk.net
        link
        fedilink
        arrow-up
        3
        ·
        30 days ago

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

      • turtlesareneat@discuss.online
        link
        fedilink
        English
        arrow-up
        12
        ·
        1 month 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

    • peoplebeproblems@midwest.social
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 month 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?

  • Matriks404@lemmy.world
    link
    fedilink
    arrow-up
    27
    ·
    edit-2
    1 month ago
    alias cd..='cd ..'
    alias cd...='cd ../..'
    alias cd....='cd ../../..
    alias cd.....='cd ../../../..'
    
    • Bonsoir@lemmy.ca
      link
      fedilink
      arrow-up
      19
      ·
      1 month ago

      I do that too!
      I also alias ... to cd ../... I’ll be honest, I often forget to do it, but in theory it can speed things up.

    • not_woody_shaw@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 month ago

      Once you’ve typed … you know if you type more dots it’s to go up more dir, so you don’t really need two dots for each additional dir.

      • billwashere@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 month ago

        Yeah so it was five dots for four directories up. I also have

        … for 2

        And

        …. for 3

        I don’t think I have one for 5. I’d have to look. I also use autojump and fzf which is very useful.

    • Maxxie@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      8
      ·
      1 month ago

      Installing zoxide led me to installing fzf, which has improved my terminal experience by about 35%, I already installed it in all the machines I’m managing

      Got any more tools? :)

      • AVengefulAxolotl@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        1 month ago

        Yeah, these two are fucking awesome. I recently installed zoxide and OMG, i dont know how ive lived without it.

        Other awesome tools: Eza - prettier ls Yazi - vim-like file manager

      • zqwzzle@lemmy.ca
        link
        fedilink
        English
        arrow-up
        4
        ·
        1 month ago

        I don’t think there’s anything too unusual but here’s my nix packages

        { pkgs }:
        
        with pkgs; [
          # General packages for development
          copier      # Project scaffolding and templating
          fastlane
          jujutsu
          just        # Project specific command runner
          mise        # Tool version manager
          ngrok       # Public tunnel ngrok.com
          sqlite
          pre-commit
          trufflehog  # Scan for secrets in code repositories
        
          # Encryption and security tools
          age
          age-plugin-yubikey
          gnupg
          libfido2
        
          # Container tools and SDKs
          colima
          podman
          podman-compose
        
          # Media-related packages
          dejavu_fonts
          ffmpeg
          hack-font
          noto-fonts
          noto-fonts-emoji
          meslo-lgs-nf
          yt-dlp
        
          # Text and terminal utilities
          bat
          btop        # resource monitor
          #chezmoi    # manage dotfiles; to try
          coreutils   # GNU system tools
          curl
          delta
          exiftool
          f3          # flash drive verification tool
          fd          # alternate find command
          fzf
          htop
          iftop
          jq          # command line JSON tool
          # openssh
          ripgrep
          s3cmd
          shellcheck  # static analysis for shell scripts
          tree
          tmux
          unison
          unrar
          unzip
          wget
          zip
          zoxide
        
          # fish specific
          fishPlugins.foreign-env
          fishPlugins.forgit
          fishPlugins.fzf-fish
          fishPlugins.tide
          fishPlugins.z
        
          # Python packages
          python3
          virtualenv
        ]
        
      • grrgyle@slrpnk.net
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        30 days ago

        I can recommend featureful terminal emulator Kitty. I’d been using tmux and screen for over a decade, but now just get that functionality baked into the terminal. The only time I use tmux now is for remote sessions.

        • Maxxie@lemmy.blahaj.zone
          link
          fedilink
          arrow-up
          2
          ·
          30 days ago

          I am tmuxed all the time, the idea of integrating it into the terminal is interesting. I’ll need to think about it, thanks for the suggestion :)

      • grrgyle@slrpnk.net
        link
        fedilink
        arrow-up
        1
        ·
        30 days ago

        eza is pretty cool, too. I replacement for ls which has built in tree view, dir size summary, and git status.

    • oni ᓚᘏᗢ@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      1 month 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 🍋@lemmings.world
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        1 month ago

        yeah, but its less visual

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

        also the extension work with any commend, not just cd