[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: bash and set -o vi
- From: Norman Levin <normanlevin attglobal net>
- To: redhat-install-list redhat com
- Subject: Re: bash and set -o vi
- Date: Mon, 02 Jul 2001 23:39:09 -0400
Cameron Simpson wrote:
>
> On Tue, Jun 19, 2001 at 08:35:26PM -0400, Vincent <vguido ix netcom com> wrote:
> | I use vi to edit my command line, so I execute "set -o vi" to turn on the vi
> | command line editor. It works when I set this from the command line, but
> | not from .bash_profile or .bashrc. If I put "set -o vi" in either of these
> | files, I can't even unset it, I have to remove it from the file, login again
> | and type "set -o vi" on the command line.
> | Anyone know what's going on with this?
** all the following is true BUT, the must important screw up is the setting
if INPUTRC=/etc/inputrc. This needs to be UNSET in .bash_profile for the
set -o vi in .bashrc to be effective.
>
> Depends what you expect to happen.
>
> Login bash shells run the .bash_profile.
> Other interactive bash shells run the .bashrc.
> Personally, the last thing in my .bash_profile is
> . $HOME/.bashrc
>
> Then you can just put the "set -o vi" in your .bashrc, (here it really
> belongs because it's associated with interactive shells, and it will
> work for all your interactive shells.
>
> But...
>
> It will only take effect for new shells. Existing shells don't waste
> their time monitoring the .bashrc for changes. To have them take effect
> in an existing shell you must source your bashrc again:
>
> . $HOME/.bashrc
>
> So in short, I think you may have been expecting instant response, whereas in
> fact those files are only read by shells and particular times. So put it
> in your .bashrc and make a fresh subshell:
>
> % bash
> %
>
> It _should_ be active in the new shell, and can thus be expected to work
> from then on for new shells.
>
> P.S. I lied above, since I use a zsh instead of a bash (where I have the
> choice). But I do the equivalent for the zsh, and what I said about the
> bash config files is true.
> --
> Cameron Simpson, DoD#743 cs zip com au http://www.zip.com.au/~cs/
>
> During the Winter of '82-'83 I heard someone ask Kenny Roberts what he
> thought of the Honda GP bikes. Kenny said "Well, they're heavy, but
> they're slow." - roserunr noller com
>
> _______________________________________________
> Redhat-install-list mailing list
> Redhat-install-list redhat com
> https://listman.redhat.com/mailman/listinfo/redhat-install-list
--
Norman Levin
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]