Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Sep 2014 17:15:51 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Warren Block <wblock@wonkity.com>
Cc:        freebsd-arch@FreeBSD.org
Subject:   Re: Improving /etc/motd and ANSI
Message-ID:  <B16D580C-1337-40B2-8DC2-AEF63D0A4027@bsdimp.com>
In-Reply-To: <alpine.BSF.2.11.1409061646170.69004@wonkity.com>
References:  <alpine.BSF.2.11.1409061646170.69004@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]

On Sep 6, 2014, at 5:01 PM, Warren Block <wblock@wonkity.com> wrote:

> /etc/motd has been in need of improvement for some time.  Recently, I did a rewrite:
> 
> http://www.wonkity.com/~wblock/motd/motd
> http://www.wonkity.com/~wblock/motd/motd.diff
> 
> This new version still has the problem of using "in-band" quote marks to mark up the commands.  We tell the reader to run `man man', for example, but it's not particularly obvious that the quotes should not be entered.
> 
> As an experiment, this version uses ANSI underline escape sequences:
> http://www.wonkity.com/~wblock/motd/motd.ansi
> 
> That reads better, is less likely to be misunderstood, and will work on normal consoles and most terminal emulations in use today.
> 
> It will not display correctly on things that do not understand VT100/VT220 or ANSI codes, but I suspect that is a vanishingly small portion of the user base.  Those users are also likely to be familiar with the problem.
> 
> Is there some showstopper reason not to commit this ANSI version?

It embeds the notion that all the world is a VT100 and interprets the ANSI escape code identically.

In years past, this definitely wasn’t the case. But in those years we had many different breeds
of terminal roaming the earth, and these terminals were all somewhat different (even at the same
installation you’d have a heterogeneous setup because different departments got different
vendors to supply their gear). These changes would break that. One of the nice things about
Unix has always been it played very nicely in a heterogeneous environment and all fancy
smancy curses action was done through a layer of indirection so it would work everywhere,
unlike VMS where things were more hard-coded and it was always hard to use non-DEC
gear.

It also assumes that all users want to see the fancy ANSI version with underlines and such. While
rather innocuous, one needn’t look any farther than gnu’s color ls to see what madness lies not
too far down this path.

Finally, console scraping code may be affected in some minor way and you’ll wind up with
text that looks weird.

None of these are huge show-stoppers. But it is a very nice camel’s nose at the moment, and
I’d hate to see the rest of the camel…[*]

Warner

[*] http://en.wikipedia.org/wiki/Camel's_nose

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJUC5WnAAoJEGwc0Sh9sBEAh3wP/3HrEa9HIkO59qmHhT+AjqHU
cu2FfK+BS+Nmj+1X4JHo0OJNm4nTeld3dpD3Z/etzgTuiFh9T3v3tLp33rb2JROR
UrwV9X2ge29b+aP2bC+Aid6dHih/apq+YhCdC9jwhexzPwYWQaWio73AnbCBPAR1
sb1K4gAa18/EC6K2fHdWhgHsxCqfUhToJFRxMwGwpUaB4c/FHH402NYuDieN4+M4
ZQFKjM8AckzDY3MmEd/cKxAuqRsfhjlM7OWZuV8gIlM+UEWNnCmyYEql5ZYdFdeA
gTecCHF+mQZTDRPrQYHq3ajs1nCOCw4/y7v0BGP4/Q/lKR9rtvuuGQ55r8igjPx4
fouoLpQjJ9xOJfX+fUsHRGqWkzgsFOw8jWDaWlDaCzRi5NOXrga20aQspLFkU8m2
rFwMrlHaM0CaA9YIxQmLBsJ5gyLlQ3B9ax3WVk9FRWLHEvQdH68f1b8iY4rCsRWH
agtF0iE+urk4J8Ud4p3mIbQndGxUOefbTE3deENERLdGKvk6SkzWY9r+PHXQQhIP
qmHCkqZ4ulWKf3trzCPIKQPMcMH6jukV/WlbATEEmcGDUnqfwqWkPywhngoPG6lv
bigxH4D6JOWt9Df5Z3ol1Eb0uTV5YAiFkZQhom/7inbhB3Vz+aPFImL9RjuvjyPb
uT/4k80I/Mn3Lo2ewM7D
=GRJx
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B16D580C-1337-40B2-8DC2-AEF63D0A4027>