diff options
Diffstat (limited to 'Doc/Zsh')
-rw-r--r-- | Doc/Zsh/.distfiles | 2 | ||||
-rw-r--r-- | Doc/Zsh/builtins.yo | 48 | ||||
-rw-r--r-- | Doc/Zsh/compctl.yo | 5 | ||||
-rw-r--r-- | Doc/Zsh/compsys.yo | 88 | ||||
-rw-r--r-- | Doc/Zsh/mod_compctl.yo | 2 | ||||
-rw-r--r-- | Doc/Zsh/mod_deltochar.yo | 2 | ||||
-rw-r--r-- | Doc/Zsh/mod_zle.yo | 19 | ||||
-rw-r--r-- | Doc/Zsh/modules.yo | 5 | ||||
-rw-r--r-- | Doc/Zsh/options.yo | 5 | ||||
-rw-r--r-- | Doc/Zsh/params.yo | 13 | ||||
-rw-r--r-- | Doc/Zsh/zle.yo | 7 |
11 files changed, 63 insertions, 133 deletions
diff --git a/Doc/Zsh/.distfiles b/Doc/Zsh/.distfiles index 691cd8749..3fbde5ef1 100644 --- a/Doc/Zsh/.distfiles +++ b/Doc/Zsh/.distfiles @@ -3,7 +3,7 @@ DISTFILES_SRC=' arith.yo builtins.yo compat.yo compctl.yo compsys.yo compwid.yo cond.yo exec.yo expn.yo filelist.yo files.yo func.yo grammar.yo guide.yo index.yo intro.yo invoke.yo jobs.yo metafaq.yo - mod_cap.yo mod_clone.yo mod_comp1.yo mod_complist.yo + mod_cap.yo mod_clone.yo mod_comp1.yo mod_compctl.yo mod_deltochar.yo mod_example.yo mod_files.yo mod_mapfile.yo mod_parameter.yo mod_sched.yo mod_stat.yo mod_zftp.yo mod_zle.yo diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo index 10202dbce..3b3ba70c0 100644 --- a/Doc/Zsh/builtins.yo +++ b/Doc/Zsh/builtins.yo @@ -224,11 +224,10 @@ are reset to their default value corresponding to the specified emulation mode, except for certain options describing the interactive environment; otherwise, only those options likely to cause portability problems in scripts and functions are altered. If the tt(-L) option -is given, the options tt(LOCAL_OPTIONS) and tt(LOCAL_TRAPS) will be set as -well, causing the effects of the tt(emulate) command and any tt(setopt) and -tt(trap) commands to be local to the immediately surrounding shell -function, if any; normally these options are turned off in all emulation -modes except tt(ksh). +is given, the option tt(LOCAL_OPTIONS) will be set as well, causing +the effect of the tt(emulate) command to be local to the immediately +surrounding shell function, if any; normally this is turned off in all +emulation modes except tt(ksh). ) findex(enable) cindex(enabling commands) @@ -264,7 +263,8 @@ findex(export) item(tt(export) [ var(name)[tt(=)var(value)] ... ])( The specified var(name)s are marked for automatic export to the environment of subsequently executed commands. -Equivalent to tt(typeset -gx). +Equivalent to tt(typeset -x), except that no parameter will be created +to hide an existing one in an outer scope. If a parameter specified does not already exist, it is created in the global scope. ) @@ -428,7 +428,7 @@ added by explicit specification. If has no effect if used with tt(-f). ) alias(history)(fc -l) findex(integer) -item(tt(integer) [ {tt(PLUS())|tt(-)}tt(glrtux) ] [ var(name)[tt(=)var(value)] ... ])( +item(tt(integer) [ {tt(PLUS())|tt(-)}tt(lrtux) ] [ var(name)[tt(=)var(value)] ... ])( Equivalent to tt(typeset -i), except that options irrelevant to integers are not permitted. ) @@ -522,7 +522,7 @@ endsitem() ) findex(local) item(tt(local) [ {tt(PLUS())|tt(-)}tt(ALRUZailrtu) [var(n)]] [ var(name)[tt(=)var(value)] ] ...)( -Same as tt(typeset), except that the options tt(-g), tt(-x) and +Same as tt(typeset), except that the options tt(-x) and tt(-f) are not permitted. ) findex(log) @@ -682,13 +682,15 @@ Read only one character from the terminal and set var(name) to With this flag set the return value is zero only if the character was `tt(y)' or `tt(Y)'. Note that this always reads from the terminal, even if used with the tt(-p) or tt(-u) or tt(-z) flags or with redirected input. -This option may also be used within zle widgets. +May be called from a zle widget, in which case it will use zle to retrieve +a key. ) item(tt(-k) [ var(num) ])( Read only one (or var(num)) characters. All are assigned to the first var(name), without word splitting. This flag is ignored when tt(-q) is present. Input is read from the terminal unless one of tt(-u) or tt(-p) -is present. This option may also be used within zle widgets. +is present. May be called from a zle widget with no tt(-u) +or tt(-p) argument, in which case it will use zle to retrieve a key. ) item(tt(-z))( Read one entry from the editor buffer stack and assign it to the first @@ -903,7 +905,7 @@ Equivalent to tt(whence -v). findex(typeset) cindex(parameters, setting) cindex(parameters, declaring) -xitem(tt(typeset) [ {tt(PLUS())|tt(-)}tt(ALRUZafgilrtuxm) [var(n)]] [ \ +xitem(tt(typeset) [ {tt(PLUS())|tt(-)}tt(ALRUZafilrtuxm) [var(n)]] [ \ var(name)[tt(=)var(value)] ... ]) item(tt(typeset) -T [ {tt(PLUS()|tt(-))}tt(LRUZrux) ] \ var(SCALAR)[tt(=)var(value)] var(array))( @@ -942,14 +944,6 @@ to var(array) sets it to be a single-element array. Note that both tt(typeset -xT ...) and tt(export -T ...) work, but only the scalar will be marked for export. -The flag tt(-g) (global) flag is treated specially: it means that any -resulting parameter will not be restricted to local scope. Note that this -does not necessarily mean that the parameter will be global, as the flag -will apply to any existing parameter (even if unset) from an enclosing -function. This flag does not affect the parameter after creation, hence it -has no effect when listing existing parameters, nor does the flag tt(+g) -have any effect. - If no var(name) is present, the names and values of all parameters are printed. In this case the attribute flags restrict the display to only those parameters that have the specified attributes. Using @@ -1198,7 +1192,6 @@ findex(zmodload) cindex(modules, loading) cindex(loading modules) xitem(tt(zmodload) [ tt(-dL) ] [ ... ]) -xitem(tt(zmodload -e) [ ... ]) xitem(tt(zmodload) [ tt(-a) [ tt(-bcp) [ tt(-I) ] ] ] [ tt(-iL) ] ...) item(tt(zmodload) tt(-u) [ tt(-abcdp) [ tt(-I) ] ] [ tt(-iL) ] ...)( tt(zmodload) performs operations relating to zsh's loadable modules. @@ -1294,21 +1287,6 @@ xitem(tt(zmodload) tt(-a) [ tt(-i) ] var(name) [ var(builtin) ... ]) item(tt(zmodload) tt(-ua) [ tt(-i) ] var(builtin) ...)( Equivalent to tt(-ab) and tt(-ub). ) -item(tt(zmodload -e) [ var(string) ... ])( -The tt(-e) option without arguments lists all modules loaded or linked -into the shell. With arguments only the return status is set to zero -if all var(string)s given as arguments are names of modules loaded or -linked in and to one if at least on var(string) is not the name of a -module loaded or linked. This can be used to test for the availability -of things implemented by modules. -) enditem() - -In a shell without dynamic loading only the tt(-e) option is -supported. In such a shell the return status of tt(zmodload) without -arguments or options is one whereas in a shell with dynamic loading -the return status without arguments or options is always zero. This -can be used to test if the shell supports dynamic loading of modules -or not. ) enditem() diff --git a/Doc/Zsh/compctl.yo b/Doc/Zsh/compctl.yo index 8f7c23f25..20721dfec 100644 --- a/Doc/Zsh/compctl.yo +++ b/Doc/Zsh/compctl.yo @@ -13,7 +13,7 @@ tt(compctl) command. )\ ifnzman(\ sect(Types of completion) -This version of zsh has two ways of performing completion of words on the +This version of zsh has two ways of performing completino of words on the command line. New users of the shell may prefer to use the newer and more powerful system based on shell functions; this is described in noderef(Completion System), and the basic shell mechanisms which support @@ -633,8 +633,7 @@ var(max) inclusive. ) item(tt(r[)var(str1)tt(,)var(str2)tt(])...)( Matches if the cursor is after a word with prefix var(str1). If there -is also a word with prefix var(str2) on the command line after the one -matched by var(str1) it matches +is also a word with prefix var(str2) on the command line it matches only if the cursor is before this word. If the comma and var(str2) are omitted, it matches if the cursor is after a word with prefix var(str1). ) diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index 9d6cc10ce..f481ee4c0 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -49,7 +49,7 @@ endmenu() texinode(Initialization)(Control Functions)()(Completion System) sect(Initialization) -The function tt(compinstall) can be run by a user to set up the completion +The script tt(compinstall) can be run by a user to set up the completion system for use. It will usually insert code into tt(.zshrc), although if that is not writable it will save it in another file and tell you that file's locations. Note that it is up to you to make sure that the lines @@ -62,10 +62,10 @@ this section by hand is likely to be lost if you rerun tt(compinstall). The new code will take effect next time you start the shell, or run tt(.zshrc) by hand. -To run it, you will need to make sure it is in a directory mentioned in your -tt($fpath) parameter, and that it is autoloaded (`tt(autoload -U -compinstall)' is recommended). It will ask you various questions about how -you would like completion set up. It is in two parts; the basic part +You can run it as `tt(source )var(<path>)tt(/compinstall)' or +`tt(. )var(<path>)tt(/compinstall)', where var(<path>) is where the +completion functions are stored. It will ask you various questions about +how you would like completion set up. It is in two parts; the basic part locates the completion files and decides where to put your personal dumpfile, used to speed up initialization after the first time. After that, you will be asked if you wish to go on to the advanced set-up; if you @@ -86,24 +86,30 @@ This section describes the use of tt(compinit) to initialize completion for the current session when run directly by the user; if you have run tt(compinstall) it will be called automatically from your tt(.zshrc). -To initialize the system, the function tt(compinit) should be in a -directory mentioned in the tt($fpath) variable, and should be autoloaded -(`tt(autoload -U compinit)' is recommended). When run, it will define a -few utility functions, arrange for all the necessary shell functions to be -autoloaded, and will then re-bind all keys that do completion to use the -new system. +To initialize the system, the script tt(compinit) should be sourced with +`tt(source )var(<path>)tt(/compinit)' or +`tt(. )var(<path>)tt(/compinit)'. This will define a few utility functions, +arrange for all the necessary shell functions to be autoloaded, and will +then re-bind all keys that do completion to use the new system. To speed up the running of tt(compinit), it can be made to produce a dumped configuration which will be read in on future invocations. The easiest way -to do this is by adding the option tt(-d) whenever tt(compinit) is run. -In this case the dumped file is tt(.zcompdump) in the same directory as the -startup files (i.e. tt($ZDOTDIR) or tt($HOME)); alternatively, an explicit -file name can be given following the tt(-d). On the next call to -tt(compinit -d), the dumped file will be read instead. - -If the parameter tt(_compdir) is set, tt(compinit) uses it has a directory -where completion functions can be found; this is only necessary if they are -not already in the function search path. +to do this is by adding the option tt(-d) whenever tt(compinit) is sourced. +In this case the dumped file will have the same name as the sourced file, +but with tt(.dump) appended to the end, or, if that is not writable by the +user, the file tt(.zcompdump) in the same directory as the startup files +(i.e. tt($ZDOTDIR) or tt($HOME)); alternatively, an explicit file name can +be given following the tt(-d). On the next call to tt(compinit -d), the +dumped file will be read instead. + +The other option accepted by tt(compinit) is tt(-f )var(dir), which gives +the directory in which tt(compinit) resides. If you source tt(compinit) by +its full pathname, and the option tt(FUNCTION_ARGZERO) is set, as it is by +default unless tt(zsh) is emulating tt(sh) or tt(ksh), this is unnecessary +as tt(compinit) can deduce the directory for itself. It is used in two +ways: to find the program tt(compdump) used by the tt(-d) option, and to +check if the directory should be added to the function search path to find +the completion functions (see below). If the number of completion files changes, tt(compinit) will recognise this and produce a new dump file. However, if the name of a function or the @@ -111,30 +117,27 @@ arguments in the first line of a tt(#compdef) function (as described below) change, it is easiest to delete the dump file by hand so that the next time tt(compinit) will re-create it. -The dumping is actually done by another function, tt(compdump), but you -will only need to run this yourself if you change the configuration +The dumping is actually done by another script, tt(compdump), but you will +only need to source this yourself if you change the configuration (e.g. using tt(compdef)) and then want to dump the new one. The name of -the old dumped file will be remembered for this purpose. +the old dumped file will be remembered for this. subsect(Autoloaded files) The convention for autoloaded functions used in completion is that they start with an underscore; as already mentioned, the tt(fpath/FPATH) -parameter must contain the directory in which they are stored. If tt(zsh) -was properly installed on your system, then tt(fpath/FPATH) automatically -contains the required directories. - -For incomplete installations, if tt(compinit) does not find enough files -beginning with an underscore (fewer than twenty) in the search path, it -will try to find more by adding the directory tt(_compdir) to the search -path; if you have run tt(compinstall), this will be set automatically. +parameter must contain the directory in which they are stored. If +tt(compinit) does not find enough files beginning with an underscore (fewer +than twenty) in the search path, it will try to find more by adding its own +directory to the search path. If you keep all the completion files in this +directory, this means you never have to alter tt(fpath/FPATH) yourself. Furthermore, if the directory in question ends in the path segment tt(Core), or has a subdirectory named tt(Core), tt(compinit) will add all subdirectories of the directory where tt(Core) is to the path: this allows the functions to be in the same format as in the tt(zsh) source distribution. -When tt(compinit) is run, it searches all such files accessible via +When tt(compinit) is sourced, it searches all such files accessible via tt(fpath/FPATH) and reads the first line of each of them. This line should contain one of the tags described below. Files whose first line does not start with one of these tags are not considered to be part of the @@ -162,11 +165,7 @@ var(key-sequences). It creates a widget behaving like the builtin widget var(style), which must be one of those that perform completion, namely tt(complete-word), tt(delete-char-or-list), tt(expand-or-complete), tt(expand-or-complete-prefix), tt(list-choices), tt(menu-complete), -tt(menu-expand-or-complete), or tt(reverse-menu-complete). If the -tt(complist) module is loaded (see -ifzman(zmanref(zshmodules))\ -ifnzman(noderef(The complist Module))\ -), the tt(menu-select) widget can be used, too. +tt(menu-expand-or-complete), or tt(reverse-menu-complete). The widget is then bound to all the var(key-sequences) given, if any: when one of the var(key-sequences) is typed, the function in the file will @@ -475,12 +474,6 @@ configuration key tt(match_original) has a value of `tt(only)', no `tt(*)' will be inserted. If tt(match_original) has any other non-empty string as its value, this completer will first try to generate matches without, then with a `tt(*)' inserted at the cursor position. - -The generated matches will be offered in a menucompletion unless the -tt(match_insert) configuration key is set to a string starting with -`tt(unambig)'. In this case menucompletion will only be started if no -unambiguous string could be generated that is at least as long as the -original string. ) item(tt(_expand))( This completer function does not really do completion, but instead @@ -714,13 +707,10 @@ These functions also accept the `tt(-J)', `tt(-V)', `tt(-X)', `tt(-P)', `tt(-S)', `tt(-q)', `tt(-r)', and `tt(-R)' options from the tt(compadd) builtin. -Finally, the tt(_path_files) function supports two configuration keys. -If tt(path_expand) is set to any non-empty string, the partially +Finally, the tt(_path_files) function supports one configuration key: +tt(path_expand). If this is set to any non-empty string, the partially typed path from the line will be expanded as far as possible even if -trailing pathname components can not be completed. And if -tt(path_cursor) is set to a non-empty string, the cursor will be left -after the first ambiguous pathname component even when menucompletion -is used. +trailing pathname components can not be completed. ) item(tt(_parameters))( This should be used to complete parameter names if you need some of the diff --git a/Doc/Zsh/mod_compctl.yo b/Doc/Zsh/mod_compctl.yo index 785767e45..91f6112ee 100644 --- a/Doc/Zsh/mod_compctl.yo +++ b/Doc/Zsh/mod_compctl.yo @@ -1,4 +1,4 @@ -texinode(The compctl Module)(The complist Module)(The comp1 Module)(Zsh Modules) +texinode(The compctl Module)(The deltochar Module)(The comp1 Module)(Zsh Modules) sect(The compctl Module) The tt(compctl) module makes available several builtin commands. tt(compctl), is the standard way to control completions for ZLE. See diff --git a/Doc/Zsh/mod_deltochar.yo b/Doc/Zsh/mod_deltochar.yo index 4c3cf58e6..f92a3da0d 100644 --- a/Doc/Zsh/mod_deltochar.yo +++ b/Doc/Zsh/mod_deltochar.yo @@ -1,4 +1,4 @@ -texinode(The deltochar Module)(The example Module)(The complist Module)(Zsh Modules) +texinode(The deltochar Module)(The example Module)(The compctl Module)(Zsh Modules) sect(The deltochar Module) The tt(deltochar) module makes available one ZLE function: diff --git a/Doc/Zsh/mod_zle.yo b/Doc/Zsh/mod_zle.yo index f29ab0fd6..185f5118a 100644 --- a/Doc/Zsh/mod_zle.yo +++ b/Doc/Zsh/mod_zle.yo @@ -161,7 +161,7 @@ cindex(widgets, calling) cindex(calling widgets) cindex(widgets, defining) cindex(defining widgets) -xitem(tt(zle) tt(-l) [ tt(-L) ] [ tt(-a) ] [ var(string) ... ]) +xitem(tt(zle) tt(-l) [ tt(-L) ]) xitem(tt(zle) tt(-D) var(widget) ...) xitem(tt(zle) tt(-A) var(old-widget) var(new-widget)) xitem(tt(zle) tt(-N) var(widget) [ var(function) ]) @@ -176,15 +176,7 @@ item(tt(-l) [ tt(-L) ])( List all existing user-defined widgets. If the tt(-L) option is used, list in the form of tt(zle) commands to create the widgets. - -When combined with the tt(-a) option, all widget names are listed, -including the builtin ones. In this case the tt(-L) option is ignored. - -If at least one var(string) is given, nothing will be printed but the -return status will be zero if all var(string)s are names of existing -widgets (or of user-defined widgets if the tt(-a) flag is not given) -and non-zero if at least one var(string) is not a name of an defined -widget. +Built-in widgets are not listed. ) item(tt(-D) var(widget) ...)( Delete the named var(widget)s. @@ -242,12 +234,7 @@ them. The return status reflects the success or failure of the operation carried out by the widget, or if it is a user-defined widget the return status of -the shell function. - -A non-zero return status causes the shell to beep when the widget exits, -unless the tt(BEEP) options was unset or the widget was called via the -tt(zle) command. Thus if a user defined widget requires an immediate beep, -it should call the tt(beep) widget directly. +the shell function. ) enditem() ) diff --git a/Doc/Zsh/modules.yo b/Doc/Zsh/modules.yo index 12066b773..0b487f673 100644 --- a/Doc/Zsh/modules.yo +++ b/Doc/Zsh/modules.yo @@ -22,9 +22,6 @@ item(tt(compctl))( The tt(compctl) builtin for controlling completion and the builtins for completion widgets. ) -item(tt(complist))( -Completion listing extensions. -) item(tt(deltochar))( A ZLE function duplicating EMACS' tt(zap-to-char). ) @@ -58,7 +55,6 @@ menu(The cap Module) menu(The clone Module) menu(The comp1 Module) menu(The compctl Module) -menu(The complist Module) menu(The deltochar Module) menu(The example Module) menu(The files Module) @@ -73,7 +69,6 @@ includefile(Zsh/mod_cap.yo) includefile(Zsh/mod_clone.yo) includefile(Zsh/mod_comp1.yo) includefile(Zsh/mod_compctl.yo) -includefile(Zsh/mod_complist.yo) includefile(Zsh/mod_deltochar.yo) includefile(Zsh/mod_example.yo) includefile(Zsh/mod_files.yo) diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo index 265c5e184..e7029370d 100644 --- a/Doc/Zsh/options.yo +++ b/Doc/Zsh/options.yo @@ -557,10 +557,7 @@ pindex(LIST_BEEP) cindex(beep, ambiguous completion) cindex(completion, beep on ambiguous) item(tt(LIST_BEEP))( -Beep on an ambiguous completion. More accurately, this forces the -completion widgets to return status 1 on an ambiguous completion, which -causes the shell to beep if the option tt(BEEP) is also set; this may -be modified if completion is called from a user-defined widget. +Beep on an ambiguous completion. ) pindex(LIST_TYPES) cindex(marking file types) diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo index 9353ec977..9f0b34193 100644 --- a/Doc/Zsh/params.yo +++ b/Doc/Zsh/params.yo @@ -858,19 +858,6 @@ item(tt(WORDCHARS) <S>)( A list of non-alphanumeric characters considered part of a word by the line editor. ) -vindex(ZBEEP) -item(tt(ZBEEP))( -If set, this gives a string of characters, which can use all the same codes -as the tt(bindkey) command as described in -ifzman(zmanref(zshzle))\ -ifnzman(noderef(Zsh Line Editor))\ -, that will be output to the terminal -instead of beeping. This may have a visible instead of an audible effect; -for example, the string `tt(\e[?5h\e[?5l)' on a vt100 or xterm will have -the effect of flashing reverse video on and off (if you usually use reverse -video, you should use the string `tt(\e[?5l\e[?5h)' instead). This takes -precedence over the tt(NOBEEP) option. -) vindex(ZDOTDIR) item(tt(ZDOTDIR))( The directory to search for shell startup files (.zshrc, etc), diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo index ce1b27fec..ba197facf 100644 --- a/Doc/Zsh/zle.yo +++ b/Doc/Zsh/zle.yo @@ -103,7 +103,8 @@ User-defined widgets, being implemented as shell functions, can execute any normal shell command. They can also run other widgets (whether built-in or user-defined) using the tt(zle) builtin command. They can use tt(read -k) or tt(read -q) to read characters from standard -input. Finally, they can examine and edit the ZLE buffer being edited by +input, which will use the appropriate tt(zle) key input mechanism. +Finally, they can examine and edit the ZLE buffer being edited by reading and setting the special parameters described below. cindex(parameters, editor) @@ -956,10 +957,6 @@ item(tt(accept-line-and-down-history) (^O) (unbound) (unbound))( Execute the current line, and push the next history event on the the buffer stack. ) -tindex(beep) -item(tt(beep))( -Beep, unless the tt(BEEP) option is unset. -) tindex(vi-cmd-mode) item(tt(vi-cmd-mode) (^X^V) (unbound) (^[))( Enter command mode; that is, select the `tt(vicmd)' keymap. |