CLI (3 blogmarks)

← Blogmarks

Assorted less(1) tips

https://blog.thechases.com/posts/assorted-less-tips/

I love an article like this where a person demonstrates a bunch of niche features of a tool they are a power-user of. In this case less.

I didn’t know there was much more to do with less than pipe it a bunch of stdout or view a log file with it.

A couple features that stood out to me where:

  • using -N and -n to toggle line numbers on and off
  • doing successive filtering with multiple % pattern invocations
  • pulling in and navigating multiple files (still not totally sure of the workflow I’d use this for)

Git - Plumbing and Porcelain

https://git-scm.com/book/en/v2/Git-Internals-Plumbing-and-Porcelain

I like this concept of Plumbing versus Porcelain CLI commands. I recently referenced it in Connect To Production Rails Console on AWS / Flightcontrol - Notes from VisualMode.

because Git was initially a toolkit for a version control system rather than a full user-friendly VCS, it has a number of subcommands that do low-level work and were designed to be chained together UNIX-style or called from scripts. These commands are generally referred to as Git’s “plumbing” commands, while the more user-friendly commands are called “porcelain” commands.

Build complex CLIs with type safety and no dependencies

https://bloomberg.github.io/stricli/

I heard about this from Matt Pocock who says he is moving a tool he is building from Commander to StriCli.