[TUHS] INed/Rand Editor/Ned [was Re: My EuroBSDcon talk (preview for commentary)

G. Branden Robinson g.branden.robinson at gmail.com
Tue Sep 17 22:52:24 AEST 2019


At 2019-09-17T07:46:02-0400, Theodore Y. Ts'o wrote:
> To be fair, spectre-multdown-checker is a shell script, and while you
> can use tput, that's not super-portable (some versions take termcap
> names, some take terminfo names, and the only thing that has been
> standardized is "init", "clear", and "reset"),

Now that you mention it I do remember Thomas Dickey saying that at some
point.

> and said script was designed to work on Linux and *BSD systems.

In that case I'd query tput through a function that got defined
differently based on the output of uname, or tput's own version string
output if it could be coaxed into giving me one (Dickey's ncurses tput
supports -V for this purpose; I don't know about the BSDs).

The thrust is to get that egregious noise out of the output strings as
written in the source file so as to preserve their human-readability.

Better this:
	echo "${fg_black}${bg_cyan}STATUS:${normal}"
Than:
	echo "\033[30m\033[43mSTATUS\033[m"

...in which am I more likely to notice typos?  Given an editor that
lexically analyzes your shell script[1], which is more likely to
integrate well with a spell-checker?

Regards,
Branden

[1] Okay, so that turns out to be nearly impossible, at least if you
want to recognize every possible construct[2].

[2] https://hal.archives-ouvertes.fr/hal-01890044/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20190917/a3553ca4/attachment.sig>


More information about the TUHS mailing list