Re: bash "set -o vi"


Subject: Re: bash "set -o vi"
From: Jim Cole (greyleaf@yggdrasill.net)
Date: Sat Mar 04 2000 - 10:56:21 MST


Hi Dan.

Not sure about bash1. I have a /bin/bash and /bin/bash2 which version as

[greyleaf@freyr ~]$ /bin/bash --version
GNU bash, version 2.03.8(1)-release (powerpc-yellowdog-linux-gnu)
Copyright 1998 Free Software Foundation, Inc.
[greyleaf@freyr ~]$ /bin/bash2 --version
GNU bash, version 2.03.7(1)-release (powerpc-redhat-linux-gnu)
Copyright 1998 Free Software Foundation, Inc.

Both choke on set -o vi placed in an init script in the same manner.
When you check SHELLOPTS it is clear that bash picked up the setting,
but apparently readline is already hosed at that point. You can't even
do a set -o vi at the command line once an attempt has been made in an
init script.

Another thing that fixes the problem is adding set editing-mode vi as
the *last* line in /etc/inputrc. Not that most people would ever want
to do that. If you place it before the key bindings, it won't work, so
I am certain that the key bindings are at the root the problem.

Jim

Dan Burcaw's bits of Sat, 4 Mar 2000 translated to:

>Jim,
>
>Does this occur under bash1 or bash2?
>
>> Hi - This is a Red Hat bug that has wormed its way into YDL. The
>> /etc/inputrc file sets up key bindings that break the vi command
>> line functionality. My understanding is that basically Red Hat
>> doesn't care, since they feel the settings make life easier for
>> new users *shrug*.
>>
>> The easiest fixes are to either remove the /etc/inputrc file and/or
>> create a .inputrc file in your home directory. If you do the latter,
>> you will probably need to unset the INPUTRC environment variable and
>> re-source your .bashrc to pick up the change the first time. Either
>> that or just brute force it by logging out and back in ;)
>>
>> Jim
>>
>>
>> Paul J. Lucas's bits of Fri, 3 Mar 2000 translated to:
>>
>> > I have the exact problem described here:
>> >
>> > http://plug.skylab.org/199908/msg00283.html
>> >
>> > wherein a "set -o vi" inside a .bashrc doesn't work. If
>> > removed and done on the command line, it works fine.
>> >
>> > Has this been fixed?
>> >
>> > - Paul
>> >
>> >
>>
>>
>
>Regards,
>Dan
>
>Terra Soft Solutions, Inc.
> Yellow Dog Linux
> "The Ultimate Companion for a Dedicated Server"
> http://www.yellowdoglinux.com/
>
> Black Lab Linux
> Advanced Workstations and Parallel Solutions
> http://www.blacklablinux.com/
>
>



This archive was generated by hypermail 2a24 : Sun Apr 02 2000 - 21:09:29 MDT