[Top][All Lists]

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

Re: multi-line commands in the history get split when bash is quit

From: Jon Seymour
Subject: Re: multi-line commands in the history get split when bash is quit
Date: Sun, 6 Feb 2011 11:02:51 +1100

On Sun, Feb 6, 2011 at 10:51 AM, Bob Proulx <address@hidden> wrote:
> Slevin McGuigan wrote:
>> I am unsure whether or not this a bug. Anyhow, it is pretty annoying...
>> I use simple multi-line scripts very often in bash and use vi mode
>> to edit them. By using
>> # shopt -s cmdhist
>> # shopt -s lithist
>> I can achive multi-line editing. Which is fine.
>> But this ability "breaks" as soon as I close bash and open it again.
>> Is this a bug?
>> Are there suggestions for workarounds?
> Are you thinking that setting shopts should in some way be persistent
> across program invocations?  That would be pretty annoying and a
> severe bug if it did.
> Are you forgetting to put your desired configuration into ~/.bashrc
> where it is loaded when bash starts?
> Are you forgetting to put
>  source "$HOME/.bashrc"
> into your ~/.bash_profile where it will source your .bashrc when you
> log into your account?

It might not be clear whether Slevin did that, but I certainly did and
reproduced the behaviour he reported on both
OSX and Linux. I didn't expect it to work on OSX (3.2.17) since
.bash_history doesn't seem to have a format that would allow it. The
version I tried on Linux 3.2.25 does have a .bash_history format that
could support it, but it still behaved the same way.


> Bob

reply via email to

[Prev in Thread] Current Thread [Next in Thread]