2008-05-06

Make backspace work in Solaris shell

From: http://osnews.com/comments/19715

> > And they're going to update the default shell to understand
> > the backspace key
> Thank god. Having the backspace key spew out useless junk
> instead of deleting characters is a personal irritant.
>
It doesn't take too much time to type "stty erase <backspace>"
into your shell's .rc file...

Right.

OTOH I really like this comment:


RE[3]: Finally!
by sbergman27 (3.96) on Tue 6th May 2008 22:25 UTC in reply to "RE[2]: Finally!"


If it would fail gracefully and not do anything that would be one thing, but it doesn't. It spits out characters.

It's certainly a different day and age today. :-) I've seen so much:

\E[23~
\[7m
\E[!p\E[?3;4l\E[4l\E>

in my time. Fixed so many broken terminfo and termcap definitions. Diagnosed so many flow control glitches and mismatched terminal settings on AT&T 4410s and 605s and Wyse50s and Wyse60s. Done so much blind typing into terinals whose screen contents were completely unrecognizable, that when I see a few strange characters, it takes my brain a moment to recognize that there is actually something wrong.

There are only really two important terminal types that I work with today, and those are "linux" and "xterm". And those work so consistently well these days that I can fully understand the surprise that the non-graybeards must experience when a key isn't mapped right. It's a sign that some of the more stupid crap I used to have to deal with is now truly history. Or at least a rarity. Praise the Lord! (And I'm an atheist!)

The backspace thing was, indeed, an embarrassing issue for the year 2008. Especially since, if I understand correctly, it was not a matter of the erase character not being set, but of the shell not handling the defined erase character properly. But it *does* seem to be history. I'm not sure what the old config was, but when I bring up gnome-terminal in 2008.05 I get bash, and the backspace works just fine. I was expecting to be able to ctrl-alt-F1 to check out a text console, but that doesn't seem to be the right key sequence. Unix is Unix is Unix[1]... except for all those little things we take for granted about our usual flavor. :0

[1] That would be "POSIX-like OS is POSIX-like OS is POSIX-like OS" for you anal retentives regarding Linux not being Unix. But even you have to admit it loses something in the translation. ;-)

Updated: May 11th 2008

No comments: