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 what it is, and it's an effective workaround that you can > use today. Sure, thanks for that,... > > Wasn't it possible to simply set the default for histchars earlier in > > the startup? > histchars defaulting is part of the interactive shell setup; environment > variables are scanned before any other setup so they are available when > the startup files are read. The interactive shell startup comes after > the startup files are read so the startup files can set any appropriate > variables. One other possibility would be, if HISTTIMEFORMAT is set and histchars is not, while you read in the .bash_history, assume only there the default of "#" and ignore these lines. That way would probably not change the behaviour a lot. Cheers, Chris.