[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Vi backspace key problem
- From: Dag Wieers <dag wieers com>
- To: "Red Hat Enterprise Linux 4 (Nahant) Discussion List" <nahant-list redhat com>
- Subject: Re: Vi backspace key problem
- Date: Wed, 20 Jul 2005 02:34:12 +0200 (CEST)
On Wed, 20 Jul 2005, Tim Edwards wrote:
> Aleksandar Milivojevic wrote:
> > Quoting John Haxby <jch scalix com>:
> >
> > Yup, this is usually due to somebody being too helpful, knowing too little,
> > or
> > both. The erase character will usually be set to correct value (based on
> > termcap, terminfo, or serial line settings), and if you are using ssh to
> > connect to remote machine, this setting will be transfered too.
>
> Yeah that was it, thanks. There was the following in /etc/bashrc:
>
> if [ -x /usr/bin/tput ]; then
> if [ "x`tput kbs`" != "x" ]; then # We can't do this with "dumb"
> terminal
> stty erase `tput kbs`
> elif [ -x /usr/bin/wc ]; then
> if [ "`tput kbs|wc -c `" -gt 0 ]; then # We can't do this with "dumb"
> terminal
> stty erase `tput kbs`
> fi
> fi
> fi
>
> When it was commented out and I re-logged in the erase value shown by stty
> -all had changed from ^H to ^? and the backspace worked correctly! :)
>
> For some reason on our RHEL3 boxes the erase value is ^H and backspace works
> correctly, but on RHEL4 when it was that it was broken.
That's why it is important to replace as few config-files as possible. If
a config-file (like /etc/bashrc) has not been touched, an upgrade will
replace the file with the new default.
Whatever you have put in /etc/bashrc yourself could have gone into
/etc/profile.d/
In some cases this is not possible, but it is always better to first look
at your options and weigh them, before changing a config-file. Otherwise
you have to clean up the .rpmsave and .rpmnew files yourself.
PS I've once written a tool in bash to help in cleaning up leftover files
like .rpmnew, .rpmsave and .rpmorig and I desperately need to rewrite that
in python (allowing to diff available files, verifying with rpmdb and
being smart about it in general :))
Kind regards,
-- dag wieers, dag wieers com, http://dag.wieers.com/ --
[all I want is a warm bed and a kind word and unlimited power]
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]