[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature-request: don't count history time comment lines when in HIST
From: |
Christoph Anton Mitterer |
Subject: |
Re: feature-request: don't count history time comment lines when in HISTFILESIZE |
Date: |
Fri, 27 Mar 2015 01:28:29 +0100 |
On Thu, 2015-03-26 at 15:21 -0400, Chet Ramey wrote:
> What do you mean "ignore its effect"? You have newlines embedded in
> history entries; what do you plan to do about them?
Well that was just the uneducated idea based on blind assumptions by
*not* having read the code O:-)
AFAIU, both already works:
- if cmdhist=on lithist=off
=> we get the "if true; then echo foo ; fi" layout for both history
and history file + in both cases each command stays "one command".
- if cmdhist=on lithist=on
=> we get the layout with embedded newlines in the history (with each
command staying "one command"), but in the history file it "breaks"
and the multiline command is split up in several commands
Right?
So why not make a thrid mode like:
- if cmdhist=on lithist=not-in-file
which keeps:
if true; then\n
echo foo\n
fi
in the history
but writes the serialised "if true; then echo foo ; fi" to the history
file.
Of course on re-loading the history it would again be the form without
\n, but better having the serialised form than mutliple commands.
And it would then at least work for the current command history
Cheers,
Chris.
- Re: feature-request: don't count history time comment lines when in HISTFILESIZE, (continued)
- Re: feature-request: don't count history time comment lines when in HISTFILESIZE, Chet Ramey, 2015/03/25
- Re: feature-request: don't count history time comment lines when in HISTFILESIZE, Christoph Anton Mitterer, 2015/03/25
- Re: feature-request: don't count history time comment lines when in HISTFILESIZE, Chet Ramey, 2015/03/25
- Re: feature-request: don't count history time comment lines when in HISTFILESIZE, Christoph Anton Mitterer, 2015/03/25
- Re: feature-request: don't count history time comment lines when in HISTFILESIZE, Chet Ramey, 2015/03/25
- Re: feature-request: don't count history time comment lines when in HISTFILESIZE, Christoph Anton Mitterer, 2015/03/25
- Re: feature-request: don't count history time comment lines when in HISTFILESIZE, Chet Ramey, 2015/03/26
- Re: feature-request: don't count history time comment lines when in HISTFILESIZE, Eric Blake, 2015/03/26
- Re: feature-request: don't count history time comment lines when in HISTFILESIZE, Chet Ramey, 2015/03/26
- Re: feature-request: don't count history time comment lines when in HISTFILESIZE, Christoph Anton Mitterer, 2015/03/26
- Re: feature-request: don't count history time comment lines when in HISTFILESIZE,
Christoph Anton Mitterer <=
- Re: feature-request: don't count history time comment lines when in HISTFILESIZE, Chet Ramey, 2015/03/27
- Re: feature-request: don't count history time comment lines when in HISTFILESIZE, Chet Ramey, 2015/03/25
- Re: feature-request: don't count history time comment lines when in HISTFILESIZE, Christoph Anton Mitterer, 2015/03/25
- Re: feature-request: don't count history time comment lines when in HISTFILESIZE, Chet Ramey, 2015/03/26
- Re: feature-request: don't count history time comment lines when in HISTFILESIZE, Christoph Anton Mitterer, 2015/03/26