From 62b0e611ce0d3754c4397c6a66f09049e6e28d26 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sat, 27 Apr 2013 17:51:40 +0200 Subject: 30568: Add tetriscurses contrib function, port of tetris to zcurses --- Doc/Zsh/contrib.yo | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Doc/Zsh/contrib.yo') diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 8c5e66b17..50432432b 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -3609,6 +3609,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 -- cgit v1.2.3 From 626650f20e5c01fa6554da2a73dc5338a2523842 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 12 Jan 2015 11:10:07 +0000 Subject: 34253: warn in zcalc doc about integer arithmetic. C.f. warning in arithmetic doc in 34194. --- ChangeLog | 5 +++++ Doc/Zsh/contrib.yo | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'Doc/Zsh/contrib.yo') diff --git a/ChangeLog b/ChangeLog index 5bbdd175a..a9a44a379 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-01-12 Peter Stephenson + + * 34253: Doc/Zsh/contrib.yo: warning on integer arithmetic + for zcalc, c.f. 34194. + 2015-01-11 Barton E. Schaefer * 34247: Test/C01arith.ztst: regression test for 34230. diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 50432432b..00ede52aa 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -3227,8 +3227,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 -- cgit v1.2.3 From 9d25fd72553caff0008d35670544c0ab909c0224 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Sat, 24 Jan 2015 06:41:42 +0000 Subject: vcs_info hg: Support inactive bookmarks (Similar to git detached heads) --- ChangeLog | 6 ++++++ Doc/Zsh/contrib.yo | 7 +++++++ Functions/VCS_Info/Backends/VCS_INFO_get_data_hg | 17 +++++++++++++++++ 3 files changed, 30 insertions(+) (limited to 'Doc/Zsh/contrib.yo') diff --git a/ChangeLog b/ChangeLog index 04f46611b..2ca32cec1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-01-25 Daniel Shahaf + + * Doc/Zsh/contrib.yo, + Functions/VCS_Info/Backends/VCS_INFO_get_data_hg: vcs_info hg: + Support inactive bookmarks + 2015-01-23 Jun-ichi Takimoto * 34335: _yum: fix bugs in _yum_all_pkgs diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 00ede52aa..80a799766 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -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))( @@ -1290,6 +1294,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 diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg index cedaf5676..1274ca337 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg @@ -6,6 +6,7 @@ setopt localoptions extendedglob NO_shwordsplit local hgbase bmfile branchfile rebasefile dirstatefile mqseriesfile \ + curbmfile curbm \ mqstatusfile mqguardsfile patchdir mergedir \ r_csetid r_lrev r_branch i_bmhash i_bmname \ revformat branchformat hgactionstring hgchanges \ @@ -24,6 +25,7 @@ r_lrev='' # local revision patchdir="${hgbase}/.hg/patches" mergedir="${hgbase}/.hg/merge/" bmfile="${hgbase}/.hg/bookmarks" +curbmfile="${hgbase}/.hg/bookmarks.current" branchfile="${hgbase}/.hg/branch" rebasefile="${hgbase}/.hg/rebasestate" dirstatefile="${hgbase}/.hg/dirstate" @@ -125,8 +127,23 @@ if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-bookmarks \ [[ $i_bmhash == $r_csetid* ]] && hgbmarks+=( $i_bmname ) done < ${bmfile} + if [[ -r "$curbmfile" ]] ; then + curbm=$(<"${curbmfile}") + hook_com[hg-active-bookmark]=$curbm + else + # leave curbm empty and [hg-active-bookmark] undefined. + fi + if VCS_INFO_hook 'gen-hg-bookmark-string' "${hgbmarks[@]}"; then + # If there is an active bookmark, annotate it and put it first. + if [[ -n $curbm ]] ; then + hgbmarks[(i)$curbm]=() + hgbmarks[1,0]="${curbm}*" + fi hgbmstring=${(j:, :)hgbmarks} + # Deannotate the array, in case later code expects it to be valid. + # (The order is not restored.) + [[ -n $curbm ]] && hgbmarks[1]=${${hgbmarks[1]}[1,-2]} else hgbmstring=${hook_com[hg-bookmark-string]} fi -- cgit v1.2.3 From 5a1fdc0f1ca4f2a1de74d9c9a1ddd6e25c7643f7 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Sun, 25 Jan 2015 15:20:49 +0100 Subject: 34381: vcs_info: Documentation update This adds documentation for more hooks and styles available in vcs_info: - patch-format - nopatch-format - get-unapplied - pre-addon-quilt - set-patch-format --- ChangeLog | 4 ++++ Doc/Zsh/contrib.yo | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 65 insertions(+), 4 deletions(-) (limited to 'Doc/Zsh/contrib.yo') diff --git a/ChangeLog b/ChangeLog index 38f8e3f69..60bb7a8a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-01-25 Daniel Shahaf + + * 34381: Doc/Zsh/contrib.yo: vcs_info: Documentation update + 2015-01-25 Frank Terbeck * unposted: ChangeLog: Forgot X-Seq: numbers with Daniel's last diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 80a799766..120efa20f 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -948,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: @@ -979,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 @@ -1000,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: @@ -1384,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 the +quilt specific to be 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 -- cgit v1.2.3 From 88c7badb8b0c06999b1b60495bd6778e183ee34d Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Tue, 27 Jan 2015 21:08:02 +0100 Subject: 34419: vcs_info documentation: Fix wording As suggested by Daniel Shahaf. --- ChangeLog | 4 ++++ Doc/Zsh/contrib.yo | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'Doc/Zsh/contrib.yo') diff --git a/ChangeLog b/ChangeLog index 4f8fdf8da..728b80503 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-01-27 Frank Terbeck + + * 34419: Doc/Zsh/contrib.yo: vcs_info documentation: Fix wording + 2015-01-27 Peter Stephenson * Daniel Shahaf: 34412: Completion/Unix/Command/_chown: complete diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 120efa20f..4f6c437c9 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -1422,8 +1422,8 @@ 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 the -quilt specific to be run at all. +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 -- cgit v1.2.3 From be5f561fa4cfd2f9c705fc24bdbc096070586a74 Mon Sep 17 00:00:00 2001 From: Jun-ichi Takimoto Date: Tue, 7 Apr 2015 20:40:57 +0900 Subject: 34850: make URLs in html/pdf docs clickable --- ChangeLog | 7 +++++++ Doc/META-FAQ.yo | 1 + Doc/Zsh/contrib.yo | 28 ++++++++++++++-------------- Doc/Zsh/ftp_sites.yo | 14 +++++++------- Doc/Zsh/manual.yo | 6 +++--- Doc/Zsh/metafaq.yo | 14 +++++++------- Doc/Zsh/roadmap.yo | 2 +- Doc/zman.yo | 1 + Doc/ztexi.yo | 1 + 9 files changed, 42 insertions(+), 32 deletions(-) (limited to 'Doc/Zsh/contrib.yo') diff --git a/ChangeLog b/ChangeLog index 1cb94c46c..8872e0d9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-04-07 Jun-ichi Takimoto + + * 34850: Doc/zman.yo, Doc/ztexi.yo, Doc/META-FAQ.yo, + Doc/Zsh/contrib.yo, Doc/Zsh/ftp_sites.yo, Doc/Zsh/manual.yo, + Doc/Zsh/metafaq.yo, Doc/Zsh/roadmap.yo: make URLs in html/pdf + docs clickable + 2015-04-06 Barton E. Schaefer * 34851: Src/builtin.c: fix thinko from 34093 that short-circuited diff --git a/Doc/META-FAQ.yo b/Doc/META-FAQ.yo index bfdb76b77..992844ec1 100644 --- a/Doc/META-FAQ.yo +++ b/Doc/META-FAQ.yo @@ -19,6 +19,7 @@ ARG1 def(em)(1)(ARG1) def(bf)(1)(ARG1) def(tt)(1)(ARG1) +def(uref)(1)(ARG1) def(var)(1)(ARG1) def(nofill)(1)(ARG1) diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 4f6c437c9..ab9e7427d 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): @@ -2061,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 diff --git a/Doc/Zsh/ftp_sites.yo b/Doc/Zsh/ftp_sites.yo index 62c1bff06..804d975f3 100644 --- a/Doc/Zsh/ftp_sites.yo +++ b/Doc/Zsh/ftp_sites.yo @@ -1,15 +1,15 @@ startitem() item(Primary site)( -nofill(tt(ftp://ftp.zsh.org/pub/) -tt(http://www.zsh.org/pub/)) +nofill(uref(ftp://ftp.zsh.org/pub/) +uref(http://www.zsh.org/pub/)) ) item(Australia)( -nofill(tt(ftp://ftp.zsh.org/pub/) -tt(http://www.zsh.org/pub/) -tt(http://mirror.dejanseo.com.au/pub/zsh/)) +nofill(uref(ftp://ftp.zsh.org/pub/) +uref(http://www.zsh.org/pub/) +uref(http://mirror.dejanseo.com.au/pub/zsh/)) ) item(Hungary)( -nofill(tt(ftp://ftp.cs.elte.hu/pub/zsh/) -tt(http://www.cs.elte.hu/pub/zsh/)) +nofill(uref(ftp://ftp.cs.elte.hu/pub/zsh/) +uref(http://www.cs.elte.hu/pub/zsh/)) ) enditem() diff --git a/Doc/Zsh/manual.yo b/Doc/Zsh/manual.yo index 11c81501a..e0b0f14cb 100644 --- a/Doc/Zsh/manual.yo +++ b/Doc/Zsh/manual.yo @@ -185,16 +185,16 @@ produce a nicely formatted printed manual. item(The HTML manual)( An HTML version of this manual is available at the Zsh web site via: -tt(http://zsh.sourceforge.net/Doc/). +uref(http://zsh.sourceforge.net/Doc/). (The HTML version is produced with bf(texi2html), which may be obtained -from tt(http://www.nongnu.org/texi2html/). The command is +from uref(http://www.nongnu.org/texi2html/). The command is `tt(texi2html --output . --ifinfo --split=chapter --node-files zsh.texi)'. If necessary, upgrade to version 1.78 of texi2html.) ) enditem() For those who do not have the necessary tools to process texinfo, -precompiled documentation (PostScript, dvi, info and HTML formats) +precompiled documentation (PostScript, dvi, PDF, info and HTML formats) is available from the zsh archive site or its mirrors, in the file tt(zsh-doc.tar.gz). (See noderef(Availability) for a list of sites.) diff --git a/Doc/Zsh/metafaq.yo b/Doc/Zsh/metafaq.yo index a005ca0dd..6cb299ad1 100644 --- a/Doc/Zsh/metafaq.yo +++ b/Doc/Zsh/metafaq.yo @@ -28,9 +28,9 @@ cindex(availability of zsh) INCLUDEFILE(Zsh/ftp_sites.yo)\ The up-to-date source code is available via Git from Sourceforge. See -tt(http://sourceforge.net/projects/zsh/) for details. A summary of +uref(http://sourceforge.net/projects/zsh/) for details. A summary of instructions for the archive can be found at -tt(http://zsh.sourceforge.net/). +uref(http://zsh.sourceforge.net/). texinode(Mailing Lists)(The Zsh FAQ)(Availability)(Introduction) sect(Mailing Lists) @@ -75,18 +75,18 @@ maintained by Karsten Thygesen tt(). The mailing lists are archived; the archives can be accessed via the administrative addresses listed above. There is also a hypertext archive, maintained by Geoff Wing tt(), available at -tt(http://www.zsh.org/mla/). +uref(http://www.zsh.org/mla/). texinode(The Zsh FAQ)(The Zsh Web Page)(Mailing Lists)(Introduction) sect(The Zsh FAQ) Zsh has a list of Frequently Asked Questions (FAQ), maintained by Peter Stephenson tt(). It is regularly posted to the newsgroup bf(comp.unix.shell) and the bf(zsh-announce) mailing list. The latest version can be found at any of the Zsh FTP sites, or at -tt(http://www.zsh.org/FAQ/). The contact address for FAQ-related matters +uref(http://www.zsh.org/FAQ/). The contact address for FAQ-related matters is tt(). texinode(The Zsh Web Page)(The Zsh Userguide)(The Zsh FAQ)(Introduction) sect(The Zsh Web Page) -Zsh has a web page which is located at tt(http://www.zsh.org/). This is +Zsh has a web page which is located at uref(http://www.zsh.org/). This is maintained by Karsten Thygesen tt(), of SunSITE Denmark. The contact address for web-related matters is tt(). texinode(The Zsh Userguide)(See Also)(The Zsh Web Page)(Introduction) @@ -95,10 +95,10 @@ A userguide is currently in preparation. It is intended to complement the manual, with explanations and hints on issues where the manual can be cabbalistic, hierographic, or downright mystifying (for example, the word `hierographic' does not exist). It can be viewed in its current state at -tt(http://zsh.sourceforge.net/Guide/). At the time of writing, chapters +uref(http://zsh.sourceforge.net/Guide/). At the time of writing, chapters dealing with startup files and their contents and the new completion system were essentially complete. sect(The Zsh Wiki) -A `wiki' website for zsh has been created at tt(http://www.zshwiki.org/). +A `wiki' website for zsh has been created at uref(http://www.zshwiki.org/). This is a site which can be added to and modified directly by users without any special permission. You can add your own zsh tips and configurations. diff --git a/Doc/Zsh/roadmap.yo b/Doc/Zsh/roadmap.yo index 677848961..bd064e2b2 100644 --- a/Doc/Zsh/roadmap.yo +++ b/Doc/Zsh/roadmap.yo @@ -49,7 +49,7 @@ The shell now supports the UTF-8 character set (and also others if supported by the operating system). This is (mostly) handled transparently by the shell, but the degree of support in terminal emulators is variable. There is some discussion of this in the shell FAQ, -http://zsh.dotsrc.org/FAQ/ . Note in particular that for combining +uref(http://www.zsh.org/FAQ/). Note in particular that for combining characters to be handled the option tt(COMBINING_CHARS) needs to be set. Because the shell is now more sensitive to the definition of the character set, note that if you are upgrading from an older version of diff --git a/Doc/zman.yo b/Doc/zman.yo index 3329cb975..73cc186e0 100644 --- a/Doc/zman.yo +++ b/Doc/zman.yo @@ -32,6 +32,7 @@ COMMENT(--- emphasised text ---) def(em)(1)(NOTRANS(\fI)ARG1+NOTRANS(\fP)) def(bf)(1)(NOTRANS(\fB)ARG1+NOTRANS(\fP)) def(tt)(1)(NOTRANS(\fB)ARG1+NOTRANS(\fP)) +def(uref)(1)(NOTRANS(\fB)ARG1+NOTRANS(\fP)) def(var)(1)(NOTRANS(\fI)ARG1+NOTRANS(\fP)) COMMENT(--- man page headers ---) diff --git a/Doc/ztexi.yo b/Doc/ztexi.yo index 636896117..699567724 100644 --- a/Doc/ztexi.yo +++ b/Doc/ztexi.yo @@ -38,6 +38,7 @@ COMMENT(--- emphasised text ---) def(em)(1)(+NOTRANS(@emph{)ARG1+NOTRANS(})) def(bf)(1)(+NOTRANS(@cite{)ARG1+NOTRANS(})) def(tt)(1)(+NOTRANS(@t{)ARG1+NOTRANS(})) +def(uref)(1)(+NOTRANS(@t{@uref{)ARG1+NOTRANS(}})) def(var)(1)(+NOTRANS(@var{)ARG1+NOTRANS(})) COMMENT(--- man page headers ---) -- cgit v1.2.3 From ccb1cf2d10aa674caf2aa73599110aed1127ad26 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Mon, 12 Dec 2011 14:13:55 +0100 Subject: 34902: Doc: Explain the numeric argument and be consistent about what we call it --- ChangeLog | 6 ++++++ Doc/Zsh/compsys.yo | 2 +- Doc/Zsh/contrib.yo | 18 +++++++++--------- Doc/Zsh/zle.yo | 31 +++++++++++++++++++++---------- 4 files changed, 37 insertions(+), 20 deletions(-) (limited to 'Doc/Zsh/contrib.yo') diff --git a/ChangeLog b/ChangeLog index 05d4cf094..ec8423c02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-04-16 Mikael Magnusson + + * 34902: Doc/Zsh/compsys.yo, Doc/Zsh/contrib.yo, Doc/Zsh/zle.yo: + explain the numeric argument and be consistent about what we + call it. + 2015-04-15 Peter Stephenson * 34901: Test/A04redirect.ztst: Test for the foregoing. diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index 6c6bedb21..45afe2448 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -1860,7 +1860,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 ab9e7427d..24be63eb9 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -1928,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: @@ -1994,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 \ @@ -2031,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. @@ -2506,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. @@ -2535,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. ) diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo index 8fabe4b4c..ffce54c84 100644 --- a/Doc/Zsh/zle.yo +++ b/Doc/Zsh/zle.yo @@ -40,6 +40,17 @@ 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 em(Arguments) subsection of the em(Widgets) section )\ +ifnzman(noderef(Arguments) )\ +for some other ways the numeric argument can be modified. The default +bindings mentioned here use the tt(digit-argument) widget. + startmenu() menu(Keymaps) menu(Zle Builtins) @@ -649,9 +660,9 @@ item(var(widget) tt([ -n) var(num) tt(]) tt([ -Nw ] [ -K) var(keymap) tt(]) var( Invoke the specified widget. This can only be done when ZLE is active; normally this will be within a user-defined widget. -With the options tt(-n) and tt(-N), the current numerical argument will be +With the options tt(-n) and tt(-N), the current numeric argument will be saved and then restored after the call to tt(widget); `tt(-n) var(num)' -sets the numerical argument temporarily to var(num), while `tt(-N)' sets it +sets the numeric argument temporarily to var(num), while `tt(-N)' sets it to the default, i.e. as if there were none. With the option tt(-K), var(keymap) will be used as the current keymap @@ -1492,7 +1503,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 @@ -1889,14 +1900,14 @@ spaces; if instead it is followed by tt(-2), then tt(forward-char), move backward two spaces. Inside a widget function, if passed an argument, i.e. `tt(zle -universal-argument) var(num)', the numerical argument will be set to +universal-argument) var(num)', the numeric argument will be set to var(num); this is equivalent to `tt(NUMERIC=)var(num)'. ) 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 @@ -2053,9 +2064,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) @@ -2268,7 +2279,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. ) @@ -2426,8 +2437,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. ) -- cgit v1.2.3