On 3/26/15 8:28 PM, Christoph Anton Mitterer wrote:
> 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.
B
On Thu, 2015-03-26 at 16:54 -0400, Chet Ramey wrote:
> The solution cannot be bash-specific; the history library is used by many
> other applications.
One, design-wise ugly, idea:
Couldn't you abuse the history comment char another time for that?
Like consider anything between a ^#[[:digit:]] to b
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 alread
On Thu, 2015-03-26 at 16:26 -0400, Chet Ramey wrote:
> > And b) it seems kinda ugly that one needs to explicitly set a default
> > value that would be set later anyway.
> Maybe.
Okay, keep me tuned if you should plan to actually do that, cause then I
can revise manually setting it :)
> It is wh
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 3/26/15 4:51 PM, Eric Blake wrote:
> On 03/26/2015 01:21 PM, 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?
>
> Can't history lines be recorded as
On 03/26/2015 01:21 PM, 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?
Can't history lines be recorded as $'...\n...' so as to be one line per
command, even when the command contained newlines?
--
On 3/25/15 8:06 PM, Christoph Anton Mitterer wrote:
> On Wed, 2015-03-25 at 16:19 -0400, Chet Ramey wrote:
>> When you start bash, and source your .bashrc, the history comment character
>> is not set. You haven't set it in .bashrc, I assume
> Yes, I haven't.
>
>> Since that's not set, the lines b
On 3/25/15 6:03 PM, Christoph Anton Mitterer wrote:
> On Wed, 2015-03-25 at 16:21 -0400, Chet Ramey wrote:
>> https://lists.gnu.org/archive/html/bug-bash/2011-02/msg00042.html
> Maybe I've missed something but that thread basically just discussed the
> same issue without giving a solution, right?
On Wed, 2015-03-25 at 16:19 -0400, Chet Ramey wrote:
> When you start bash, and source your .bashrc, the history comment character
> is not set. You haven't set it in .bashrc, I assume
Yes, I haven't.
> Since that's not set, the lines beginning with
> `#[digit]' are not recognized as timestamps a
On Wed, 2015-03-25 at 16:21 -0400, Chet Ramey wrote:
> https://lists.gnu.org/archive/html/bug-bash/2011-02/msg00042.html
Maybe I've missed something but that thread basically just discussed the
same issue without giving a solution, right?
I understand you concerns about any format changes, that's
On 3/25/15 3:50 PM, Christoph Anton Mitterer wrote:
> There is the lithist thingy, to preserve newlines in commands which I'd
> quite like.
> But it doesn't work obviously when [re-]storing [from/]to the history
> file.
>
> Would it be possible to have e.g. another option, so that things work
> l
On 3/25/15 3:02 PM, Christoph Anton Mitterer wrote:
> On Wed, 2015-03-25 at 14:48 -0400, Chet Ramey wrote:
>> The history file truncation code already skips lines that look like history
>> timestamps. Look at history.c:history_truncate_file().
> Ah? Hmm was that only recently introduced?
> I'm ha
On Wed, 2015-03-25 at 15:09 -0400, Chet Ramey wrote:
> > I'm having bash4.3 with patches up to including 33. And this time I
> > looked whether Debian added any of it's goodness ;-)
> I'll take a look.
Thanks :)
Speaking of feature-requests and history...
There is the lithist thingy, to preserv
On 3/25/15 3:02 PM, Christoph Anton Mitterer wrote:
> On Wed, 2015-03-25 at 14:48 -0400, Chet Ramey wrote:
>> The history file truncation code already skips lines that look like history
>> timestamps. Look at history.c:history_truncate_file().
> Ah? Hmm was that only recently introduced?
Bash-3.
On Wed, 2015-03-25 at 14:48 -0400, Chet Ramey wrote:
> The history file truncation code already skips lines that look like history
> timestamps. Look at history.c:history_truncate_file().
Ah? Hmm was that only recently introduced?
I'm having bash4.3 with patches up to including 33. And this time
On 3/25/15 2:07 PM, Christoph Anton Mitterer wrote:
> Hey.
>
> When HISTTIMEFORMAT is used the history time comment lines are written
> to HISTFILE.
> Therefore, HISTFILESIZE is effectively only half as large.
>
> Would it be possible to simply not count the history time comment lines
> when enfo
Hey.
When HISTTIMEFORMAT is used the history time comment lines are written
to HISTFILE.
Therefore, HISTFILESIZE is effectively only half as large.
Would it be possible to simply not count the history time comment lines
when enforcing HISTFILESIZE?
Cheers,
Chris.
17 matches
Mail list logo