RSSAmplifier

Blog

Esoteric Rubbish

Rambling so utterly bereft of purpose or brevity or praticality or utility or decorum.

eseth.orgRSS feed ↗10 posts

Latest posts

Visualize changes to the Git DAG in real-time

Visualize changes to the Git DAG in real-time Teaching users how to perform more than just the basic Git operations eventually requires some discussion about the Git DAG. It’s the the inevitable just think of branches as… discussion and while that has become something of an overused joke, it really is a useful and effective mental model. Git users that only use the push , pull , merge , and commit…

Fast, parallel grep using find and xargs

Fast, parallel grep using find and xargs In recent years there’s been a bit of a movement away from using grep . The usually cited reasons are to only search a specific file type, automatically ignore VCS directories, and easily ignore other noise directories with per-project configuration, and speed. More recently there’s been a push to replace older utils written in C with utils written in…

Mergetools: Stop doing three-way merges!

Mergetools: Stop doing three-way merges! Update 2024-11-19: This post took a different direction than I intended. Thanks to several people on the Git mailing list this proposal has been included in upstream Git rather than in individual mergetools. There is now a hideResolved flag in Git v2.31.0 and later. This post now reflects what ramifications that upstream change will have on the mergetools…

Generate PDF Invoices from the CLI with groff

Generate PDF Invoices from the CLI with groff I’ve been curious about roff (troff, nroff, groff, etc) for years. I knew it was used to format manpages and that it could produce PDFs in some capacity, and that it had a crazy ecosystem of preprocessors (tbl, pic, eqn, soelim, chem, dformat , grap, dot, refer, bib, ideal, grn, g3) but not much else. I stumbled across an old book from 1987 by Dale…

One call Git status for your shell prompt

One call Git status for your shell prompt There are a million projects that retrieve status info from Git and reformat it for use in a shell prompt ( 1 , 2 , 3 ). Git itself even ships with one . Zsh has an excellent built-in system called vcs_info that I’ve contributed to and written about before . The way these scripts usually work is to invoke Git many times in order to retrieve all the…

Browse devdocs.io from the CLI

Browse devdocs.io from the CLI Hopefully you’re already familiar with https://devdocs.io/ but if not go use it and then come back. It’s a great way to quickly drill down on reference documentation for a big list of available docs, and it works completely offline. I use it constantly. My daily workflow involves a full-screen web browser and a full-screen terminal so it’s not out of my way to pull…

Use an External Fuzzy-finder for CLI Completion

Use an External Fuzzy-finder for CLI Completion Fuzzy-Finders CLI fuzzy-finders are really great. You feed them options via stdin, fuzzy-find the match you want, then get the result via stdout (ready to be processed by additional shell tools). Simple, fast, immediately useful, and if you can already write a shell script there’s nothing new to learn. printf '%s\n' foo bar baz quux | fzy | xargs…

tmux Status Line

tmux Status Line This is an experiment to move $PWD and Git info from my shell prompt into tmux pane titles. I’m just trying this on for size for now but it looks pretty: https://github.com/whiteinge/dotfiles/commit/984ee79371a4 Pros: It reduces a bit of CLI clutter and gives a single, stable place to look for certain info. You can see infos even when running full-screen CLI programs. Cons: You…

Setting project-level grep options

Setting project-level grep options Using Zsh’s precmd The venerable grep has not aged terribly well giving rise to (the admitedly cool) Ack . One handy feature of Ack is being able to set options specifically for a single project by placing a dotfile in the project directory. This is easily mimicked for grep using a handy Zsh feature. (This is also possible in Bash, of course, with a bit more…

Mercurial Info in Your Zsh Prompt

Mercurial Info in Your Zsh Prompt See also: Git in Zsh What is VCS_Info ? If you aren’t already familiar with VCS_Info in Zsh, fire up your favorite manpage viewer and read through the section in zshcontrib(1). It allows you to pull information out of a version-controlled repository and display that in your shell prompt. The big win for VCS_Info over other, similar solutions is that it is built…