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

PATCH: Doc: Explain the numeric argument



This should change all occurrences of 'prefix argument' or 'numeric prefix
argument' to just 'numeric argument'. I've also added a blurb explaining
what it actually is and does, any opinion on where it should be if not
there, or what it says? I've also changed a completely unrelated set of
() inside example() to LPAR()RPAR() as my yodl complained about them.

---
 Doc/Zsh/compsys.yo |    2 +-
 Doc/Zsh/contrib.yo |   18 +++++++++---------
 Doc/Zsh/options.yo |    4 ++--
 Doc/Zsh/zle.yo     |   24 +++++++++++++++++-------
 4 files changed, 29 insertions(+), 19 deletions(-)

diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index 54c0d5d..6c9423e 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -1839,7 +1839,7 @@ tested for all tags valid for the current completion, then the
 tt(default) tag.  The cursor will be moved back to the
 previous line if this style is `true' for all types of match.  Note
 that unlike the tt(ALWAYS_LAST_PROMPT) option this is independent of the
-numeric prefix argument.
+numeric argument.
 )
 kindex(known-hosts-files)
 item(tt(known-hosts-files))(
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index aee0bd7..1732547 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -1834,7 +1834,7 @@ described immediately above, i.e. using styles to decide the word
 boundaries.  However, it is not a replacement for any existing function.
 
 The basic behaviour is to delete the word around the cursor.  There is no
-numeric prefix handling; only the single word around the cursor is
+numeric argument handling; only the single word around the cursor is
 considered.  If the widget contains the string tt(kill), the removed text
 will be placed in the cutbuffer for future yanking.  This can be obtained
 by defining tt(kill-whole-word-match) as follows:
@@ -1894,14 +1894,14 @@ full history line.  Note that leading zeroes must be typed (they are only
 shown when necessary for removing ambiguity).  The entire history is
 searched; there is no distinction between forwards and backwards.
 
-With a prefix argument, the search is not anchored to the start of
+With a numeric argument, the search is not anchored to the start of
 the line; the string typed by the use may appear anywhere in the line
 in the history.
 
 If the widget name contains `tt(-end)' the cursor is moved to the end of
 the line inserted.  If the widget name contains `tt(-space)' any space
 in the text typed is treated as a wildcard and can match anything (hence
-a leading space is equivalent to giving a prefix argument).  Both
+a leading space is equivalent to giving a numeric argument).  Both
 forms can be combined, for example:
 
 example(zle -N history-beginning-search-menu-space-end \ 
@@ -1931,8 +1931,8 @@ vindex(incarg, use of)
 item(tt(incarg))(
 Typing the keystrokes for this widget with the cursor placed on or to the
 left of an integer causes that integer to be incremented by one.  With a
-numeric prefix argument, the number is incremented by the amount of the
-argument (decremented if the prefix argument is negative).  The shell
+numeric argument, the number is incremented by the amount of the
+argument (decremented if the numeric argument is negative).  The shell
 parameter tt(incarg) may be set to change the default increment to
 something other than one.
 
@@ -2380,7 +2380,7 @@ This function may replace the tt(insert-last-word) widget, like so:
 
 example(zle -N insert-last-word smart-insert-last-word)
 
-With a numeric prefix, or when passed command line arguments in a call
+With a numeric argument, or when passed command line arguments in a call
 from another widget, it behaves like tt(insert-last-word), except that
 words in comments are ignored when tt(INTERACTIVE_COMMENTS) is set.
 
@@ -2409,12 +2409,12 @@ The effect is similar to the function of the same name in Emacs.
 
 Transpose the current line with the previous line and move the cursor
 to the start of the next line.  Repeating this (which can be done by
-providing a positive numeric prefix argument) has the effect of moving
+providing a positive numeric argument) has the effect of moving
 the line above the cursor down by a number of lines.
 
-With a negative numeric prefix argument, requires two lines above the
+With a negative numeric argument, requires two lines above the
 cursor.  These two lines are transposed and the cursor moved to the
-start of the previous line.  Using a numeric prefix less than -1
+start of the previous line.  Using a numeric argument less than -1
 has the effect of moving the line above the cursor up by minus that
 number of lines.
 )
diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo
index 5aab76a..04605ee 100644
--- a/Doc/Zsh/options.yo
+++ b/Doc/Zsh/options.yo
@@ -567,12 +567,12 @@ tt(IGNORE_BRACES), this option does not disable brace expansion.
 For example, with both options unset a function may be defined
 in the following fashion:
 
-example(args() { echo $# })
+example(args+LPAR()RPAR() { echo $# })
 
 while if either option is set, this does not work and something
 equivalent to the following is required:
 
-example(args() { echo $#; })
+example(args+LPAR()RPAR() { echo $#; })
 
 )
 pindex(KSH_GLOB)
diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo
index 1ad4d57..190bf7c 100644
--- a/Doc/Zsh/zle.yo
+++ b/Doc/Zsh/zle.yo
@@ -40,6 +40,16 @@ the following setting:
 
 example(zle_highlight=(none))
 
+In many places, references are made to the tt(numeric argument).  This can
+by default be entered in emacs mode by holding the alt key and typing
+a number, or pressing escape before each number, and in vi command mode
+by typing the number before entering a command.  Generally the numeric
+argument causes the next command entered to be repeated the specified
+number of times, unless otherwise noted below. See also
+ifzman(the section tt(Arguments) )\
+ifnzman(noderef(Arguments) )\
+for some other ways the numeric argument can be modified.
+
 startmenu()
 menu(Keymaps)
 menu(Zle Builtins)
@@ -1382,7 +1392,7 @@ reexamined.  Note that negative numbers should be preceded by a
 
 If two arguments are given, the second specifies the word on the command
 line in normal array index notation (as a more natural alternative to the
-prefix argument).  Hence 1 is the first word, and -1 (the default) is the
+numeric argument).  Hence 1 is the first word, and -1 (the default) is the
 last word.
 
 If a third argument is given, its value is ignored, but it is used to
@@ -1765,7 +1775,7 @@ tindex(argument-base)
 item(tt(argument-base))(
 Use the existing numeric argument as a numeric base, which must be in the
 range 2 to 36 inclusive.  Subsequent use of tt(digit-argument) and
-tt(universal-argument) will input a new prefix in the given base.
+tt(universal-argument) will input a new numeric argument in the given base.
 The usual hexadecimal convention is used: the letter tt(a) or tt(A)
 corresponds to 10, and so on.  Arguments in bases requiring digits from 10
 upwards are more conveniently input with tt(universal-argument), since
@@ -1922,9 +1932,9 @@ Reads a key sequence, then prints the function bound to that sequence.
 tindex(exchange-point-and-mark)
 item(tt(exchange-point-and-mark) (^X^X) (unbound) (unbound))(
 Exchange the cursor position (point) with the position of the mark.
-Unless a negative prefix argument is given, the region between
+Unless a negative numeric argument is given, the region between
 point and mark is activated so that it can be highlighted.
-If a zero prefix argument is given, the region is activated but
+If a zero numeric argument is given, the region is activated but
 point and mark are not swapped.
 )
 tindex(execute-named-cmd)
@@ -2126,7 +2136,7 @@ Set the specified mark at the cursor position.
 tindex(set-mark-command)
 item(tt(set-mark-command) (^@) (unbound) (unbound))(
 Set the mark at the cursor position.  If called with a negative
-prefix argument, do not set the mark but deactivate the region so that
+numeric argument, do not set the mark but deactivate the region so that
 it is no longer highlighted (it is still usable for other purposes).
 Otherwise the region is marked as active.
 )
@@ -2212,8 +2222,8 @@ tt(set-mark-command).  The region is only highlighted if it is active,
 which is the case if tt(set-mark-command) or tt(exchange-point-and-mark)
 has been called and the line has not been subsequently modified.  The
 region can be deactivated by calling tt(set-mark-command) with a
-negative prefix argument, or reactivated by calling
-tt(exchange-point-and-mark) with a zero prefix argument.  Note
+negative numeric argument, or reactivated by calling
+tt(exchange-point-and-mark) with a zero numeric argument.  Note
 that whether or not the region is active has no effect on its
 use within widgets, it simply determines whether it is highlighted.
 )
-- 
1.7.5.4



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