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!
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 theFile
menu; it’s always by typingmate
on the command line or viarmate
on a remote machine).So, I guess to answer your question: TextMate on the Mac. Pretty good command-line tooling. :)
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.
Undoubtedly there are worthy tools, and better replacements, but the installed base problem is a powerful force….
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).
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 mytmux
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 informativeag
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 fortruth(?=justice)
)sort
has the-V
for ordering version numbersjq
is absolutely indispensable for doing JSON web/API stuffsar
on Irix for (kind of)vmstat
++, but it’s not on macOS, it’s there insysstat
package on Linux thodiff a b | vim -R -
for colored diffs without having to install a custom thingFind lots of tools I have in my
~/bin
here: https://leahneukirchen.org/dotfiles/tools.htmlInteresting is, maybe:
And lots of more goodies in my .zshrc.
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.
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.
(Personally, I use git-revise to amend to older patches.)
These date tools are hilarious. Do you actually have use for the days since the french revolution? Is that what it does?
my favorite date tool: https://linux.die.net/man/1/ddate. It’s a shame it was removed from coreutils.
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
):Just
tz
will print the times in all the timezones, andtz 1900
(ortz 19:00
,tz 7pm
) will print the times corresponding to 19:00 in all the timezones.I was mostly interested in the decimal time, but then I went with it and implemented the calendar too.
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?
Network printers that speak JetDirect.
For working with web APIs, HTTPie and JQ are my go-tos.
RipGrep for fast searching.
For jq: did you heard about fx? https://fx.wtf
First I’ve heard of it. Looks neat!
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.
Strongly seconded. rclone is rsync for cloud storage services. S3. Dropbox. Box. Google Drive. Tons more.
I got excited about rclone until I saw it didn’t support iCloud (to be fair, nothing does)
Would local file syncing to mounted iCloud folders not handle that need?
Not if you don’t use a Mac?
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.
Vimdiff works pretty well for that use case if you’re from that church.
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.
I’ve never seen VisiData before - it’s amazing! Thank you!
Paul’s doing a Strange Loop workshop and I’m so sad I have to miss it due to conflicting obligations.
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: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 runnix-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 makesnix
’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
, thenfg ; 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…
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!I agree on the persistent sessions but it really bugs me that tmux conflates two sets of functionality:
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 oftmux
because subsequent versions oftmux
made it harder and harder and eventually impossible to tell it not to break my terminal’s scrollback. I’m not completely convinced thatabduco
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.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.
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,
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).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 :(
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 customcopy-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 addingset -g set-clipboard on
to your~/.tmux.conf
. But if you have 3.3 you could tryset -g copy-command "wl-copy"
.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.
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
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.
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!
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.
Chezmoi has been absolutely phenomenal, as has your support! I’m delighted to regularly evangelize it.
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
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 pressingn
goes to next match. That plus normaljk
scrolling through your most recent history items is a great solution.Nice idea as well!
This looks very cool! Thanks for sharing.
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 .gitignorefd
instead of find. No need to typefind -iname "*foo*"
all the time, justfd foo
et
Eternal Terminal instead of ssh, to keep my session live through reconnectsAnd I’ve been experimenting with some newfangled
toystools as wellMost of these upgrades boil down to either ‘go fast’ or ‘more intelligent use of color’.
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…
I haven’t yet, but NeoVim is definitely on my radar. I’m excited to try out Neorg as well.
Wait, are you Jason Gauci? I heard of this through him. He has an excellent podcast besides making that.
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 writingMakefile
s recently.Just looks cool! it is similar to Earthly, but more for local dev rather than CI. Very cool.
If you like Just, you’ll love Toast!
We use Toast at work quite heavily. It’s been great!
I posted a similar thread with fantastic results in the past https://lobste.rs/s/eprvjp/what_are_your_favorite_non_standard_cli
weather(){ CITY=${1:-auburn_wa} curl “http://wttr.in/$CITY” } more of a script than a tool
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.
I guess I’m pretty boring. This is what I spend 99.9% of my day in (on HardenedBSD):
Except for using a web browser, this is what I spend my day in. Boring, but efficient.
Do you happen to use relative numbers in vim?
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.
https://jeffkreeftmeijer.com/vim-number/
I use hybrid numbers and they are quite useful!
Does cowsay count?
I use the ones I made :p
and some I didn’t made
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.I never got any such report. Would it be possible to have more details (in a GH issue or in the chat if needed) ?
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
I cannot live without hstr any more: https://github.com/dvorka/hstr
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 runmycommand --help | less
flag, or withmycommand -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.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:
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.Daily:
Alias:
Occasionally:
M-x shell
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 withgrep
. Does that exist?I haven’t used it yet, but I bookmarked dasel for that purpose.
maybe grom, especially now that it’s written in Go, instead of PHP? https://github.com/tomnomnom/gron
Wow, this is more or less exactly what I was hoping to find. Thank you!
I’ve been using it recently as well, it works quite well for what I want
Not by typing
fzf
but I started using its zsh bindings so it’s acting as myctrl-R
(history search) and I’ve been getting into the habit of using itsalt-C
instead of typingcd
. Thectrl-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
, thefind
replacement, andk9s
for interacting with Kubernetes clusters.I actually do that with
fzy
, because I am lazy to study thefzf
bindings for Bash (and find out whether they work for Korn shell, then create mine), but I am also tired of the imprecise algorithm offzf
, and rather use that offzy
.But, obviously, I am the exception, not the rule.
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.
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, andplantuml-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.The submitter wrote up their favorites as a blog post. The HN thread continued the discussion of interesting tools.
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 ofa
/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.Nah.. zsh does everything I want already with
cdpath=(~/my/project/dirs)
andsetopt auto_pushd pushd_ignore_dups auto_cd
andalias p=popd
.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
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)
I use
fish shell does this kind of implicitly, by prioritizing autocomplete based on PWD.
Something I don’t use but want to: ‘find’ but with a breadth first search feature?
I use atool almost daily. It’s part of the reasons I can’t remember the correct syntax of tar/unzip/7z…
Sorry, so late to this. Feel free to explore my bin directory:
https://github.com/kbd/setup/tree/master/HOME/bin
One particularly useful thing I’d like to highlight is
fzr
, which is a small wrapper aroundfzf
that provides an interactive repl for any command line filter. For example, usefzr <file.json jq
to get an interactivejq
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, andcb
, which combines bothpbcopy
andpbpaste
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.
~/git/reljump[master]/completions>
vidirfish multilinergrep MHz /proc/cpuinfo
ed
)Linux only?
Not at all. It wouldn’t let me submit unless I added a second tag, so I picked Linux.
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.
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.funky
, but did add something likedirenv
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.ls
orls -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.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 myknown_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 likepass
, 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 tomake install
).human
, a tool to convert numbers into human readable format.I find ack and fd to be two of the more useful command line tools I’ve added to my system recently.
I use rg for code searching, my shell itself is fish, $EDITOR is kakoune, and I use pv and ncat a lot.
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:
…but all of these are just nice bonuses. sed, grep, vi are forever.
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.
that is a great tool indeed, very similar to
entr
, https://lobste.rs/s/yfgwjr/what_interesting_command_line_tools_do#c_9g0i1uI 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.
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.
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.
If you use ZSH Terminal, https://github.com/ohmyzsh/ohmyzsh
I use Sublime Text as my
$EDITOR
and go-to editor using thesubl
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.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.
I’ve been using
massren
[0] for a long time. It lets you rename all the files in CWD with$EDITOR
.vidir
, which comes with moreutils, also lets you do exactly this.IIRC, moreutils also has qmv and qcp. Great tools.
cointop, gotop, hstr, youtube-dl, topgrade, glances
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.
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"
With that in
.bashrc
, I usefs 'xyz'
. You can also use fd instead.awesome, I should look more into find command options, it one of the more complex command line tool I have neglected to dig into.