been thinking about even though “the terminal” is technically not a single thing (it’s your shell, terminal emulator, OS, and programs) there are a ton of UI conventions that make the terminal feel like a unified environment, like
* full screen programs like top often use “q” to quit
* programs often turn off colour when writing to a pipe/file
* if a program is displaying a lot of text, it’ll often open “less” to let you scroll
a lot of these feel more like social conventions to me
some more UI conventions that make “the terminal” feel unified
* there’s a loose standard for command line arguments that many programs follow (not all!)
* TUI programs usually support using the mouse
* interactive REPLs often use readline or imitate it
i’m not sure how many of these are written down or standardized anywhere, it’s hard to imagine there’s a standard saying “you should imitate readline if appropriate” but maybe there is?
(2/?)
@b0rk A lot of these conventions were explicit products of the GNU project in the mid-80s. The developers started from the outside of Unix and worked their way inward, so they created some libraries (`getopt`, `readline`, etc) to standardise the user experience from the command line as much as possible, and they got involved in the POSIX committees to try and define a "nicer" Unix than the hodgepodge that existed at the time.
They couldn't fix `find` or `dd` syntax much, but they did a good job of convincing people of a few obvious good practices there.
@b0rk I didn't really get "into" Unix until the early 90s (I was a rote user before then), but at that time it was common for you to have your vendor's commands as awkward old-fashioned things that you slowly supplanted with more comfortable stuff in `/opt/gnu/bin/` or similar. It's one reason that the Linux kernel kind of came as a surprise: most folks thought of GNU as add-on upgrade "utilities" rather than a fully-fledged OS project.
@spacehobo thanks, I didn’t know that about the GNU project
@b0rk https://www.gnu.org/prep/standards/standards.html#Command_002dLine-Interfaces ← This section in particular was influential. The notion that `-` was for single-letter flags and `--` was for full-word parameters was kind of invented there (I'm sure it had its antecedents, but that's how it reached the broader Unix developer community)