Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: pws-20: documentation tweaks and a fixed comment



Here's a patch that fixes a comment in hist.c, adds some `quotes' to
the fc -R/-W description in builtins.yo, and improves some of the
history-related docs in options.yo.

..wayne..

---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Index: Doc/Zsh/builtins.yo
--- zsh-3.1.5-pws-20/Doc/Zsh/builtins.yo	Sat May  8 05:31:48 1999
+++ ./Doc/Zsh/builtins.yo	Wed Jun  2 20:50:15 1999
@@ -315,9 +315,9 @@
 
 cindex(history, file)
 cindex(file, history)
-tt(fc -R) reads the history from the given file,
-tt(fc -W) writes the history out to the given file,
-and tt(fc -A) appends the history out to the given file.
+`tt(fc -R)' reads the history from the given file,
+`tt(fc -W)' writes the history out to the given file,
+and `tt(fc -A)' appends the history out to the given file.
 If no filename is specified, the tt($HISTFILE) is assumed.
 If the tt(-I) option is added to tt(-R), only those events that are
 not already contained within the internal history list are added.
Index: Doc/Zsh/options.yo
--- zsh-3.1.5-pws-20/Doc/Zsh/options.yo	Sun Jun  6 19:50:53 1999
+++ ./Doc/Zsh/options.yo	Fri Jun  4 09:19:21 1999
@@ -304,7 +304,8 @@
 item(tt(EXTENDED_HISTORY))(
 Save each command's beginning timestamp (in seconds since the epoch)
 and the duration (in seconds) to the history file.  The format of
-this prefixed data is
+this prefixed data is:
+
 `tt(:)var(<beginning time>)tt(:)var(<elapsed seconds>)tt(:)var(<command>)'.
 )
 pindex(FLOW_CONTROL)
@@ -409,13 +410,13 @@
 pindex(HIST_EXPIRE_DUPS_FIRST)
 cindex(history, expiring duplicates)
 item(tt(HIST_EXPIRE_DUPS_FIRST))(
-If the history needs to be trimmed to add a new line, setting this
-option will cause the oldest duplicate history line to be lost before
-losing a unique line from the internal history list.
+If the internal history needs to be trimmed to add a new line,
+setting this option will cause the oldest duplicate history line to
+be lost before losing a unique line from the list.
 )
 pindex(HIST_IGNORE_ALL_DUPS)
 cindex(history, ignoring all duplicates)
-item(tt(HIST_IGNORE_ALL_DUPS) (tt(-h)))(
+item(tt(HIST_IGNORE_ALL_DUPS))(
 If a new command line being added to the history list duplicates an
 older one, the older command is removed from the list (even if it is
 not the previous event).
@@ -482,11 +483,11 @@
 pindex(INC_APPEND_HISTORY)
 cindex(history, incremental appending to a file)
 item(tt(INC_APPEND_HISTORY))(
-This options works like APPEND_HISTORY except that new history lines
-are added to the tt($HISTFILE) when they finish running, rather than
-waiting until the shell is killed. The file is periodically trimmed
-to the number of lines specified by tt($SAVEHIST), but can exceed this
-value between trimmings.
+This options works like tt(APPEND_HISTORY) except that new history lines
+are added to the tt($HISTFILE) incrementally (as soon as they are
+entered), rather than waiting until the shell is killed.
+The file is periodically trimmed to the number of lines specified by
+tt($SAVEHIST), but can exceed this value between trimmings.
 )
 pindex(INTERACTIVE)
 item(tt(INTERACTIVE) (tt(-i), ksh: tt(-i)))(
@@ -833,21 +834,22 @@
 item(tt(SHARE_HISTORY))(
 
 This option both imports new commands from the history file, and also
-causes your typed commands to be appended to the history file (like
-specifiying tt(INC_APPEND_HISTORY)).  The history lines are also
-output with timestamps ala tt(EXTENDED_HISTORY) (which makes it easier to
-find the spot where we left off reading the file after it gets re-written).
+causes your typed commands to be appended to the history file (the
+latter is like specifying tt(INC_APPEND_HISTORY)).
+The history lines are also output with timestamps ala
+tt(EXTENDED_HISTORY) (which makes it easier to find the spot where
+we left off reading the file after it gets re-written).
 
-By default, history movement commands visit the imported lines as well as
-the local lines, but you can toggle this on and off with the
+By default, history movement commands visit the imported lines as
+well as the local lines, but you can toggle this on and off with the
 set-local-history zle binding.  It is also possible to create a zle
-widget that will make some commands ignore imported commands, and some
-include them.
+widget that will make some commands ignore imported commands, and
+some include them.
 
 If you find that you want more control over when commands
 get imported, you may wish to turn tt(SHARE_HISTORY) off,
 tt(INC_APPEND_HISTORY) on, and then manually import
-commands whenever you need them using `fc -RI'.
+commands whenever you need them using `tt(fc -RI)'.
 )
 pindex(SH_FILE_EXPANSION)
 cindex(sh, expansion style)
Index: Src/hist.c
--- zsh-3.1.5-pws-20/Src/hist.c	Sun Jun  6 21:43:23 1999
+++ ./Src/hist.c	Sun Jun  6 21:44:57 1999
@@ -58,8 +58,8 @@
  * the line does not get added to the list until hend(), if at all.
  * However, curhist is incremented to reflect the current line anyway
  * and a temporary history entry is inserted while the user is editing.
- * If the resulting line was not added to the list, curhist is
- * decremented in hend().
+ * If the resulting line was not added to the list, a flag is set so
+ * that curhist will be decremented in hbegin().
  */
  
 /**/
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---



Messages sorted by: Reverse Date, Date, Thread, Author