From owner-freebsd-arch@FreeBSD.ORG Sat Sep 6 23:21:36 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62F44190 for ; Sat, 6 Sep 2014 23:21:36 +0000 (UTC) Received: from mail-ie0-f179.google.com (mail-ie0-f179.google.com [209.85.223.179]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2954712AB for ; Sat, 6 Sep 2014 23:21:35 +0000 (UTC) Received: by mail-ie0-f179.google.com with SMTP id rl12so498221iec.38 for ; Sat, 06 Sep 2014 16:21:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=QQvwZhcNOrIAxyBWfHb4j6+6soUb5UTgIeWzpisoah0=; b=gkfob5xS9p/mK9csWsO/NWROaheHSTKeLLDBKlNL1NVeDyYZq1eIAgp9yc/AgfF1dX Q7LXpNFU4B2cULkexuDn0p4GR57Y0KpXqfnpQxa+6A2xLUvXf/k8srAdXnwvEDA60cMH yivF/GKtcVJGnXfbfmkvy5eFwaFfCv8H2w473/5x0A/ezdw49Fzt6N/wUcLp6tlKYDjr /hc3M1tcjRnCJy8UZr547zzT310ZIo07Z12y0BD+g+JY59ONvF1n9RVy9VosYfcMvg2+ 2cTQCeP3HMUKXQOMB76GwuW8O42bKzOQ6As8agPQIKRjpDHfVCheYO0s3AoBNiKcmsJb bcBg== X-Gm-Message-State: ALoCoQmxdFhqE2EK884K4b95qJS+nA2jg1jMQnv2wPMzzfHrseMhei5Io8HfK/lPko9NM3a5PNnr X-Received: by 10.50.50.229 with SMTP id f5mr14096432igo.42.1410045353933; Sat, 06 Sep 2014 16:15:53 -0700 (PDT) Received: from netflix-mac.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id a11sm7185824igm.3.2014.09.06.16.15.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 06 Sep 2014 16:15:53 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_915E61AF-6F44-4602-A758-F6C844F0E0C6"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Improving /etc/motd and ANSI From: Warner Losh In-Reply-To: Date: Sat, 6 Sep 2014 17:15:51 -0600 Message-Id: References: To: Warren Block X-Mailer: Apple Mail (2.1878.6) Cc: freebsd-arch@FreeBSD.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 23:21:36 -0000 --Apple-Mail=_915E61AF-6F44-4602-A758-F6C844F0E0C6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Sep 6, 2014, at 5:01 PM, Warren Block wrote: > /etc/motd has been in need of improvement for some time. Recently, I = did a rewrite: >=20 > http://www.wonkity.com/~wblock/motd/motd > http://www.wonkity.com/~wblock/motd/motd.diff >=20 > 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. >=20 > As an experiment, this version uses ANSI underline escape sequences: > http://www.wonkity.com/~wblock/motd/motd.ansi >=20 > That reads better, is less likely to be misunderstood, and will work = on normal consoles and most terminal emulations in use today. >=20 > 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. >=20 > 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=92t 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=92d 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=92t look any farther than gnu=92s 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=92ll wind up with text that looks weird. None of these are huge show-stoppers. But it is a very nice camel=92s = nose at the moment, and I=92d hate to see the rest of the camel=85[*] Warner [*] http://en.wikipedia.org/wiki/Camel's_nose --Apple-Mail=_915E61AF-6F44-4602-A758-F6C844F0E0C6 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----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----- --Apple-Mail=_915E61AF-6F44-4602-A758-F6C844F0E0C6--