1. 67

What command-line tools do you use? Does anybody use one of the smart cd replacements, like z or zoxide or fasd? Do people use fzf at the CLI?

One that I use is a bit is funky. It just lets you define shell functions and aliases that are path-specific and live in a .funky file.

I have new-post in my blogs directory and one to call sox in the repo for my podcast.

Edit: This is fantastic. So many new tools to play with!

    1. 31

      I’ve been using some sort of Unix since the mid 1990’s, so 25+ years.

      Something that I’ve learned that works for me (YMMV) is that I tend to only use “standard” tools. I use a Bourne-compatible shell, good ole cd, etc. I prefer tools that have very little customizability, and for tools that can be customized I try to keep them as close to their default state as possible.

      The reason is that if I get too embedded in my heavily customized environment, as soon as I change machines or something gets slightly out of whack, I am useless.

      I did recently by a commercial UNIX workstation^H^H^H^HMacbook, so I have started using a “modern” graphical text editor (the only other graphical text editor I ever used was sam), but even then I still do everything via the command line. TextMate on the Mac has excellent command-line integration (I’ve never, not once, opened a file in TextMate using the File menu; it’s always by typing mate on the command line or via rmate on a remote machine).

      So, I guess to answer your question: TextMate on the Mac. Pretty good command-line tooling. :)

      1. 5

        I get what you are saying. It’s really easy to start customizing things and end up in very unique place. I have had the experience before of my fingers knowing a tool that I didn’t have installed and it can be very frustrating.

        That is why I am interested in this question though. Surely there are new tools that are worthy of joining the canon of ’Standard Tools`. I use ZSH and I think it is a canonical shell now. nushell or fishshell - not yet.

        1. 4

          Undoubtedly there are worthy tools, and better replacements, but the installed base problem is a powerful force….

          1. 2

            This is part of the problem with PowerShell beyond v5.1. It doesn’t exist without you enforcing it’s there somehow, so you still fall back to writing code for what you know will be there versus what’s better (similar things happen with Python and Bash).

      2. 4

        Similar - been using unixes for same amount of time (first was Irix in 1995), and I also much prefer to adapt myself to defaults rather than customize settings, so that for example my vim config file is small enough that I can remember and type it in by hand to cat > ~/.exrc when I get on a new machine. (And .exrc because I’m old.) Admittedly my tmux config is a bit longer so I have to keep that in a github repo, but that’s become so integral to my workflow now that it’s kind of inescapable - and provides yet more support for why I should have just learned the darn defaults in the first place.

        I do like some specific things though, and on the Mac I find Homebrew to be pretty much all I need for that:

        • htop is just so neat, flexible, responsive and informative
        • ag is super fast and the flags all seem more intuitive to me than some equivalents (and its being called The Silver Searcher makes me feel a bit like I’m wielding the Power Cosmic in my, uh, eternal search for truth(?=justice))
        • GNU sort has the -V for ordering version numbers
        • jq is absolutely indispensable for doing JSON web/API stuff
        • used to love sar on Irix for (kind of) vmstat++, but it’s not on macOS, it’s there in sysstat package on Linux tho
        • diff a b | vim -R - for colored diffs without having to install a custom thing
    2. 25

      Find lots of tools I have in my ~/bin here: https://leahneukirchen.org/dotfiles/tools.html

      Interesting is, maybe:

      And lots of more goodies in my .zshrc.

      1. 3

        Thanks, these are helpful.

        Would you happen to have a script that turns a top-posted email (reply on top of the quote) into a bottom-posted one? I’ve been trying to find the time to make it myself, as I couldn’t find one already, but haven’t yet.

        Ditto with a wrapper of Git to allow named staging areas.

        1. 1

          Conversion, no, there is t-prot which strips the bottom full quote.

          You can do the latter with multiple GIT_INDEX_FILE but it gets messy. I don’t know better tooling on top.

          1. 1

            (Personally, I use git-revise to amend to older patches.)

      2. 3

        These date tools are hilarious. Do you actually have use for the days since the french revolution? Is that what it does?

        1. 5

          my favorite date tool: https://linux.die.net/man/1/ddate. It’s a shame it was removed from coreutils.

          $ ddate
          Today is Boomtime, the 51st day of Confusion in the YOLD 3187
        2. 5

          It’s the French “metric” calendar they used for a few years after the revolution. It’s one part that didn’t really stick.

          At any rate, this is a nice date-related script I often use (tz):

          [ -n "$1" ] && time="-d @$(date -d "$1" +%s)" || time=
          printf '%-15s' 'US West';     TZ='America/Los_Angeles' date '+%H:%M %z %Z' $time
          printf '%-15s' 'US East';     TZ='America/New_York'    date '+%H:%M %z %Z' $time
          printf '%-15s' 'UTC';         TZ='UTC'                 date '+%H:%M %z %Z' $time
          printf '%-15s' 'Ireland/UK';  TZ='Europe/Dublin'       date '+%H:%M %z %Z' $time
          printf '%-15s' 'West Europe'; TZ='Europe/Amsterdam'    date '+%H:%M %z %Z' $time
          printf '%-15s' 'New Zealand'; TZ='NZ'                  date '+%H:%M %z %Z' $time
          printf '\n\x1b[1m%-15s' 'Current'; date '+%H:%M %z %Z' $time; printf '\x1b[0m'

          Just tz will print the times in all the timezones, and tz 1900 (or tz 19:00, tz 7pm) will print the times corresponding to 19:00 in all the timezones.

        3. 1

          I was mostly interested in the decimal time, but then I went with it and implemented the calendar too.

      3. 1

        Huh, I’m intrigued by that cupless script (as I’ve never enjoyed dealing with cups…). Seems very neat. I’d be interested to know how it is used. Is it only for network printers, or local ones too?

        1. 1

          Network printers that speak JetDirect.

    3. 19

      For working with web APIs, HTTPie and JQ are my go-tos.

      RipGrep for fast searching.

      1. 14

        For jq: did you heard about fx? https://fx.wtf

        1. 3

          First I’ve heard of it. Looks neat!

    4. 19

      rclone - you could call it a modern rsync or scp.

      It seems to be well known in some circles and relatively unknown in others so I figured I’d post it since it’s a great tool with responsive developers. It’s an rsync-like tool that supports many other backends besides rsync or ssh. What I like about it is how highly configurable it is, especially w.r.t. the controls over parallelism and how much more performant over rsync it is in situations where you have many tiny files.

      1. 3

        Strongly seconded. rclone is rsync for cloud storage services. S3. Dropbox. Box. Google Drive. Tons more.

      2. 1

        I got excited about rclone until I saw it didn’t support iCloud (to be fair, nothing does)

        1. 1

          Would local file syncing to mounted iCloud folders not handle that need?

          1. 1

            Not if you don’t use a Mac?

    5. 18

      I use delta for viewing git diff output. Since I started that, I find myself reaching for GUI diff viewers much less frequently, which I like because I’ve never met a git gui that I find generally usable.

      1. 2

        Vimdiff works pretty well for that use case if you’re from that church.

    6. 16

      This is more of a console based program than a CLI, but VisiData is an essential part of my workflow when dealing with structural data like CSVs. So much more convenient than using a spreadsheet like Excel and very effecient.

      1. 4

        I’ve never seen VisiData before - it’s amazing! Thank you!

      2. 3

        Paul’s doing a Strange Loop workshop and I’m so sad I have to miss it due to conflicting obligations.

    7. 14

      I use tmux a lot. I like tmux’s splits and windows and sessions, but the main reason I use it is for keyboard text selection and scrolling. I wrote a little about this here, with a demo of what it looks like: tmux lets you select and copy text with your keyboard. I don’t really remember what life was like without it.

      I don’t really get the appeal of smart cd, but I have persistent tmux sessions set up for all the projects I work on, so switching directories is usually just switching my tmux session.

      I wrote a little thing to hook up fzf to my shell completion. I have different triggers, like .f for “select file” or .c for “select commit,” and when I type .c<TAB> I get a little fzf popup that lets me select a commit and insert it. I know you can just enable fzf integration with shell completion globally, but this has a few advantages:

      • it’s much, much, much faster than shell autocomplete (especially for selecting dirty git files)
      • it’s deterministic: when I activate completion, I know exactly what choices I’m going to get – I am not at the mercy of whatever shell autocomplete decides I want to do
      • I can add new triggers without having to modify a program’s shell completion (if you have not edited these scripts, they are… truly arcane), and I don’t have to worry about missing completion files for random programs.

      And I can still use the default shell completion as much as I want; this just adds another option. I did this for years with global shell aliases, which have a lot of problems, but a few months ago I dove in and figured out how to hook it into regular tab-completion. It’s a little complicated, but it works great.

      I really like delta; the goto-next-file-header thing is a brilliant hack. But I had to do a lot of work to get output that I liked.

      Having nix installed provides a cool super-power that I use a lot: temporary installation of a program. If I heard of something and want to try it out, I can run nix-shell -p fd (for example) and play around with it. And then it “disappears” as soon as I close that shell, so I don’t have to remember to uninstall it. Lowers the barrier of trying random stuff out.

      I made a hacky thing to organize all of the scripts in my ~/bin into a single hierarchical command that’s defined by its directory structure, and that automatically parses bash comments to display help lines in autocomplete. (The ability to easily add new subcommands makes nix’s CLI a lot more palatable…)

      ngrok is a really nice niche tool if you want to show your local test server to someone else (I’ve used it for sharing blog drafts, for example). There’s a paid version, mostly to combat spam, I think, but the free version is sufficient for anything I would ever do, and it doesn’t require an account or anything.

      terminal-notifier is nice if you’re on a Mac… often I’ll run some long command, ctrl-z, then fg ; terminal-notifier -message "done $?". I actually have an alias for that because I do it often enough.

      A little different than the rest, but I use iTerm’s “Hotkey Window” almost exclusively. I’m often tabbing between a web browser and a text editor, and keeping my terminal window out of the ⌘Tab history means I never switch to it by accident because I just happened to run git status.

      I have more, but I think that’s enough for now…

      1. 2

        I’m in a very similar boat regarding persistent tmux sessions, I find this to be an excellent way to maintain structured environments. I just have some simple scripts to set up a session, or attach to it if it already exists.

        I love shell completion for the things where it works, but it’s frustrating when it doesn’t. Your .c fzf commit shortcut sounds like something I could really use, for the reasons you state: I far prefer to be explicit about what I’m looking for, so having control over exactly what I’m completing would be perfect. Looking forward to playing with it, thanks!

        1. 3

          I agree on the persistent sessions but it really bugs me that tmux conflates two sets of functionality:

          • A pseudoterminal that I can disconnect from and reconnect to.
          • A thing that takes over control of my terminal emulator and provides its own windowing system

          My terminal emulator does a really good job at being a terminal emulator. I don’t need something else to replace that. I’ve switched to using abduco instead of tmux because subsequent versions of tmux made it harder and harder and eventually impossible to tell it not to break my terminal’s scrollback. I’m not completely convinced that abduco is an improvement: it doesn’t seem to properly buffer state when I disconnect and reconnect and it manages to break command-line editing in some terminals.

          I’d love to have a reliable thing that just opened a pty and just forwarded everything to it, buffering when necessary, without any feature creep.

          The macOS Terminal provides an environment variable containing a UUID and if you force-quit it then it restarts with all of the windows in the same position and with the same UUID in that environment variable. I use a wrapper around autossh that drops a file in a known location named with this UUID and containing the remote host name. When the terminal restarts, it automatically reconnects my sessions, so I can reboot my local machine and not lose any state. The Windows terminal and konsole do not preserve the UUID across restarts so I have to run abduco -l on the remote machine after a restart to find the sessions I need to reconnect to. I think the macOS terminal copied this feature from iTerm, I wish other terminal emulators would copy it too.

          1. 2

            I think the “buffering when necessary” would be kinda tricky. Like, you could run some graphical program like vim without switching to an alt screen, and it would have to buffer every intermediate drawing character in order to re-create the final state if you attached a new client. I think? Maybe there’s a smarter thing you could do.

            I am also bothered by tmux – especially the copy mode that I love so much. I wish that I could compose my environment out of smaller building blocks – so a session manager, running a multiplexer, with each “window” running a scrollback-buffering-pty-with-text-selection. Then I could swap out one “layer” for a better alternative without needing to re-write all of tmux. ptys are cheap! I’m currently working on an experiment to write a new “bottom layer” – the text selection bit – as an excuse to learn Rust, and fix some of the ergonomic complaints I have with tmux.

            1. 1

              I am also bothered by tmux – especially the copy mode that I love so much. I wish that I could compose my environment out of smaller building blocks

              Hmmm… tmux was originally written to replace the BSD program window(1) which just performed window management in a terminal. Separate tools could be used for copying and so on,

            2. 1

              Anything like this is doing some buffering: It maintains two connections to PTYs, one that talks to the clients (e.g. vim, ls, whatever) the other that talks to the real terminal emulator (or the next step in the chain if, for example, ssh is between it and the real terminal emulator). It reads from one PTY and writes to the other, sitting in a loop. The only extra thing necessary is that if the terminal disconnects then it needs to store any messages that it gets somewhere (ideally in an in-memory buffer that spills to the disk above a certain size).

      2. 1

        tmux lets you select and copy text with your keyboard.

        I love this feature, or at least until it stopped working for me on sway/wl-clipboard. I think it was a recent tmux update.. My attempt to bisect tmux to find where it broke led to it mysteriously working for about a week, then breaking again. I still have no clue why it doesn’t work for me anymore :(

        1. 1

          tmux 3.3 added the copy-command option which makes it easier to hook into the system clipboard… but I don’t know why that would have broken anything. If you aren’t using a custom copy-pipe (or whatever) command, tmux prints escape codes if it detects that your terminal emulator supports them. Maybe something changed with that detection, or your terminal emulator? You can force it on by adding set -g set-clipboard on to your ~/.tmux.conf. But if you have 3.3 you could try set -g copy-command "wl-copy".

    8. 12

      There are a few that seem to have stuck in my rotation:

      • entr: Runs an arbitrary command when a file changes, I have found this super helpful for running builds or post processing steps on files I am editing.

      • pandoc: Converts to and from many file formats. I find all sorts of uses for this tool even unblessed ones, but I primarily use it to covert from and to markdown, which allows me to compose in my preferred mode, vim+markdown. As an example I recently used it to add content to Confluence, which bizarrely only support importing Word documents. So I compose in markdown, convert to Word with Pandoc, and finally import into Confluence.

      1. 3
        • watch: could always be replaced with a Bash loop, but still super handy
        1. 1

          I always do the shell loop because I’ve never managed to actually learn how to use any of the fancy tools, so I just do loops with sleeps

      2. 1

        While I have not sat down and used it myself yet, I’ve had my eye on https://github.com/kovetskiy/mark for a while and it may be relevant to your interests.

        1. 2

          Coincidentally my coworker @ClashTheBunny has been working with that same tool to sync our knowledge base of markdown files with our Confluence instance, definitely a better option for continuous syncing. Thanks for bringing it up!

    9. 8

      chezmoi gives me the same CLI environment (shell aliases, editor configs, etc.) across all the machines I use, including work, home, laptops, desktops, and temporary VMs and containers.

      Disclaimer: I’m the author of chezmoi, but it’s popular and a lot of people have written about it.

      1. 3

        Chezmoi has been absolutely phenomenal, as has your support! I’m delighted to regularly evangelize it.

    10. 7

      I only replaced very few of the standard command line tools. I tried to use replacements for cat, du and df but even those are annoying for me because I cannot use them the way I want to. I ended up using them as separate commands. One thing I like to use though is a history search replacement like mcfly

      1. 8

        That looks nice, but I’ll throw in a vote for set -o vi as a great built-in solution to this problem which I use hundreds of times a day.

        Just pressing <esc> gives you normal vim /<your search term> to search history. Then pressing n goes to next match. That plus normal jk scrolling through your most recent history items is a great solution.

        1. 2

          Nice idea as well!

      2. 1

        This looks very cool! Thanks for sharing.

    11. 7

      There are some excellent upgrades I’m embarrassed to say I only learned about recently. Perils of working in a Microsoft environment so long, I suppose.

      • rg ripgrep instead of grep, way faster and respects .gitignore
      • fd instead of find. No need to type find -iname "*foo*" all the time, just fd foo
      • et Eternal Terminal instead of ssh, to keep my session live through reconnects

      And I’ve been experimenting with some newfangled toys tools as well

      • zsh + powerlevel10k for an extremely fast prompt with doodads
      • zsh + fzf for fuzzy history searching
      • fish for incredible ergonomics: autocomplete, advanced syntax highlighting, multiline command editing
      • fish + tide instead of powerlevel10k
      • fish + fzf, same reason as zsh
      • bat instead of cat for pretty colors and line #s
      • poetry for managing Python builds in a declarative way that I’m used to from Nix
      • spacemacs as a drop-in replacement for vim. the syntax highlighting is way better

      Most of these upgrades boil down to either ‘go fast’ or ‘more intelligent use of color’.

      1. 1

        Have you tried treesitter with neovim 0.5? I’d like to hear from someone who thinks vim’s syntax highlighting is bad and something else is good. I’m on the edge of trying to switch for a week, but haven’t had the time…

        1. 1

          I haven’t yet, but NeoVim is definitely on my radar. I’m excited to try out Neorg as well.

      2. 1

        et Eternal Terminal instead of ssh, to keep my session live through reconnects

        Wait, are you Jason Gauci? I heard of this through him. He has an excellent podcast besides making that.

    12. 6

      I use Nushell quite a bit for data-driven workflows and find it a good replacement for jq and friends. Also a big fan of skim and been using Just instead of writing Makefiles recently.

      1. 1

        Just looks cool! it is similar to Earthly, but more for local dev rather than CI. Very cool.

        1. 4

          If you like Just, you’ll love Toast!

          1. 2

            We use Toast at work quite heavily. It’s been great!

    13. 5

      I posted a similar thread with fantastic results in the past https://lobste.rs/s/eprvjp/what_are_your_favorite_non_standard_cli

    14. 5

      weather(){ CITY=${1:-auburn_wa} curl “http://wttr.in/$CITY” } more of a script than a tool

    15. 5

      I wrote two for myself:

      sandwatch records run times for tasks and averages past runtimes to predict how long this task will take (in sandwich units, five minutes).

      bloohm shows me the status of multiple tasks in such a way that I can take a break and don’t have to stare at the screen waiting for success.

    16. 4

      I guess I’m pretty boring. This is what I spend 99.9% of my day in (on HardenedBSD):

      1. sakura (okay, not a command-line tool. a terminal emulator, but it’s what I use to get to the command line)
      2. tmux
      3. zsh
      4. vim
      5. git
      6. weechat
      7. neomutt

      Except for using a web browser, this is what I spend my day in. Boring, but efficient.

      1. 1


        Do you happen to use relative numbers in vim?

        1. 2

          I’ve never heard of “relative numbers.” Until you just mentioned it, I didn’t even know that was a thing. I’ll give hybrid numbers a try and report back as to whether I like it.


          1. 1

            I use hybrid numbers and they are quite useful!

    17. 4

      Does cowsay count?

    18. 4

      I use the ones I made :p

      • broot for exploring files, navigating, searching content, etc.
      • lfs which more or less adds du and df plus parts of blk and some disk tagging
      • rhit to query nginx logs

      and some I didn’t made

      • scmbreeze which has interesting shortcuts for git
      • neovim, if it counts
      1. 2

        I like the idea of broot, but it glitched out between the UI and rm and I wound up blowing away a lot of files by accident.

        1. 2

          I never got any such report. Would it be possible to have more details (in a GH issue or in the chat if needed) ?

          1. 1

            Chat probably works, its hard to reproduce (and I dont want to :))

            I was using the previous sort by size magics (which seems to now be --sort-by-size), finding dirs and then asking broot to delete.

            That calls rm under the hood which at the time freaked broot out (it tried to refresh and put me in the top level), because of lag I would end up hitting the key combination again and then … toasting the parent (very large dir)

            I might give it another spin and see if it lags out on me again

    19. 4

      I cannot live without hstr any more: https://github.com/dvorka/hstr

    20. 3
      • I work with Git repos, but strictly through Mercurial + hggit. Templates + revsets are the best.

      • go file1 file2 … is a little wrapper to open multiple files/dirs with xdg-open. I’ll probably rename this script if I ever have to install Golang.

      • h myprogram tries, in order, to open the man page, or run mycommand --help | less flag, or with mycommand -h | less. Basically “I want to read your help page, dammit” with a side order of “in a pager, please, don’t barf it straight into the terminal”.

      • addkernel installs the active Conda environment as a one of my user’s IPython/Jupyter kernels. This makes it visible from any Jupyter installation, specifically my main one. This, in turn, lets me maintain one virtualenv with a Jupyter installation + extensions, instead of one Jupyter installation per {conda,virtual}env.

      1. 2

        h! What a great idea, I’m doing that! Actually, I might call it ;h since I type this often by accident anyway, as a vim user who maps ; to :

        1. 1

          Oh yes, nnoremap ; : is an excellent mapping.

          If you have a PageDown key to fall back on, nnoremap <Space> : is also fantastic, and even easier to type. No drawbacks so far in my experience.

    21. 3


      • z (better cd)
      • jq (json data munging)
      • delta (diff)
      • pandoc (pdf, docx generation)
      • tokei, ssc (sloc)
      • tmux (terminal multiplexer)
      • pv (progress bar)
      • shuf (reservoir sampling)
      • fzf and ag (only within vim)


      $ type open
      open is aliased to `xdg-open'


      • ncdu, diskonaut (disk usage)
      • pup (like jq, but for html)
      • ranger, nnn (file browser)
      • fd (line find)
      • esbulk, solrbulk, esdump, solrdump (indexing and index export tools)
      • git-cal (git calendar view)
      • clinker (mass link checker)
      • tcptrack, speedometer, iftop, bmon (net monitoring)
    22. 3

      M-x shell

    23. 3

      I want a version of jq that’s… worse. I have been using it for what feels like a decade and the query language is just as mystifying now as it was on day one. I want something with a far simpler and less expressive DSL, which can maybe only do a single transformation per execution, so that I pipe using the shell rather than in an opaque string. And which only does JSON stuff, not anything I can do already with grep. Does that exist?

      1. 2

        I haven’t used it yet, but I bookmarked dasel for that purpose.

      2. 2

        maybe grom, especially now that it’s written in Go, instead of PHP? https://github.com/tomnomnom/gron

        1. 1

          Wow, this is more or less exactly what I was hoping to find. Thank you!

          1. 1

            I’ve been using it recently as well, it works quite well for what I want

    24. 3

      Do people use fzf at the CLI?

      Not by typing fzf but I started using its zsh bindings so it’s acting as my ctrl-R (history search) and I’ve been getting into the habit of using its alt-C instead of typing cd. The ctrl-T behaviour can be useful, but zsh’s menu completion is usually good enough that I don’t need it. Overall I love the fzf shell bindings.

      Other fun tools I use are fd, the find replacement, and k9s for interacting with Kubernetes clusters.

      1. 2

        Do people use fzf at the CLI?

        Not by typing fzf

        I actually do that with fzy, because I am lazy to study the fzf bindings for Bash (and find out whether they work for Korn shell, then create mine), but I am also tired of the imprecise algorithm of fzf, and rather use that of fzy.

        But, obviously, I am the exception, not the rule.

    25. 3

      tcsh, ed, sam (and sometimes TECO); aria2c which is a superb wget replacement; RipGrep; other than that, I use quite some awk recently. I try to not clutter my userland with stuff that only adds colors.

    26. 3

      Some cli tools I frequently reach for are ripgrep, awk, jq (and its YAML wrapper: yq), plantuml.

      I often don’t invoke them directly, however, but through a mode or function in my IDE (Emacs). projectile helps me run ripgrep in a project, for example, and plantuml-mode invokes plantuml for me on relevant files.

      I live almost exclusively in Emacs, using Eshell when I work the cli. (Unless I need some ncurses app, like mtr.) The nice thing about this is I can take my entire IDE with me to remote machines, through the magic of TRAMP. Eshell also abstracts away the differences on hosts, so I mostly don’t have to care whether the underlying shell is bash or zsh.

    27. 3

      The submitter wrote up their favorites as a blog post. The HN thread continued the discussion of interesting tools.

    28. 2

      I’ve accumulated a bunch of junk scripts in my bin directory, most of it is really not used at all (I should clean that up..). Most of it, except git-remote-httpsify which I use all the time. It’s a script that configures a GitHub remote to use HTTPS for pull, SSH for push. Also I use patch2fbsd sometimes to convert git diffs to the kind of patch FreeBSD Ports expects (with .orig on the --- line, nothing on the +++ line instead of a/b / i/w directory prefixes.)

      As for the bigger tools, rg, fd, fzy, jq, tig, ncdu, dog, orpie… and still tree (this one) for ls-ing via these aliases. Probably should switch to exa.

      smart cd replacements, like z or zoxide or fasd?

      Nah.. zsh does everything I want already with cdpath=(~/my/project/dirs) and setopt auto_pushd pushd_ignore_dups auto_cd and alias p=popd.

      1. 3

        Git can natively rewrite the push URL for you, to save you the trouble of having to modify the remote. Example; https://github.com/adamcstephens/dotfiles/blob/7c4fe8adb094983a2ec67297925fe3178e90e2a2/gitconfig#L33

        1. 1

          Yeah, I’ve had something like that in my config for ages, but I don’t think it ever worked. (Of course I didn’t try hard enough :D)

    29. 2

      Do people use fzf at the CLI?

      I use

      alias gco='git checkout $(git branch | grep -v $(git rev-parse --abbrev-ref HEAD) | fzf)'
    30. 2

      It just lets you define shell functions and aliases that are path-specific and live in a .funky file.

      fish shell does this kind of implicitly, by prioritizing autocomplete based on PWD.

    31. 2

      Something I don’t use but want to: ‘find’ but with a breadth first search feature?

    32. 2

      I use atool almost daily. It’s part of the reasons I can’t remember the correct syntax of tar/unzip/7z…

    33. 2

      Sorry, so late to this. Feel free to explore my bin directory:


      One particularly useful thing I’d like to highlight is fzr, which is a small wrapper around fzf that provides an interactive repl for any command line filter. For example, use fzr <file.json jq to get an interactive jq repl that evaluates your jq expression against the input.

      Also of note are f, which is a simple awk/cut replacement that lets you split on regular expressions and use Python-like slices to select fields, and cb, which combines both pbcopy and pbpaste depending on how you use it, which I frequently use to interact with the clipboard from the command line.

      Edit: also, my conf directory contains all the packages I install from every package manager, so that’ll show literally everything I use.

    34. 2
      • fish + reljump.fish
      • custom fish prompt: ~/git/reljump[master]/completions>
      • vidir fish multiliner
      • begin/function/funcsave (fish keywords for running a multiliner or defining it as a function and possibly saving it)
      • htop + grep MHz /proc/cpuinfo
      • mpv
      • gitk + git-revise (seeing the commit stack + changing the commit stack: I wish for a tool that could do both, this is like ed)
      • math (fish builtin) as a calculator
      • calc as a calculator
      • python as a calculator
      • aunpack (part of atool) to unpack all sorts of archives – defuses tarbombs automatically
      • zram with zstd: My developer laptop only has 8G ram – this quadruples it at a surprisingly survivable performance penalty
    35. 2

      Linux only?

      1. 1

        Not at all. It wouldn’t let me submit unless I added a second tag, so I picked Linux.

        1. 4

          In that case, I maintain my own Windows based shell and tools so I can incorporate newer workflows than CMD. A lot of this has been scouting out good ideas to incorporate.

          • Although z is included, $CDPATH/%YORICDPATH% works better for me. These define a fixed search path, so you can build up muscle memory of where navigations go, which seems more usable than a heuristic match that can be wrong.
          • I’m not familiar with funky, but did add something like direnv which enables individual directories to contain scripts that modify the environment. This is nice to allow things like git repos to define state for their own environment; I use this so when entering git repos the prompt changes to indicate the current branch.
          • One early thing that motivated me was building a better directory enumerator for interactive use . I’m surprised these aren’t more common given how much users need to enumerate directories and how limited things like ls or ls -l really are. There’s no hard-and-fast rule that says an enumerator can only display information from the file system as opposed to file contents either.
          • Another thing that’s not spoken about enough is the line between a shell and a debugger doesn’t need to be rigid. I’ve built many cases now where the shell launches a child and debugs it to give the user more information about failures (eg. missing DLLs) or to let the user specify invasive changes (eg. override reported OS version.)
    36. 2

      I’ve been using theae for so long that I can’t remember what life was without them:

      • abduco, the “detach” feature of tmux extracted in its own tool. I run long commands in it so I can close the terminal and leave it running in the background.
      • sponge from moreutils to do inline editing for tools that don’t support it: tr a-z A-Z < file.txt | sponge file.txt
      • pick Interactive fuzzy selector (similar to fzf) but with less bells and whistles. I use it to interactively pick hosts to ssh into from my known_hosts and /etc/hosts files.

      I’ll also jump on the occasion to advertise a bunch of my own creation, that I use daily as well:

      • safe a password manager like pass, but using a master password rather than GPG keys. Targeted at people like me that are too scared of loosing their GPG key, amd don’t want to deal with GPG keys management.
      • pm, as stupidly simple package manager (unzip tarballs to $ROOT, and writes the content to a file for later removal/upgrade). I use it to install unpackaged tools to /usr/local while keeping track of what’s installed (just a better alternative to make install).
      • human, a tool to convert numbers into human readable format.
    37. 2

      I find ack and fd to be two of the more useful command line tools I’ve added to my system recently.

    38. 2

      I use rg for code searching, my shell itself is fish, $EDITOR is kakoune, and I use pv and ncat a lot.

    39. 2

      I have a few nice addons on my personal laptop, but since I’m too lazy to install all of that on all other systems I typically just use the standard tools most of the time. So even if I’m a Emacs person I use vi when in a new FreeBSD jail, and so forth.

      Some nice tools I use are:

      • Emacs (magit is awesome, mu4e is teriffic, my config has been pretty stale…stable the last decade or so)
      • ripgrep
      • fd
      • bat (cat replacement)
      • neovim (much nicer out of the box than vi)

      …but all of these are just nice bonuses. sed, grep, vi are forever.

    40. 2

      This isn’t a great tool (I wrote it) but it is, I believe, a great concept.

      rerun2 waits for filesystem events in or below the current directory, and re-runs a given command:

      rerun [OPTIONS] COMMAND

      eg. rerun --clear make test

      This is handy, for example, if you have your editor in one window, and a terminal running rerun, which is running your tests, in another. Every time you hit ‘save’ in your editor, the tests automatically re-run to display the updated test results, without you having to mess about with window focus or command line history. (--clear clears the terminal before each test re-run)

      This pattern turns out to be remarkably flexible. It’s useful if you’re editing any sort of document which is rendered to some visible results. e.g. while editing markdown in your favorite editor, see an auto-updating HTML rendering of it in another window.

      This is better than a “MarkdownEditor” app, that bundles together an editor and a preview pane in a single GUI app, because you aren’t tied to a particular editor or markdown renderer - you can wire together your favorite ones at runtime. And you can use the same principle on RestructuredText instead of markdown, or any other markup language.

      Another example I enjoy using it with is editing DOT code to see Graphviz renders. Once I got accustomed to it, many of the things I do for work end up being susceptible to this pattern. As a result, I probably end up spending 8 hours a day looking at the output of my humble “rerun” script.

      1. 1

        that is a great tool indeed, very similar to entr, https://lobste.rs/s/yfgwjr/what_interesting_command_line_tools_do#c_9g0i1u

    41. 1

      I also fear an overly custom environment, but I’ve come to like rg (aka ripgrep) a lot. I used to do a lot of find -exec fgrep but rg is many fewer keystrokes and marginally faster to execute.

    42. 1

      I use tldr all the time. While reading the docs is fine, it is really nifty to quickly know how to use tools like ffmpeg which I only whip out every once in a while.

    43. 1

      Shameless plug: I do a lot of work with binary formats and retro computing. To help with this, I wrote a small command-line calculator utility called xc. Allows decimal and hexidecimal input, always outputs as both, and allows for easy calculations using convenient infix notation.

    44. 1

      If you use ZSH Terminal, https://github.com/ohmyzsh/ohmyzsh

    45. 1

      I use Sublime Text as my $EDITOR and go-to editor using the subl command.

      Fork also has a command line helper to open and commit to repositories from the command line.

      I don’t use any cd replacement, since I use Fish, where you only have to type the name of the directory you want to enter. The only caveat is that you need to add a slash at the end, but the tab completion does that for you.

    46. 1

      Not sure how interesting but I built gitupdate to solve automating commits on certain things where commit message does not matter. Like docs or wikis. It takes file names changed as commit message. I also like to use it on feature branches sometimes too as I like to squash commits with an actual meaningful commit on merge. Saves a bit of time.

    47. 1

      I’ve been using massren[0] for a long time. It lets you rename all the files in CWD with $EDITOR.

      1. https://github.com/laurent22/massren
      1. 3

        vidir, which comes with moreutils, also lets you do exactly this.

        1. 1

          IIRC, moreutils also has qmv and qcp. Great tools.

    48. 1

      cointop, gotop, hstr, youtube-dl, topgrade, glances

    49. 1

      I thoroughly enjoy using gitsh, which I have mentioned on here before. A very sensible git shell maintained by a very sensible friend of mine.

    50. 1

      2 esoteric command line tools I like,

      vimdiff is a greatly enhanced version of diff… with colors! it is infinitely helpful for comparing files in the terminal.

      I also like lsof for checking network sockets, it isn’t as widely used as ss or netstat, but it is a potent way to monitoring network sockets in *nix lsof -i

      Also, not an esoteric command line tool, but I use this command all the time because it’s such a great find hack find . | grep "xyz"

      1. 1
        fs() { find -iname '*'"$@"'*' ; }

        With that in .bashrc, I use fs 'xyz'. You can also use fd instead.

        1. 1

          awesome, I should look more into find command options, it one of the more complex command line tool I have neglected to dig into.