>When I throw xterms from another linux machine, the backspace key
>doesn't work properly (is set to something other than ~H). It currently

it happens to me all the time because i use a huge variety of unices all
of which have their defaults (ugh, irix thinks ^_ should be interrupt
when the rest of the world (even dos!) knows it should be ^C).  anyway,
i got tired of 
stty erase ^?  and ^H, and just wrote a wee shell script i source from
my .login, and i put it on every machine i use more than once.  then,
i never have to worry again about it not working.  well, sometimes
screen -r'ing from a weird machine throws it off in the reattached session
but thats pretty rare (and i'm a hardcore screen user).

it goes a little something like this.


#!/bin/sh
# $Id: .loginstuff,v 1.24 1998/04/09 02:03:04 fool Exp $
#
# this being the script which does smart backspace sensing...
# with new improved command-instead-of-backspace recognition.

set BOINK
echo -n "Hit your backspace key and ENTER: "
read BOINK
if echo $BOINK | grep ' ' > /dev/null 2>&1
  then 
  echo "you dork."
  echo
  exec $BOINK
fi
if test x"$BOINK" = x; 
  then 
    echo "yer backspace was already werkn right, freak."
  else 
    echo $BOINK
stty erase $BOINK
fi
exit 0

sure, i have to hit backspace every time i log in, but after using it
for 4 years, it becomes second nature.
or maybe even first nature.

and, i think this version will run the command you hit instead of backspace
if you forget, too.  i don't forget anymore, tho.  you can hack to taste.

---------------------------------------------------------------------------
Send administrative requests to [EMAIL PROTECTED]

Reply via email to