[Top][All Lists]

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

Re: bash-3.2 HISTTIMEFORMAT imported from environment does not cause tim

From: Ark Submedes
Subject: Re: bash-3.2 HISTTIMEFORMAT imported from environment does not cause timestamp saving
Date: Thu, 11 Jan 2007 10:28:19 -0500

On 1/11/07, Ark Submedes <address@hidden> wrote:
On 1/11/07, Ark Submedes <address@hidden> wrote:
> Enclosed is a patch to treat HISTTIMEFORMAT just like other
> HISTCONTROL and HISTIGNORE when imported.  Also changes to the
> documentation are proposed to avoid the confusion I experienced.
I renamed the patch with .txt so gmail sees it as text/plain.
Sorry to those who read mail the old-fashioned way...

Actually the patch probably gets mangled so sending it base64 encoded
is a good thing.  Setting it text/plain instead of application/octet-stream
causes list archives to serve the download to web browsers with that
MIME type...  But here is the text so readers can easily see the
proposed documentation changes.

--- ../bash-3.2/variables.c     2006-09-08 13:33:32.000000000 -0400
+++ variables.c 2007-01-11 07:52:34.000000000 -0500
@@ -513,6 +513,7 @@
      sv_history_control ("HISTCONTROL");
      sv_histignore ("HISTIGNORE");
+      sv_histtimefmt ("HISTTIMEFORMAT");
#endif /* HISTORY */

--- hsuser.texi 2007-01-11 08:43:09.000000000 -0500
+++ ../bash-3.2/lib/readline/doc/hsuser.texi    2006-03-21 09:54:48.000000000 
@@ -96,13 +96,8 @@
to contain no more than @env{$HISTFILESIZE}
lines.  If @env{HISTFILESIZE} is not set, no truncation is performed.

-If the @env{HISTTIMEFORMAT} is set, even if null, the time stamp
-string associated with each history entry is written to the history
-file on a line after the entry, preceeded by the history comment
-character.  Whenever the history file is read, lines beginning with
-the history comment character are interpreted as timestamps belonging
-to the previous history line.  The value itself is used only for
-displaying the information.
+If the @env{HISTTIMEFORMAT} is set, the time stamp information
+associated with each history entry is written to the history file.

The builtin command @code{fc} may be used to list or edit and re-execute
a portion of the history list.
@@ -186,16 +181,6 @@
No intervening blank is printed between the formatted time stamp
and the history line.

-The value of @env{HISTTIMEFORMAT} has nothing to do with the storage
-of timestamps in the history file, but if @env{HISTTIMEFORMAT} is
-unset when the file is written, no timestamps are saved.  In contrast,
-the optional third character of the @code{histchars} variable (the
-history comment character, default @samp{#}) is used to distinguish
-timestamp lines in the history file from ordinary lines.  In order
-avoid incompatible history files, users who change @code{histchars}
-must ensure that the same comment character is always used
-whenever history files are read or written.
Options, if supplied, have the following meanings:

@table @code
@@ -293,8 +278,6 @@

The shell allows control of the various characters used by the
history expansion mechanism with the @code{histchars} variable.
-Changing the history comment character adversly affects the format
-of timestamps written to or read from the history file.
@end ifset


reply via email to

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