[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Vi backspace key problem



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.
--
Tim Edwards



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]