diff options
Diffstat (limited to 'Doc/Zsh/contrib.yo')
-rw-r--r-- | Doc/Zsh/contrib.yo | 143 |
1 files changed, 114 insertions, 29 deletions
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 8c5e66b17..24be63eb9 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -595,22 +595,22 @@ In order to do that, you may use the tt(vcs_info) function. The following VCSs are supported, showing the abbreviated name by which they are referred to within the system: startsitem() -sitem(Bazaar (tt(bzr)))(http://bazaar-vcs.org/) -sitem(Codeville (tt(cdv)))(http://codeville.org/) -sitem(Concurrent Versioning System (tt(cvs)))(http://www.nongnu.org/cvs/) -sitem(Darcs (tt(darcs)))(http://darcs.net/) -sitem(Fossil (tt(fossil)))(http://fossil-scm.org/) -sitem(Git (tt(git)))(http://git-scm.com/) -sitem(GNU arch (tt(tla)))(http://www.gnu.org/software/gnu-arch/) -sitem(Mercurial (tt(hg)))(http://mercurial.selenic.com/) -sitem(Monotone (tt(mtn)))(http://monotone.ca/) -sitem(Perforce (tt(p4)))(http://www.perforce.com/) -sitem(Subversion (tt(svn)))(http://subversion.tigris.org/) -sitem(SVK (tt(svk)))(http://svk.bestpractical.com/) +sitem(Bazaar (tt(bzr)))(uref(http://bazaar.canonical.com/)) +sitem(Codeville (tt(cdv)))(uref(http://freecode.com/projects/codeville/)) +sitem(Concurrent Versioning System (tt(cvs)))(uref(http://www.nongnu.org/cvs/)) +sitem(Darcs (tt(darcs)))(uref(http://darcs.net/)) +sitem(Fossil (tt(fossil)))(uref(http://fossil-scm.org/)) +sitem(Git (tt(git)))(uref(http://git-scm.com/)) +sitem(GNU arch (tt(tla)))(uref(http://www.gnu.org/software/gnu-arch/)) +sitem(Mercurial (tt(hg)))(uref(http://mercurial.selenic.com/)) +sitem(Monotone (tt(mtn)))(uref(http://monotone.ca/)) +sitem(Perforce (tt(p4)))(uref(http://www.perforce.com/)) +sitem(Subversion (tt(svn)))(uref(http://subversion.apache.org/)) +sitem(SVK (tt(svk)))(uref(http://svk.bestpractical.com/)) endsitem() There is also support for the patch management system tt(quilt) -(http://savannah.nongnu.org/projects/quilt). See tt(Quilt Support) +(uref(http://savannah.nongnu.org/projects/quilt)). See tt(Quilt Support) below for details. To load tt(vcs_info): @@ -927,6 +927,10 @@ kindex(get-bookmarks) item(tt(get-bookmarks))( If set to true, the tt(hg) backend will try to get a list of current bookmarks. They will be available via the `tt(%m)' replacement. + +The default is to generate a comma-separated list of all bookmark names +that refer to the currently checked out revision. If a bookmark is active, +its name is suffixed an asterisk and placed first in the list. ) kindex(use-prompt-escapes) item(tt(use-prompt-escapes))( @@ -944,6 +948,21 @@ item(tt(hooks))( A list style that defines hook-function names. See bf(Hooks in vcs_info) below for details. ) +kindex(patch-format) +kindex(nopatch-format) +xitem(tt(patch-format)) +item(tt(nopatch-format))( +This pair of styles format the patch information used by the tt(%m) expando in +formats and actionformats for the tt(git) and tt(hg) backends. The value is +subject to certain tt(%)-expansions described below. +) +kindex(get-unapplied) +item(tt(get-unapplied))( +This boolean style controls whether a backend should attempt to gather a list +of unapplied patches (for example with Mercurial Queue patches). + +Used by the tt(quilt) and tt(hg) backends. +) enditem() The default values for these styles in all contexts are: @@ -975,6 +994,9 @@ sitem(tt(use-quilt))(false) sitem(tt(quilt-standalone))(false) sitem(tt(quilt-patch-dir))(empty - use tt($QUILT_PATCHES)) sitem(tt(quiltcommand))(quilt) +sitem(tt(patch-format))(var(backend dependent)) +sitem(tt(nopatch-format))(var(backend dependent)) +sitem(tt(get-unapplied))(false) endsitem() In normal tt(formats) and tt(actionformats) the following replacements are @@ -996,11 +1018,26 @@ sitem(tt(%r))(The repository name. If tt(%R) is tt(/foo/bar/repoXY), tt(%r) is tt(repoXY).) sitem(tt(%S))(A subdirectory within a repository. If tt($PWD) is tt(/foo/bar/repoXY/beer/tasty), tt(%S) is tt(beer/tasty).) -sitem(tt(%m))(A "misc" replacement. It is at the discretion of the backend to -decide what this replacement expands to. It is currently used by the tt(hg) -and tt(git) backends to display patch information from the tt(mq) and -tt(stgit) extensions.) endsitem() +startitem() +item(tt(%m))( +A "misc" replacement. It is at the discretion of the backend to +decide what this replacement expands to. + +The tt(hg) and tt(git) backends use this expando to display patch information. +tt(hg) sources patch information from the tt(mq) extensions; tt(git) from the +tt(rebase) command and from the and tt(stgit) extension. The tt(patch-format) +and tt(nopatch-format) styles control the generated string. The former is used +when at least one patch from the patch queue has been applied, and the latter +otherwise. + +The tt(hg) backend displays bookmark information in this expando (in addition +to tt(mq) information). See the tt(get-mq) and tt(get-bookmarks) styles. Both +of these styles may be enabled at the same time. If both are enabled, both +resulting strings will be shown separated by a semicolon (that cannot currently +be customized). +) +enditem() In tt(branchformat) these replacements are done: @@ -1290,6 +1327,9 @@ tt(get-revision) and tt(get-bookmarks) styles must be true. This hook gets the names of the Mercurial bookmarks that tt(vcs_info) collected from `hg'. +If a bookmark is active, the key tt(${hook_com[hg-active-bookmark]}) is +set to its name. The key is otherwise unset. + When setting tt(ret) to non-zero, the string in tt(${hook_com[hg-bookmark-string]}) will be used in the tt(%m) escape in tt(formats) and tt(actionformats) and will be available in the global @@ -1377,6 +1417,30 @@ If tt(ret) is set to non-zero, the string in tt(${hook_com[rev-replace]}) will be used unchanged as the `tt(%i)' replacement in the variables set by tt(vcs_info). ) +item(tt(pre-addon-quilt))( +This hook is used when tt(vcs_info)'s quilt functionality is active in "addon" +mode (quilt used on top of a real version control system). It is activated +right before any quilt specific action is taken. + +Setting the `tt(ret)' variable in this hook to a non-zero value avoids any +quilt specific actions from being run at all. +) +item(tt(set-patch-format))( +This hook is used to control some of the possible expansions in +tt(patch-format) and tt(nopatch-format) styles with patch queue systems such as +quilt, mqueue and the like. + +This hook is used in the tt(git), tt(hg) and tt(quilt) backends. + +The hook allows the control of the tt(%p) (tt(${hook_com[applied]})) and tt(%u) +(tt(${hook_com[unapplied]})) expansion in all backends that use the hook. With +the mercurial backend, the tt(%g) (tt(${hook_com[guards]})) expansion is +controllable in addition to that. + +If tt(ret) is set to non-zero, the string in tt(${hook_com[patch-replace]}) +will be used unchanged instead of an expanded format from tt(patch-format) or +tt(nopatch-format). +) item(tt(set-message))( Called each time before a `tt(vcs_info_msg_N_)' message is set. It takes two arguments; the first being the `N' in the message @@ -1864,7 +1928,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: @@ -1930,14 +1994,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 \ @@ -1967,8 +2031,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. @@ -1997,7 +2061,7 @@ accented characters, the two keys are a base character followed by a code for the accent, while for other special characters the two characters together form a mnemonic for the character to be inserted. The two-character codes are a subset of those given by RFC 1345 (see for -example tt(http://www.faqs.org/rfcs/rfc1345.html)). +example uref(http://www.faqs.org/rfcs/rfc1345.html)). The function may optionally be followed by up to two characters which replace one or both of the characters read from the keyboard; if both @@ -2442,7 +2506,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. @@ -2471,12 +2535,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. ) @@ -3227,8 +3291,18 @@ A reasonably powerful calculator based on zsh's arithmetic evaluation facility. The syntax is similar to that of formulae in most programming languages; see ifzman(the section `Arithmetic Evaluation' in zmanref(zshmisc))\ -ifnzman(noderef(Arithmetic Evaluation)) for details. The mathematical -library tt(zsh/mathfunc) will be loaded if it is available; see +ifnzman(noderef(Arithmetic Evaluation)) for details. + +Non-programmers should note that, as in many other programming +languages, expressions involving only integers (whether constants +without a `tt(.)', variables containing such constants as strings, or +variables declared to be integers) are by default evaluated using +integer arithmetic, which is not how an ordinary desk calculator +operates. To force floating point operation, pass the option tt(-f); +see further notes below. + +The mathematical library tt(zsh/mathfunc) will be loaded if it is +available; see ifzman(the section `The zsh/mathfunc Module' in zmanref(zshmodules))\ ifnzman(noderef(The zsh/mathfunc Module)). The mathematical functions correspond to the raw system libraries, so trigonometric functions are @@ -3609,6 +3683,17 @@ If you quit in the middle of a game, the next invocation of the tt(tetris) widget will continue where you left off. If you lost, it will start a new game. ) +item(tt(tetriscurses))( +This is a port of the above to zcurses. The input handling is improved +a bit so that moving a block sideways doesn't automatically advance a +timestep, and the graphics use unicode block graphics. + +This version does not save the game state between invocations, and is not +invoked as a widget, but rather as: + +example(autoload -U tetriscurses +tetriscurses) +) findex(zargs) item(tt(zargs) [ var(option) ... tt(-)tt(-) ] [ var(input) ... ] [ tt(-)tt(-) var(command) [ var(arg) ... ] ])( This function has a similar purpose to GNU xargs. Instead of |