The Poetics of CLI Command Names
smallstep.com
smallstep.com
Whether 'tis nobler in the mind to suffer
the slings and arrows of outrageous manpage,
or to take up `file` against the output of `which`,
and seek "Perl script text executable"?
In addition to standard naming of cmdLets, I find it helpful to have my own very short aliases and helper functions defined in my profile, to make powershell more convenient.
I've been reading the output of 'help' and reading it, and reading it, and I can't see a paradigm (apart from prolixity) or much consistency.
Unix commands have the advantage of brevity, and the inconsistencies somehow aid memorization.
Get-Command -Noun Computer
will return you all the cmdlets dealing with Computer.It returns Rename, Restart and Stop computer cmdlets.
Very handy.
(OS/400 was later renamed i5/OS, and then renamed again to IBM i. Likewise, AS/400 was renamed iSeries, then System i, and then merged with System p–successor of the RS/6000–to become POWER Systems. But, I prefer IBM's original product names–OS/400 is a far more distinctive name for an operating system called "IBM i", which promotes confusion with Cisco IOS and Apple iOS.)
(Unfortunately, I can't seem to find a direct quote from Mr. Snover stating this, but I can find a number of people saying he has said it before.)
https://devblogs.microsoft.com/powershell/verb-noun-vs-noun-...
The feature I most miss is command prompting. Type a command name, press F4, and fill in the blanks for the parameters. If a parameter takes enumerated values, type in a question mark (?) and get a list of the allowed values.
That was great for productivity.
So I had to read that sentence to find out about rg. I use git grep all day (aliased to gg, making his point), which I guess is a slower alternative.
Extra annoyance points if the second part of the command forms a valid sequence of options. I'm looking at you `netstat-nat`.
What?
> The previous bullet point was a joke.
The Mac has what is sometimes called a "BSD userland" with the result that cp, rm, ls, grep, etc work basically like they do on FreeBSD. But some Mac users prefer the GNU versions of those commands. To avoid breaking scripts that depend on the BSD behavior, when Homebrew installs the GNU versions, it names them gcp, grm, gls, ggrep, etc.
(You still can on the BSDs.)
This custom, of installing GNU utilities with a g-prefix, isn't just on macOS and Solaris, but also on other UNIX flavours as well.
It's just like POSIX's _t suffix. It's "reserved" but in practice nobody cares.
It’d probably quickly get shortened to “ygg”, which feels pretty nice to type to me...
So I named the workstation "yggdrasil" to make it a bit harder for my colleagues to memorize & type the name…
Well, that's nice in theory, but...
> In 50+ years of typing into terminals, we have not figured out how to have multiple versions of things coexist peacefully.
Well, yes, we have. By making the version number appear in the command name. It's not a great solution, but it's a solution. And since you didn't really provide a better one, it's pretty silly to advice against using it.
Also, symlinks are a thing. Nobody (normally) invokes python3.7m directly. There's a symlink pointing to it (or more likely not, as it's probably not the python you want).
jspaetzel seems to think this isn't good enough though, and that the commands should magically just have the non versioned name until multiple versions show up on the same system. I'm curious about how they envision that to work.
Actually, English botches IKEA, which in its native Swedish and presumably most other continental European languages is something like ee-kéa. It took me a while to decipher, first time I heard about eye-keer.
Internally we sometimes use a lower level tool for debugging TTS, which is called... "grunt".
We'd all be better off, as we would know never to type that command.
In most unixes, more is now an alias to less, resulting in the literal fact that "less is more".
Punny names stop being funny after a few years. How about a general principle of not using punny names in the first place?
Except when they're not.
"elm" (ELectronic Mail) begat "pine" begat "pico" (PIne COmposer) begat "nano".
"One of the miseries of life is that everybody names things a little bit wrong, and so it makes everything a little harder to understand in the world than it would be if it were named differently." --Richard Feynman
It also has built in syntax highlighting. But it's not usable for me, as it doesn't have vi-like keybindings. My ideal pager would be less with syntax highlighting, which should be possible because git shows logs, etc in color in less when they're larger than a screen full… checks less manpage It is! You just need to use -r or -R and make sure commands you pipe into it don't disable color when they detect a pipe (eg. use ls --color, not ls --color=auto). Thanks for sending me down that rabbit hole!
REM
Yes, it's the comment marker, standing for REMARK.
But it's also, metaphorically, a line that is "asleep."
Genius.