summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2022-05-14 23:32:33 +0200
committerAxel Beckert <abe@deuxchevaux.org>2022-05-14 23:32:33 +0200
commit2ae4a3989e1bd06c82d597418a46b25cb14d57ed (patch)
tree9cfc4bf449c34f9493e369910e94773d4cc88366
parent43867f68c0b1279ec096ce5639e6ec3a2df8103f (diff)
parentd4d203488826181aa4eb360ce57de138417ba680 (diff)
downloadzsh-2ae4a3989e1bd06c82d597418a46b25cb14d57ed.tar.gz
zsh-2ae4a3989e1bd06c82d597418a46b25cb14d57ed.zip
Update upstream source from tag 'upstream/5.9'
Update to upstream version '5.9' with Debian dir 9ec0c75153d850f8dda83cca1a9ed3ff6200c14b
-rw-r--r--.gitignore157
-rw-r--r--ChangeLog43
-rw-r--r--Completion/Base/Utility/_values2
-rw-r--r--Completion/Linux/Command/_htop66
-rw-r--r--Completion/Unix/Command/_gradle114
-rw-r--r--Config/version.mk4
-rw-r--r--Doc/Zsh/builtins.yo3
-rw-r--r--Doc/help/functions81
-rw-r--r--Doc/help/getopts34
-rw-r--r--Doc/help/hash46
-rw-r--r--Doc/help/jobs26
-rw-r--r--Doc/help/kill26
-rw-r--r--Doc/help/let6
-rw-r--r--Doc/help/limit24
-rw-r--r--Doc/help/popd16
-rw-r--r--Doc/help/print86
-rw-r--r--Doc/help/printf44
-rw-r--r--Doc/help/pushd22
-rw-r--r--Doc/help/pwd4
-rw-r--r--Doc/help/read90
-rw-r--r--Doc/help/return20
-rw-r--r--Doc/help/set40
-rw-r--r--Doc/help/setopt32
-rw-r--r--Doc/help/shift4
-rw-r--r--Doc/help/source4
-rw-r--r--Doc/help/suspend4
-rw-r--r--Doc/help/test18
-rw-r--r--Doc/help/times2
-rw-r--r--Doc/help/trap52
-rw-r--r--Doc/help/ttyctl24
-rw-r--r--Doc/help/typeset394
-rw-r--r--Doc/help/ulimit28
-rw-r--r--Doc/help/umask6
-rw-r--r--Doc/help/unhash28
-rw-r--r--Doc/help/unlimit12
-rw-r--r--Doc/help/unset16
-rw-r--r--Doc/help/unsetopt10
-rw-r--r--Doc/help/wait26
-rw-r--r--Doc/help/whence50
-rw-r--r--Doc/help/zcompile116
-rw-r--r--Doc/help/zmodload304
-rw-r--r--Doc/version.yo4
-rw-r--r--Doc/zsh.12
-rw-r--r--Doc/zsh.texi15
-rw-r--r--Doc/zshall.14
-rw-r--r--Doc/zshbuiltins.15
-rw-r--r--Doc/zshcalsys.12
-rw-r--r--Doc/zshcompctl.12
-rw-r--r--Doc/zshcompsys.12
-rw-r--r--Doc/zshcompwid.12
-rw-r--r--Doc/zshcontrib.18
-rw-r--r--Doc/zshexpn.12
-rw-r--r--Doc/zshmisc.12
-rw-r--r--Doc/zshmodules.12
-rw-r--r--Doc/zshoptions.12
-rw-r--r--Doc/zshparam.12
-rw-r--r--Doc/zshroadmap.12
-rw-r--r--Doc/zshtcpsys.12
-rw-r--r--Doc/zshzftpsys.12
-rw-r--r--Doc/zshzle.12
-rw-r--r--Etc/.gitignore1
-rw-r--r--Src/openssh_bsd_setres_id.c10
-rw-r--r--Src/patchlevel.h.release2
-rw-r--r--Test/D03procsubst.ztst20
-rw-r--r--Test/D07multibyte.ztst14
-rw-r--r--Test/E01options.ztst7
-rw-r--r--Test/V14system.ztst66
67 files changed, 1163 insertions, 1105 deletions
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index ec2f56642..000000000
--- a/.gitignore
+++ /dev/null
@@ -1,157 +0,0 @@
-Makefile
-tags
-TAGS
-*.o
-*.o.c
-*.orig
-*.a
-*.so
-*.dll
-*~
-.*.sw?
-\#*
-
-/META-FAQ
-/config.cache
-/config.h
-/config.h.in
-/config.log
-/config.modules
-/config.modules.sh
-/config.status
-/config.status.lineno
-/configure
-/cscope.out
-/stamp-h
-/stamp-h.in
-/autom4te.cache
-
-Config/defs.mk
-
-CVS
-.#*
-
-Doc/help
-Doc/help.txt
-Doc/help/[_a-zA-Z0-9]*
-
-Doc/intro.pdf
-Doc/intro.ps
-Doc/intro.a4.pdf
-Doc/intro.a4.ps
-Doc/intro.us.pdf
-Doc/intro.us.ps
-Doc/version.yo
-Doc/texi2html.conf
-Doc/zsh*.1
-Doc/zsh.texi
-Doc/zsh.info*
-Doc/*.html
-Doc/zsh.aux
-Doc/zsh.toc
-Doc/zsh.cp
-Doc/zsh.cps
-Doc/zsh.fn
-Doc/zsh.fns
-Doc/zsh.ky
-Doc/zsh.kys
-Doc/zsh.pg
-Doc/zsh.pgs
-Doc/zsh.vr
-Doc/zsh.vrs
-Doc/zsh.log
-Doc/zsh.dvi
-Doc/zsh_a4.dvi
-Doc/zsh_us.dvi
-Doc/zsh.tp
-Doc/zsh.tps
-Doc/zsh.idx
-Doc/zsh_*.ps
-Doc/infodir
-Doc/zsh.pdf
-Doc/zsh_a4.pdf
-Doc/zsh_us.pdf
-
-Doc/Zsh/modlist.yo
-Doc/Zsh/modmenu.yo
-Doc/Zsh/manmodmenu.yo
-
-Etc/FAQ
-Etc/FAQ.html
-
-Src/*.epro
-Src/*.export
-Src/*.mdh
-Src/*.mdh.tmp
-Src/*.mdhi
-Src/*.mdhs
-Src/*.syms
-Src/Makemod.in
-Src/Makemod
-Src/[_a-zA-Z0-9]*.pro
-Src/ansi2knr
-Src/bltinmods.list
-Src/cscope.out
-Src/libzsh.so*
-Src/modules-bltin
-Src/modules.index
-Src/modules.index.tmp
-Src/modules.stamp
-Src/patchlevel.h
-Src/sigcount.h
-Src/signames.c
-Src/signames2.c
-Src/stamp-modobjs
-Src/stamp-modobjs.tmp
-Src/tags
-Src/TAGS
-Src/version.h
-Src/zsh
-Src/zsh.exe
-Src/zshcurses.h
-Src/zshpaths.h
-Src/zshterm.h
-Src/zshxmods.h
-
-Src/Builtins/Makefile.in
-Src/Builtins/*.export
-Src/Builtins/so_locations
-Src/Builtins/*.pro
-Src/Builtins/*.epro
-Src/Builtins/*.syms
-Src/Builtins/*.mdh
-Src/Builtins/*.mdhi
-Src/Builtins/*.mdhs
-Src/Builtins/*.mdh.tmp
-
-Src/Modules/Makefile.in
-Src/Modules/*.export
-Src/Modules/so_locations
-Src/Modules/*.pro
-Src/Modules/*.epro
-Src/Modules/*.syms
-Src/Modules/*.mdh
-Src/Modules/*.mdhi
-Src/Modules/*.mdhs
-Src/Modules/*.mdh.tmp
-Src/Modules/errnames.c
-Src/Modules/errcount.h
-Src/Modules/curses_keys.h
-
-Src/Zle/Makefile.in
-Src/Zle/*.export
-Src/Zle/so_locations
-Src/Zle/*.pro
-Src/Zle/*.epro
-Src/Zle/*.syms
-Src/Zle/*.mdh
-Src/Zle/*.mdhi
-Src/Zle/*.mdhs
-Src/Zle/*.mdh.tmp
-Src/Zle/thingies.list
-Src/Zle/widgets.list
-Src/Zle/zle_things.h
-Src/Zle/zle_widget.h
-
-Test/*.tmp
-/.project
diff --git a/ChangeLog b/ChangeLog
index 7de1a877a..5425b198f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,46 @@
+2022-05-14 dana <dana@dana.is>
+
+ * unposted: Config/version.mk: Update for 5.9
+
+2022-05-11 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
+
+ * 50192: Src/openssh_bsd_setres_id.c: use set{u,g}id() instead of
+ setre{u,g}id() for dropping privilege on NetBSD
+
+2022-05-08 dana <dana@dana.is>
+
+ * 50176 (with xpufx, tweaked): Completion/Linux/Command/_htop:
+ Improve htop completion
+
+2022-05-07 Bart Schaefer <schaefer@zsh.org>
+
+ * 50184: Completion/Base/Utility/_values: fix inclusion of -S
+ separator in -r options passed to compadd through _describe
+
+ * Marlon Richert: 49954: Completion/Unix/Command/_gradle: improve
+ handling of task names, subprojects, completion tags, and caching
+
+ * unposted: Doc/Zsh/builtins.yo: cross-reference "typeset -f" for
+ "functions -[Tt]"
+
+2022-05-02 Bart Schaefer <schaefer@zsh.org>
+
+ * unposted (cf. Jun-ichi 50164): Test/E01options.ztst: add sleep
+ after nullexec test to allow background process to flush writes
+ (observed only on MacOS Monterey 12).
+
+ * 50162: Test/D07multibyte.ztst: Tweak 50150 test to check proper
+ metafication of array elements and to ignore collation variances
+
+2022-05-01 Bart Schaefer <schaefer@zsh.org>
+
+ * 50160: Test/D03procsubst.ztst, Test/E01options.ztst: Regression
+ tests for 50126, 50136, and 50149
+
+ * 50159: Test/V14system.ztst: Tests for sysread
+
+ * 50157 (Daniel Shahaf): Test/D07multibyte.ztst: Test for 50150
+
2022-05-01 dana <dana@dana.is>
* unposted: Config/version.mk: Update for 5.8.1.3-test (5.9)
diff --git a/Completion/Base/Utility/_values b/Completion/Base/Utility/_values
index 688ada848..5ed79e890 100644
--- a/Completion/Base/Utility/_values
+++ b/Completion/Base/Utility/_values
@@ -60,7 +60,7 @@ if compvalues -i "$keep[@]" "$@"; then
_describe "$descr" \
noargs "$sep[@]" -M 'r:|[_-]=* r:|=*' -- \
args -S "${argsep}" -M 'r:|[_-]=* r:|=*' -- \
- opts -qS "${argsep}" -r "${argsep}${sep} \\t\\n\\-" -M 'r:|[_-]=* r:|=*'
+ opts -qS "${argsep}" -r "${argsep}${sep[2]} \\t\\n\\-" -M 'r:|[_-]=* r:|=*'
curcontext="$oldcontext"
diff --git a/Completion/Linux/Command/_htop b/Completion/Linux/Command/_htop
index 28c7512bf..e8d2fffb1 100644
--- a/Completion/Linux/Command/_htop
+++ b/Completion/Linux/Command/_htop
@@ -1,11 +1,55 @@
-#compdef htop
-
-_arguments -S : \
- '(-d --delay)'{-d+,--delay=}'[update frequency]:duration (tenths of seconds)' \
- '(-C --no-color --no-colour)'{-C,--no-colo{,u}r}'[monochrome mode]' \
- '(-)'{-h,--help}'[display usage information]' \
- \*{-p+,--pid=}'[show given pids]: : _sequence -n ${$(</proc/sys/kernel/pid_max)\:-32768} _pids' \
- '(-s --sort-key)'{-s+,--sort-key=}'[sort by key]:key:( ${(f)"$(_call_program sort-keys $words[1] --sort-key help)"} )' \
- '(-t --tree)'{-t,--tree}'[show tree view of processes]' \
- '(-u --user)'{-u+,--user=}'[show processes of user]: : _users' \
- '(-)'{-v,--version}'[display version information]'
+#compdef htop pcp-htop
+
+# Notes:
+# - htop allows long options to be passed with a single dash; we don't account
+# for this
+# - htop parses optional arguments to -H and -u 'cleverly' by allowing the next
+# word to be the optarg if it doesn't begin with a '-'; this should work here
+# - There is a special version of htop designed to be used with PCP (Performance
+# CoPilot); we don't fully account for this
+# - Some of the ranges and defaults listed here had to be found in the source
+
+local MATCH MBEGIN MEND ret=1
+local -a context line state state_descr args tmp
+
+args=(
+ '(-d --delay)'{-d+,--delay=}'[specify update frequency]:delay (tenths of seconds) (1-100) [15]'
+ '(-C --no-color --no-colour)'{-C,--no-colo{,u}r}'[use monochrome colour scheme]'
+ '(-F --filter)'{-F+,--filter=}'[show only commands matching specified filter]:case-insensitive command-line sub-string:_process_names -a'
+ '(-)'{-h,--help}'[display usage information]'
+ '(-H --highlight-changes)'{-H+,--highlight-changes=}'[highlight new and old processes (optionally specify delay)]::delay (seconds) (1-86400) [5]'
+ '(-M --no-mouse)'{-M,--no-mouse}'[disable mouse]'
+ \*{-p+,--pid=}'[show only specified PIDs]: : _sequence _pids'
+ '--readonly[disable all system and process changing features]'
+ '(-s --sort-key)'{-s+,--sort-key=}'[sort by specified column]: :->sort-keys'
+ '(-t --tree)'{-t,--tree}'[show tree view of processes]'
+ '(-u --user)'{-u+,--user=}'[show only processes of current or specified user]:: : _users'
+ '(-U --no-unicode)'{-U,--no-unicode}'[disable Unicode]'
+ '(-)'{-V,--version}'[display version information]'
+)
+
+[[ $OSTYPE == linux* ]] &&
+(( ! EUID || $+_comp_priv_prefix )) &&
+_pick_variant libcap=drop-capabilities $OSTYPE --help &&
+args+=(
+ '--drop-capabilities=-[drop specified capabilities]::mode [basic]:((
+ off\:"do not drop capabilities"
+ basic\:"drop capabilities not needed for standard functionality (retains kill, renice, etc.)"
+ strict\:"drop capabilities not needed for core functionality"
+ ))'
+)
+
+_arguments -s -S : $args && ret=0
+
+case $state in
+ sort-keys)
+ tmp=( ${(f)"$(_call_program sort-keys $words[1] --sort-key help)"} )
+ tmp=( ${tmp/#[[:space:]]##} )
+ tmp=( ${tmp//:/\\:} )
+ tmp=( ${tmp/[[:space:]]##/:} )
+ tmp=( ${tmp/(#m):[A-Z]/${(L)MATCH}} )
+ _describe -t sort-keys 'column (key)' tmp && ret=0
+ ;;
+esac
+
+return ret
diff --git a/Completion/Unix/Command/_gradle b/Completion/Unix/Command/_gradle
index a1d9381cb..c1f7c05ee 100644
--- a/Completion/Unix/Command/_gradle
+++ b/Completion/Unix/Command/_gradle
@@ -1,13 +1,24 @@
#compdef gradle gradlew
-local curcontext="$curcontext" ret=1 state state_descr line
-local gradle_inspect=yes cache_policy tag_order filter=
-local -A opt_args
-local -aU gradle_group_tasks gradle_all_tasks tasks
+local -i ret=1
+local curcontext="$curcontext" state state_descr outputline
+local gradle_inspect=yes gradle_buildfile cache_policy cache_name tag_order filter
+local -A opt_args task_map
+local -aU gradle_subprojects gradle_tasks tasks
+local -a match mbegin mend
-# Set the caching policy to invalidate cache if the build file is newer than the cache.
_gradle_caching_policy() {
- [[ $gradle_buildfile -nt $1 ]]
+ # Invalidate the cache if it cannot be read.
+ [[ -r "$1" ]] ||
+ return 0
+
+ # Invalidate the cache if it's older than the build file.
+ [[ $gradle_buildfile -nt $1 ]] &&
+ return
+
+ # Invalidate the cache if it doesn't contain the required arrays.
+ local cache="$( < $1 )"
+ [[ "$cache" != *'gradle_subprojects=('*')'* || "$cache" != *'gradle_tasks=('*')'* ]]
}
zstyle -s ":completion:*:*:$service:*" cache-policy cache_policy || \
@@ -59,76 +70,73 @@ _arguments -C \
'(-)--stop[Stops the Gradle daemon if it is running.]' \
{-u,--no-search-upward}"[Don't search in parent folders for a settings.gradle file.]" \
'(-)'{-v,--version}'[Print version info.]' \
- {-x,--exclude-task}'[Specify a task to be excluded from execution.]:task to exclude:->alltask' \
+ {-x,--exclude-task}'[Specify a task to be excluded from execution.]:task to exclude:->task' \
'*:task:->task' \
&& ret=0
-if [[ $words[CURRENT] != -* ]]; then
+if [[ $state == task && ! -prefix - ]]; then
+ # :<task> runs <task> in the root project only.
+ # :<subproject>:<task> is the same as <subproject>:<task> (without the leading colon).
+ compset -P \:
+
if [[ $gradle_inspect == yes ]]; then
# If a build file is specified after '-b' or '--build-file', use this file. Otherwise,
# default is the file 'build.gradle' in the current directory.
- local gradle_buildfile=${${(v)opt_args[(i)-b|--build-file]}:-build.gradle}
+ gradle_buildfile=${${(v)opt_args[(i)-b|--build-file]}:-build.gradle}
if [[ -f $gradle_buildfile ]]; then
# Cache name is constructed from the absolute path of the build file.
- local cache_name=${${gradle_buildfile:a}//[^[:alnum:]]/_}
+ cache_name=${${gradle_buildfile:a}//[^[:alnum:]]/_}
+
if _cache_invalid $cache_name || ! _retrieve_cache $cache_name; then
zle -R "Generating cache from $gradle_buildfile"
- local outputline
- local -a match mbegin mend
+
# Run gradle/gradlew and retrieve possible tasks.
for outputline in ${(f)"$($service --build-file $gradle_buildfile -q tasks --all)"}; do
- # Subproject tasks are prefixed with one or more instances of [[:alnum:]]##\:
- # Leaving out the prefix runs the task in all subprojects where it exists.
- if [[ $outputline ==
- [[:blank:]]#(#b)([[:alnum:]]##\:)#([[:alnum:]]##)' - '(*) ]]; then
- # The descriptions of main tasks start at beginning of line, descriptions of
- # secondary tasks are indented.
- if [[ $outputline == [[:alnum:]]* ]]; then
- gradle_group_tasks+=(
- "$match[-2]:$match[-1]"
- "${${(j::)match[1,-2]}//:/\:}:$match[-1]"
- )
+
+ # Tasks and subprojects each start with a lowercase letter, but whereas tasks are in camelCase, each
+ # subproject consists of one or more sections of kebab-case, with each section ending in a ':'.
+ # A subproject task is a task prefixed with a subproject and runs in that project only.
+ # Specifying a task without a subproject prefix runs the task in all subprojects where it exists.
+ # Tasks prefixed by whitespace are dependencies of the task above them and should be ignored.
+ if [[ $outputline == (#b)([[:lower:]][-[:lower:][:digit:]]#\:)#([[:lower:]][[:alnum:]]#)(|' - '*) ]]
+ then
+ task=$match[-2]
+ task_descr=${match[-1]# - }
+ shift -p 2 match
+ subproject=${(j::)match//:/'\:'}
+
+ if [[ -n $subproject ]]; then
+ gradle_subprojects+=( ${subproject%'\:'} )
+ task_map[$subproject$task]=$task_descr
+
+ # We cannot count on the description of a subproject task to be representative of the task
+ # in general.
+ : ${task_map[$task]=}
else
- gradle_all_tasks+=(
- "${${(j::)match[1,-2]}//:/\:}:$match[-1]"
- )
+ task_map[$task]=$task_descr
fi
fi
done
- _store_cache $cache_name gradle_group_tasks gradle_all_tasks
+ printf -v gradle_tasks '%s:%s' "${(kv@)task_map}"
+ _store_cache $cache_name gradle_subprojects gradle_tasks
fi
- filter=
- zstyle -T ":completion:${curcontext}:tasks" prefix-needed &&
- [[ $PREFIX != ([[:alnum:]]##\:)## ]] &&
- filter+="*\:*"
- if [[ $state == task ]]; then
- _tags gradle_group gradle_all
- while _tags; do
- # Offer main tasks and secondary tasks in different tags.
- if _requested gradle_group; then
- tasks=( ${gradle_group_tasks:#$~filter} )
- _describe -t tasks 'group task' tasks &&
- ret=0
- fi
- if _requested gradle_all; then
- tasks=( ${gradle_all_tasks:#$~filter} )
- _describe -t tasks 'secondary task' tasks &&
- ret=0
- fi
- (( ret )) || break
- done
- elif [[ $state == alltask ]]; then
- # After '--exclude-task', we don't make a distinction between main tasks and
- # secondary tasks.
- tasks=( ${gradle_group_tasks:#$~filter} ${gradle_all_tasks:#$~filter} )
- _describe -t tasks 'task' tasks &&
+ if [[ $IPREFIX == *: ]] || ! zstyle -T ":completion:${curcontext}:subprojects" prefix-needed; then
+ _describe -t subprojects 'gradle subproject' gradle_subprojects -S \: &&
ret=0
fi
+ if [[ $PREFIX == *:* ]] || ! zstyle -T ":completion:${curcontext}:tasks" prefix-needed; then
+ tasks=( $gradle_tasks[@] )
+ else
+ # If no subproject is specified, then filter out all subproject tasks.
+ tasks=( ${gradle_tasks[@]:#*'\:'*} )
+ fi
+ _describe -t tasks 'gradle task' tasks &&
+ ret=0
fi
else
- _describe 'built-in task' '(
+ _describe -t tasks 'built-in task' '(
"dependencies:Displays all dependencies declared in root project."
"dependencyInsight:Displays the insight into a specific dependency in root project."
"help:Displays a help message."
diff --git a/Config/version.mk b/Config/version.mk
index ee6058b0d..524c87246 100644
--- a/Config/version.mk
+++ b/Config/version.mk
@@ -27,5 +27,5 @@
# This must also serve as a shell script, so do not add spaces around the
# `=' signs.
-VERSION=5.8.1.3-test
-VERSION_DATE='May 1, 2022'
+VERSION=5.9
+VERSION_DATE='May 14, 2022'
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
index 1d74f0c17..280f1d72a 100644
--- a/Doc/Zsh/builtins.yo
+++ b/Doc/Zsh/builtins.yo
@@ -874,7 +874,8 @@ xitem(tt(functions -M) [ tt(-m) var(pattern) ... ])
item(tt(functions +M) [ tt(-m) ] var(mathfn) ... )(
Equivalent to tt(typeset -f), with the exception of the tt(-c), tt(-x),
tt(-M) and tt(-W) options. For tt(functions -u) and tt(functions -U),
-see tt(autoload), which provides additional options.
+see tt(autoload), which provides additional options. For tt(functions -t)
+and tt(functions -T), see tt(typeset -f).
The tt(-x) option indicates that any functions output will have
each leading tab for indentation, added by the shell to show syntactic
diff --git a/Doc/help/functions b/Doc/help/functions
index cadbd0350..37472368f 100644
--- a/Doc/help/functions
+++ b/Doc/help/functions
@@ -5,23 +5,24 @@ functions -M [ -m pattern ... ]
functions +M [ -m ] mathfn ...
Equivalent to typeset -f, with the exception of the -c, -x, -M
and -W options. For functions -u and functions -U, see au-
- toload, which provides additional options.
+ toload, which provides additional options. For functions -t and
+ functions -T, see typeset -f.
The -x option indicates that any functions output will have each
- leading tab for indentation, added by the shell to show syntac-
- tic structure, expanded to the given number num of spaces. num
+ leading tab for indentation, added by the shell to show syntac-
+ tic structure, expanded to the given number num of spaces. num
can also be 0 to suppress all indentation.
- The -W option turns on the option WARN_NESTED_VAR for the named
- function or functions only. The option is turned off at the
- start of nested functions (apart from anonoymous functions) un-
+ The -W option turns on the option WARN_NESTED_VAR for the named
+ function or functions only. The option is turned off at the
+ start of nested functions (apart from anonoymous functions) un-
less the called function also has the -W attribute.
- The -c option causes oldfn to be copied to newfn. The copy is
- efficiently handled internally by reference counting. If oldfn
+ The -c option causes oldfn to be copied to newfn. The copy is
+ efficiently handled internally by reference counting. If oldfn
was marked for autoload it is first loaded and if this fails the
copy fails. Either function may subsequently be redefined with-
- out affecting the other. A typical idiom is that oldfn is the
+ out affecting the other. A typical idiom is that oldfn is the
name of a library shell function which is then redefined to call
newfn, thereby installing a modified version of the function.
@@ -31,30 +32,30 @@ functions +M [ -m ] mathfn ...
handled by typeset -f.
functions -M mathfn defines mathfn as the name of a mathematical
- function recognised in all forms of arithmetical expressions;
- see the section `Arithmetic Evaluation' in zshmisc(1). By de-
- fault mathfn may take any number of comma-separated arguments.
- If min is given, it must have exactly min args; if min and max
- are both given, it must have at least min and at most max args.
+ function recognised in all forms of arithmetical expressions;
+ see the section `Arithmetic Evaluation' in zshmisc(1). By de-
+ fault mathfn may take any number of comma-separated arguments.
+ If min is given, it must have exactly min args; if min and max
+ are both given, it must have at least min and at most max args.
max may be -1 to indicate that there is no upper limit.
- By default the function is implemented by a shell function of
- the same name; if shellfn is specified it gives the name of the
- corresponding shell function while mathfn remains the name used
- in arithmetical expressions. The name of the function in $0 is
- mathfn (not shellfn as would usually be the case), provided the
+ By default the function is implemented by a shell function of
+ the same name; if shellfn is specified it gives the name of the
+ corresponding shell function while mathfn remains the name used
+ in arithmetical expressions. The name of the function in $0 is
+ mathfn (not shellfn as would usually be the case), provided the
option FUNCTION_ARGZERO is in effect. The positional parameters
- in the shell function correspond to the arguments of the mathe-
+ in the shell function correspond to the arguments of the mathe-
matical function call.
- The result of the last arithmetical expression evaluated inside
- the shell function gives the result of the mathematical func-
- tion. This is not limited to arithmetic substitutions of the
+ The result of the last arithmetical expression evaluated inside
+ the shell function gives the result of the mathematical func-
+ tion. This is not limited to arithmetic substitutions of the
form $((...)), but also includes arithmetical expressions evalu-
- ated in any other way, including by the let builtin, by ((...))
- statements, and even by the return builtin and by array sub-
- scripts. Therefore, care must be taken not to use syntactical
- constructs that perform arithmetic evaluation after evaluating
+ ated in any other way, including by the let builtin, by ((...))
+ statements, and even by the return builtin and by array sub-
+ scripts. Therefore, care must be taken not to use syntactical
+ constructs that perform arithmetic evaluation after evaluating
what is to be the result of the function. For example:
# WRONG
@@ -68,9 +69,9 @@ functions +M [ -m ] mathfn ...
This will print `0' because of the return.
Commenting the return out would lead to a different problem: the
- ((...)) statement would become the last statement in the func-
- tion, so the return status ($?) of the function would be
- non-zero (indicating failure) whenever the arithmetic result of
+ ((...)) statement would become the last statement in the func-
+ tion, so the return status ($?) of the function would be
+ non-zero (indicating failure) whenever the arithmetic result of
the function would happen to be zero (numerically):
# WRONG
@@ -90,12 +91,12 @@ functions +M [ -m ] mathfn ...
functions -M cube 1 1 zmath_cube
print $(( cube(3) ))
- If the additional option -s is given to functions -M, the argu-
- ment to the function is a single string: anything between the
- opening and matching closing parenthesis is passed to the func-
- tion as a single argument, even if it includes commas or white
- space. The minimum and maximum argument specifiers must there-
- fore be 1 if given. An empty argument list is passed as a
+ If the additional option -s is given to functions -M, the argu-
+ ment to the function is a single string: anything between the
+ opening and matching closing parenthesis is passed to the func-
+ tion as a single argument, even if it includes commas or white
+ space. The minimum and maximum argument specifiers must there-
+ fore be 1 if given. An empty argument list is passed as a
zero-length string. Thus, the following string function takes a
single argument, including the commas, and prints 11:
@@ -105,11 +106,11 @@ functions +M [ -m ] mathfn ...
functions -M with no arguments lists all such user-defined func-
tions in the same form as a definition. With the additional op-
- tion -m and a list of arguments, all functions whose mathfn
+ tion -m and a list of arguments, all functions whose mathfn
matches one of the pattern arguments are listed.
function +M removes the list of mathematical functions; with the
- additional option -m the arguments are treated as patterns and
- all functions whose mathfn matches the pattern are removed.
- Note that the shell function implementing the behaviour is not
+ additional option -m the arguments are treated as patterns and
+ all functions whose mathfn matches the pattern are removed.
+ Note that the shell function implementing the behaviour is not
removed (regardless of whether its name coincides with mathfn).
diff --git a/Doc/help/getopts b/Doc/help/getopts
index bb89d2f2a..ef58eefd4 100644
--- a/Doc/help/getopts
+++ b/Doc/help/getopts
@@ -1,31 +1,31 @@
getopts optstring name [ arg ... ]
Checks the args for legal options. If the args are omitted, use
- the positional parameters. A valid option argument begins with
- a `+' or a `-'. An argument not beginning with a `+' or a `-',
- or the argument `--', ends the options. Note that a single `-'
- is not considered a valid option argument. optstring contains
+ the positional parameters. A valid option argument begins with
+ a `+' or a `-'. An argument not beginning with a `+' or a `-',
+ or the argument `--', ends the options. Note that a single `-'
+ is not considered a valid option argument. optstring contains
the letters that getopts recognizes. If a letter is followed by
- a `:', that option requires an argument. The options can be
+ a `:', that option requires an argument. The options can be
separated from the argument by blanks.
- Each time it is invoked, getopts places the option letter it
+ Each time it is invoked, getopts places the option letter it
finds in the shell parameter name, prepended with a `+' when arg
- begins with a `+'. The index of the next arg is stored in
+ begins with a `+'. The index of the next arg is stored in
OPTIND. The option argument, if any, is stored in OPTARG.
The first option to be examined may be changed by explicitly as-
- signing to OPTIND. OPTIND has an initial value of 1, and is
- normally set to 1 upon entry to a shell function and restored
- upon exit. (The POSIX_BUILTINS option disables this, and also
- changes the way the value is calculated to match other shells.)
- OPTARG is not reset and retains its value from the most recent
- call to getopts. If either of OPTIND or OPTARG is explicitly
+ signing to OPTIND. OPTIND has an initial value of 1, and is
+ normally set to 1 upon entry to a shell function and restored
+ upon exit. (The POSIX_BUILTINS option disables this, and also
+ changes the way the value is calculated to match other shells.)
+ OPTARG is not reset and retains its value from the most recent
+ call to getopts. If either of OPTIND or OPTARG is explicitly
unset, it remains unset, and the index or option argument is not
stored. The option itself is still stored in name in this case.
A leading `:' in optstring causes getopts to store the letter of
- any invalid option in OPTARG, and to set name to `?' for an un-
- known option and to `:' when a required argument is missing.
- Otherwise, getopts sets name to `?' and prints an error message
- when an option is invalid. The exit status is nonzero when
+ any invalid option in OPTARG, and to set name to `?' for an un-
+ known option and to `:' when a required argument is missing.
+ Otherwise, getopts sets name to `?' and prints an error message
+ when an option is invalid. The exit status is nonzero when
there are no more options.
diff --git a/Doc/help/hash b/Doc/help/hash
index dcbc7fd1c..c1dfb49f2 100644
--- a/Doc/help/hash
+++ b/Doc/help/hash
@@ -1,47 +1,47 @@
hash [ -Ldfmrv ] [ name[=value] ] ...
- hash can be used to directly modify the contents of the command
- hash table, and the named directory hash table. Normally one
- would modify these tables by modifying one's PATH (for the com-
- mand hash table) or by creating appropriate shell parameters
- (for the named directory hash table). The choice of hash table
- to work on is determined by the -d option; without the option
- the command hash table is used, and with the option the named
+ hash can be used to directly modify the contents of the command
+ hash table, and the named directory hash table. Normally one
+ would modify these tables by modifying one's PATH (for the com-
+ mand hash table) or by creating appropriate shell parameters
+ (for the named directory hash table). The choice of hash table
+ to work on is determined by the -d option; without the option
+ the command hash table is used, and with the option the named
directory hash table is used.
A command name starting with a / is never hashed, whether by ex-
- plicit use of the hash command or otherwise. Such a command is
+ plicit use of the hash command or otherwise. Such a command is
always found by direct look up in the file system.
- Given no arguments, and neither the -r or -f options, the se-
+ Given no arguments, and neither the -r or -f options, the se-
lected hash table will be listed in full.
- The -r option causes the selected hash table to be emptied. It
- will be subsequently rebuilt in the normal fashion. The -f op-
- tion causes the selected hash table to be fully rebuilt immedi-
- ately. For the command hash table this hashes all the absolute
- directories in the PATH, and for the named directory hash table
+ The -r option causes the selected hash table to be emptied. It
+ will be subsequently rebuilt in the normal fashion. The -f op-
+ tion causes the selected hash table to be fully rebuilt immedi-
+ ately. For the command hash table this hashes all the absolute
+ directories in the PATH, and for the named directory hash table
this adds all users' home directories. These two options cannot
be used with any arguments.
- The -m option causes the arguments to be taken as patterns
- (which should be quoted) and the elements of the hash table
- matching those patterns are printed. This is the only way to
+ The -m option causes the arguments to be taken as patterns
+ (which should be quoted) and the elements of the hash table
+ matching those patterns are printed. This is the only way to
display a limited selection of hash table elements.
- For each name with a corresponding value, put `name' in the se-
+ For each name with a corresponding value, put `name' in the se-
lected hash table, associating it with the pathname `value'. In
- the command hash table, this means that whenever `name' is used
- as a command argument, the shell will try to execute the file
+ the command hash table, this means that whenever `name' is used
+ as a command argument, the shell will try to execute the file
given by `value'. In the named directory hash table, this means
that `value' may be referred to as `~name'.
- For each name with no corresponding value, attempt to add name
+ For each name with no corresponding value, attempt to add name
to the hash table, checking what the appropriate value is in the
- normal manner for that hash table. If an appropriate value
+ normal manner for that hash table. If an appropriate value
can't be found, then the hash table will be unchanged.
The -v option causes hash table entries to be listed as they are
- added by explicit specification. If has no effect if used with
+ added by explicit specification. If has no effect if used with
-f.
If the -L flag is present, then each hash table entry is printed
diff --git a/Doc/help/jobs b/Doc/help/jobs
index 56f4e34fd..12dda21d8 100644
--- a/Doc/help/jobs
+++ b/Doc/help/jobs
@@ -1,26 +1,26 @@
jobs [ -dlprs ] [ job ... ]
jobs -Z string
- Lists information about each given job, or all jobs if job is
- omitted. The -l flag lists process IDs, and the -p flag lists
- process groups. If the -r flag is specified only running jobs
+ Lists information about each given job, or all jobs if job is
+ omitted. The -l flag lists process IDs, and the -p flag lists
+ process groups. If the -r flag is specified only running jobs
will be listed and if the -s flag is given only stopped jobs are
- shown. If the -d flag is given, the directory from which the
- job was started (which may not be the current directory of the
+ shown. If the -d flag is given, the directory from which the
+ job was started (which may not be the current directory of the
job) will also be shown.
- The -Z option replaces the shell's argument and environment
- space with the given string, truncated if necessary to fit.
+ The -Z option replaces the shell's argument and environment
+ space with the given string, truncated if necessary to fit.
This will normally be visible in ps (ps(1)) listings. This fea-
ture is typically used by daemons, to indicate their state.
- Full job control is only available in the top-level interactive
+ Full job control is only available in the top-level interactive
shell, not in commands run in the left hand side of pipelines or
- within the (...) construct. However, a snapshot of the job
+ within the (...) construct. However, a snapshot of the job
state at that point is taken, so it is still possible to use the
- jobs builtin, or any parameter providing job information. This
- gives information about the state of jobs at the point the sub-
- shell was created. If background processes are created within
- the subshell, then instead information about those processes is
+ jobs builtin, or any parameter providing job information. This
+ gives information about the state of jobs at the point the sub-
+ shell was created. If background processes are created within
+ the subshell, then instead information about those processes is
provided.
For example,
diff --git a/Doc/help/kill b/Doc/help/kill
index 9112ffefe..c68d46704 100644
--- a/Doc/help/kill
+++ b/Doc/help/kill
@@ -1,24 +1,24 @@
kill [ -s signal_name | -n signal_number | -sig ] job ...
kill -l [ sig ... ]
- Sends either SIGTERM or the specified signal to the given jobs
- or processes. Signals are given by number or by names, with or
- without the `SIG' prefix. If the signal being sent is not
- `KILL' or `CONT', then the job will be sent a `CONT' signal if
- it is stopped. The argument job can be the process ID of a job
+ Sends either SIGTERM or the specified signal to the given jobs
+ or processes. Signals are given by number or by names, with or
+ without the `SIG' prefix. If the signal being sent is not
+ `KILL' or `CONT', then the job will be sent a `CONT' signal if
+ it is stopped. The argument job can be the process ID of a job
not in the job list. In the second form, kill -l, if sig is not
- specified the signal names are listed. Otherwise, for each sig
- that is a name, the corresponding signal number is listed. For
- each sig that is a signal number or a number representing the
- exit status of a process which was terminated or stopped by a
+ specified the signal names are listed. Otherwise, for each sig
+ that is a name, the corresponding signal number is listed. For
+ each sig that is a signal number or a number representing the
+ exit status of a process which was terminated or stopped by a
signal the name of the signal is printed.
- On some systems, alternative signal names are allowed for a few
+ On some systems, alternative signal names are allowed for a few
signals. Typical examples are SIGCHLD and SIGCLD or SIGPOLL and
SIGIO, assuming they correspond to the same signal number. kill
- -l will only list the preferred form, however kill -l alt will
- show if the alternative form corresponds to a signal number.
+ -l will only list the preferred form, however kill -l alt will
+ show if the alternative form corresponds to a signal number.
For example, under Linux kill -l IO and kill -l POLL both output
29, hence kill -IO and kill -POLL have the same effect.
- Many systems will allow process IDs to be negative to kill a
+ Many systems will allow process IDs to be negative to kill a
process group or zero to kill the current process group.
diff --git a/Doc/help/let b/Doc/help/let
index 2119df55c..96f3dc167 100644
--- a/Doc/help/let
+++ b/Doc/help/let
@@ -1,6 +1,6 @@
let arg ...
- Evaluate each arg as an arithmetic expression. See the section
- `Arithmetic Evaluation' in zshmisc(1) for a description of
- arithmetic expressions. The exit status is 0 if the value of
+ Evaluate each arg as an arithmetic expression. See the section
+ `Arithmetic Evaluation' in zshmisc(1) for a description of
+ arithmetic expressions. The exit status is 0 if the value of
the last expression is nonzero, 1 if it is zero, and 2 if an er-
ror occurred.
diff --git a/Doc/help/limit b/Doc/help/limit
index 342df33da..1e31b122d 100644
--- a/Doc/help/limit
+++ b/Doc/help/limit
@@ -1,17 +1,17 @@
limit [ -hs ] [ resource [ limit ] ] ...
- Set or display resource limits. Unless the -s flag is given,
- the limit applies only the children of the shell. If -s is
- given without other arguments, the resource limits of the cur-
- rent shell is set to the previously set resource limits of the
+ Set or display resource limits. Unless the -s flag is given,
+ the limit applies only the children of the shell. If -s is
+ given without other arguments, the resource limits of the cur-
+ rent shell is set to the previously set resource limits of the
children.
If limit is not specified, print the current limit placed on re-
- source, otherwise set the limit to the specified value. If the
+ source, otherwise set the limit to the specified value. If the
-h flag is given, use hard limits instead of soft limits. If no
resource is given, print all limits.
When looping over multiple resources, the shell will abort imme-
- diately if it detects a badly formed argument. However, if it
+ diately if it detects a badly formed argument. However, if it
fails to set a limit for some other reason it will continue try-
ing to set the remaining limits.
@@ -20,7 +20,7 @@ limit [ -hs ] [ resource [ limit ] ] ...
addressspace
Maximum amount of address space used.
aiomemorylocked
- Maximum amount of memory locked in RAM for AIO opera-
+ Maximum amount of memory locked in RAM for AIO opera-
tions.
aiooperations
Maximum number of AIO operations.
@@ -71,10 +71,10 @@ limit [ -hs ] [ resource [ limit ] ] ...
for the resource by the operating system.
If argument corresponds to a number which is out of the range of
- the resources configured into the shell, the shell will try to
+ the resources configured into the shell, the shell will try to
read or write the limit anyway, and will report an error if this
- fails. As the shell does not store such resources internally,
- an attempt to set the limit will fail unless the -s option is
+ fails. As the shell does not store such resources internally,
+ an attempt to set the limit will fail unless the -s option is
present.
limit is a number, with an optional scaling factor, as follows:
@@ -86,6 +86,6 @@ limit [ -hs ] [ resource [ limit ] ] ...
[mm:]ss
minutes and seconds
- The limit command is not made available by default when the
- shell starts in a mode emulating another shell. It can be made
+ The limit command is not made available by default when the
+ shell starts in a mode emulating another shell. It can be made
available with the command `zmodload -F zsh/rlimits b:limit'.
diff --git a/Doc/help/popd b/Doc/help/popd
index d2fa4643b..d6201367a 100644
--- a/Doc/help/popd
+++ b/Doc/help/popd
@@ -1,14 +1,14 @@
popd [ -q ] [ {+|-}n ]
- Remove an entry from the directory stack, and perform a cd to
- the new top directory. With no argument, the current top entry
+ Remove an entry from the directory stack, and perform a cd to
+ the new top directory. With no argument, the current top entry
is removed. An argument of the form `+n' identifies a stack en-
try by counting from the left of the list shown by the dirs com-
- mand, starting with zero. An argument of the form -n counts
- from the right. If the PUSHD_MINUS option is set, the meanings
+ mand, starting with zero. An argument of the form -n counts
+ from the right. If the PUSHD_MINUS option is set, the meanings
of `+' and `-' in this context are swapped.
- If the -q (quiet) option is specified, the hook function chpwd
- and the functions in the array $chpwd_functions are not called,
- and the new directory stack is not printed. This is useful for
- calls to popd that do not change the environment seen by an in-
+ If the -q (quiet) option is specified, the hook function chpwd
+ and the functions in the array $chpwd_functions are not called,
+ and the new directory stack is not printed. This is useful for
+ calls to popd that do not change the environment seen by an in-
teractive user.
diff --git a/Doc/help/print b/Doc/help/print
index 3bf470e5d..fd6dd0b02 100644
--- a/Doc/help/print
+++ b/Doc/help/print
@@ -1,51 +1,51 @@
print [ -abcDilmnNoOpPrsSz ] [ -u n ] [ -f format ] [ -C cols ]
[ -v name ] [ -xX tabstop ] [ -R [ -en ]] [ arg ... ]
- With the `-f' option the arguments are printed as described by
- printf. With no flags or with the flag `-', the arguments are
- printed on the standard output as described by echo, with the
- following differences: the escape sequence `\M-x' (or `\Mx')
- metafies the character x (sets the highest bit), `\C-x' (or
- `\Cx') produces a control character (`\C-@' and `\C-?' give the
+ With the `-f' option the arguments are printed as described by
+ printf. With no flags or with the flag `-', the arguments are
+ printed on the standard output as described by echo, with the
+ following differences: the escape sequence `\M-x' (or `\Mx')
+ metafies the character x (sets the highest bit), `\C-x' (or
+ `\Cx') produces a control character (`\C-@' and `\C-?' give the
characters NULL and delete), a character code in octal is repre-
sented by `\NNN' (instead of `\0NNN'), and `\E' is a synonym for
- `\e'. Finally, if not in an escape sequence, `\' escapes the
+ `\e'. Finally, if not in an escape sequence, `\' escapes the
following character and is not printed.
-a Print arguments with the column incrementing first. Only
useful with the -c and -C options.
- -b Recognize all the escape sequences defined for the bind-
+ -b Recognize all the escape sequences defined for the bind-
key command, see the section `Zle Builtins' in zshzle(1).
-c Print the arguments in columns. Unless -a is also given,
arguments are printed with the row incrementing first.
-C cols
- Print the arguments in cols columns. Unless -a is also
- given, arguments are printed with the row incrementing
+ Print the arguments in cols columns. Unless -a is also
+ given, arguments are printed with the row incrementing
first.
- -D Treat the arguments as paths, replacing directory pre-
+ -D Treat the arguments as paths, replacing directory pre-
fixes with ~ expressions corresponding to directory
names, as appropriate.
- -i If given together with -o or -O, sorting is performed
+ -i If given together with -o or -O, sorting is performed
case-independently.
-l Print the arguments separated by newlines instead of spa-
- ces. Note: if the list of arguments is empty, print -l
- will still output one empty line. To print a possi-
- bly-empty list of arguments one per line, use print -C1,
+ ces. Note: if the list of arguments is empty, print -l
+ will still output one empty line. To print a possi-
+ bly-empty list of arguments one per line, use print -C1,
as in `print -rC1 -- "$list[@]"'.
- -m Take the first argument as a pattern (should be quoted),
+ -m Take the first argument as a pattern (should be quoted),
and remove it from the argument list together with subse-
quent arguments that do not match this pattern.
-n Do not add a newline to the output.
- -N Print the arguments separated and terminated by nulls.
- Again, print -rNC1 -- "$list[@]" is a canonical way to
+ -N Print the arguments separated and terminated by nulls.
+ Again, print -rNC1 -- "$list[@]" is a canonical way to
print an arbitrary list as null-delimited records.
-o Print the arguments sorted in ascending order.
@@ -54,29 +54,29 @@ print [ -abcDilmnNoOpPrsSz ] [ -u n ] [ -f format ] [ -C cols ]
-p Print the arguments to the input of the coprocess.
- -P Perform prompt expansion (see EXPANSION OF PROMPT SE-
+ -P Perform prompt expansion (see EXPANSION OF PROMPT SE-
QUENCES in zshmisc(1)). In combination with `-f', prompt
- escape sequences are parsed only within interpolated ar-
+ escape sequences are parsed only within interpolated ar-
guments, not within the format string.
-r Ignore the escape conventions of echo.
- -R Emulate the BSD echo command, which does not process es-
- cape sequences unless the -e flag is given. The -n flag
- suppresses the trailing newline. Only the -e and -n
- flags are recognized after -R; all other arguments and
+ -R Emulate the BSD echo command, which does not process es-
+ cape sequences unless the -e flag is given. The -n flag
+ suppresses the trailing newline. Only the -e and -n
+ flags are recognized after -R; all other arguments and
options are printed.
- -s Place the results in the history list instead of on the
- standard output. Each argument to the print command is
- treated as a single word in the history, regardless of
+ -s Place the results in the history list instead of on the
+ standard output. Each argument to the print command is
+ treated as a single word in the history, regardless of
its content.
- -S Place the results in the history list instead of on the
- standard output. In this case only a single argument is
+ -S Place the results in the history list instead of on the
+ standard output. In this case only a single argument is
allowed; it will be split into words as if it were a full
shell command line. The effect is similar to reading the
- line from a history file with the HIST_LEX_WORDS option
+ line from a history file with the HIST_LEX_WORDS option
active.
-u n Print the arguments to file descriptor n.
@@ -87,33 +87,33 @@ print [ -abcDilmnNoOpPrsSz ] [ -u n ] [ -f format ] [ -C cols ]
-x tab-stop
Expand leading tabs on each line of output in the printed
- string assuming a tab stop every tab-stop characters.
- This is appropriate for formatting code that may be in-
+ string assuming a tab stop every tab-stop characters.
+ This is appropriate for formatting code that may be in-
dented with tabs. Note that leading tabs of any argument
to print, not just the first, are expanded, even if print
- is using spaces to separate arguments (the column count
- is maintained across arguments but may be incorrect on
+ is using spaces to separate arguments (the column count
+ is maintained across arguments but may be incorrect on
output owing to previous unexpanded tabs).
- The start of the output of each print command is assumed
+ The start of the output of each print command is assumed
to be aligned with a tab stop. Widths of multibyte char-
- acters are handled if the option MULTIBYTE is in effect.
+ acters are handled if the option MULTIBYTE is in effect.
This option is ignored if other formatting options are in
- effect, namely column alignment or printf style, or if
- output is to a special location such as shell history or
+ effect, namely column alignment or printf style, or if
+ output is to a special location such as shell history or
the command line editor.
-X tab-stop
- This is similar to -x, except that all tabs in the
+ This is similar to -x, except that all tabs in the
printed string are expanded. This is appropriate if tabs
- in the arguments are being used to produce a table for-
+ in the arguments are being used to produce a table for-
mat.
- -z Push the arguments onto the editing buffer stack, sepa-
+ -z Push the arguments onto the editing buffer stack, sepa-
rated by spaces.
- If any of `-m', `-o' or `-O' are used in combination with `-f'
- and there are no arguments (after the removal process in the
+ If any of `-m', `-o' or `-O' are used in combination with `-f'
+ and there are no arguments (after the removal process in the
case of `-m') then nothing is printed.
pushln [ arg ... ]
diff --git a/Doc/help/printf b/Doc/help/printf
index e18ca3ea4..ba097a5ee 100644
--- a/Doc/help/printf
+++ b/Doc/help/printf
@@ -1,35 +1,35 @@
printf [ -v name ] format [ arg ... ]
- Print the arguments according to the format specification. For-
- matting rules are the same as used in C. The same escape se-
- quences as for echo are recognised in the format. All C conver-
+ Print the arguments according to the format specification. For-
+ matting rules are the same as used in C. The same escape se-
+ quences as for echo are recognised in the format. All C conver-
sion specifications ending in one of csdiouxXeEfgGn are handled.
- In addition to this, `%b' can be used instead of `%s' to cause
- escape sequences in the argument to be recognised and `%q' can
+ In addition to this, `%b' can be used instead of `%s' to cause
+ escape sequences in the argument to be recognised and `%q' can
be used to quote the argument in such a way that allows it to be
- reused as shell input. With the numeric format specifiers, if
- the corresponding argument starts with a quote character, the
- numeric value of the following character is used as the number
- to print; otherwise the argument is evaluated as an arithmetic
- expression. See the section `Arithmetic Evaluation' in zsh-
- misc(1) for a description of arithmetic expressions. With `%n',
- the corresponding argument is taken as an identifier which is
+ reused as shell input. With the numeric format specifiers, if
+ the corresponding argument starts with a quote character, the
+ numeric value of the following character is used as the number
+ to print; otherwise the argument is evaluated as an arithmetic
+ expression. See the section `Arithmetic Evaluation' in zsh-
+ misc(1) for a description of arithmetic expressions. With `%n',
+ the corresponding argument is taken as an identifier which is
created as an integer parameter.
Normally, conversion specifications are applied to each argument
- in order but they can explicitly specify the nth argument is to
- be used by replacing `%' by `%n$' and `*' by `*n$'. It is rec-
- ommended that you do not mix references of this explicit style
- with the normal style and the handling of such mixed styles may
+ in order but they can explicitly specify the nth argument is to
+ be used by replacing `%' by `%n$' and `*' by `*n$'. It is rec-
+ ommended that you do not mix references of this explicit style
+ with the normal style and the handling of such mixed styles may
be subject to future change.
- If arguments remain unused after formatting, the format string
+ If arguments remain unused after formatting, the format string
is reused until all arguments have been consumed. With the print
- builtin, this can be suppressed by using the -r option. If more
- arguments are required by the format than have been specified,
- the behaviour is as if zero or an empty string had been speci-
+ builtin, this can be suppressed by using the -r option. If more
+ arguments are required by the format than have been specified,
+ the behaviour is as if zero or an empty string had been speci-
fied as the argument.
The -v option causes the output to be stored as the value of the
- parameter name, instead of printed. If name is an array and the
- format string is reused when consuming arguments then one array
+ parameter name, instead of printed. If name is an array and the
+ format string is reused when consuming arguments then one array
element will be used for each use of the format string.
diff --git a/Doc/help/pushd b/Doc/help/pushd
index 7365532ae..a15718d34 100644
--- a/Doc/help/pushd
+++ b/Doc/help/pushd
@@ -4,22 +4,22 @@ pushd [ -qsLP ] {+|-}n
Change the current directory, and push the old current directory
onto the directory stack. In the first form, change the current
directory to arg. If arg is not specified, change to the second
- directory on the stack (that is, exchange the top two entries),
- or change to $HOME if the PUSHD_TO_HOME option is set or if
- there is only one entry on the stack. Otherwise, arg is inter-
- preted as it would be by cd. The meaning of old and new in the
+ directory on the stack (that is, exchange the top two entries),
+ or change to $HOME if the PUSHD_TO_HOME option is set or if
+ there is only one entry on the stack. Otherwise, arg is inter-
+ preted as it would be by cd. The meaning of old and new in the
second form is also the same as for cd.
The third form of pushd changes directory by rotating the direc-
- tory list. An argument of the form `+n' identifies a stack en-
+ tory list. An argument of the form `+n' identifies a stack en-
try by counting from the left of the list shown by the dirs com-
- mand, starting with zero. An argument of the form `-n' counts
- from the right. If the PUSHD_MINUS option is set, the meanings
+ mand, starting with zero. An argument of the form `-n' counts
+ from the right. If the PUSHD_MINUS option is set, the meanings
of `+' and `-' in this context are swapped.
- If the -q (quiet) option is specified, the hook function chpwd
- and the functions in the array $chpwd_functions are not called,
- and the new directory stack is not printed. This is useful for
+ If the -q (quiet) option is specified, the hook function chpwd
+ and the functions in the array $chpwd_functions are not called,
+ and the new directory stack is not printed. This is useful for
calls to pushd that do not change the environment seen by an in-
teractive user.
@@ -27,5 +27,5 @@ pushd [ -qsLP ] {+|-}n
PUSHD_SILENT is not set, the directory stack will be printed af-
ter a pushd is performed.
- The options -s, -L and -P have the same meanings as for the cd
+ The options -s, -L and -P have the same meanings as for the cd
builtin.
diff --git a/Doc/help/pwd b/Doc/help/pwd
index 282b4dbc5..2de3de7ee 100644
--- a/Doc/help/pwd
+++ b/Doc/help/pwd
@@ -1,5 +1,5 @@
pwd [ -rLP ]
- Print the absolute pathname of the current working directory.
+ Print the absolute pathname of the current working directory.
If the -r or the -P flag is specified, or the CHASE_LINKS option
- is set and the -L flag is not given, the printed path will not
+ is set and the -L flag is not given, the printed path will not
contain symbolic links.
diff --git a/Doc/help/read b/Doc/help/read
index ac14407ea..c293bda28 100644
--- a/Doc/help/read
+++ b/Doc/help/read
@@ -1,64 +1,64 @@
read [ -rszpqAclneE ] [ -t [ num ] ] [ -k [ num ] ] [ -d delim ]
[ -u n ] [ [name][?prompt] ] [ name ... ]
- Read one line and break it into fields using the characters in
- $IFS as separators, except as noted below. The first field is
+ Read one line and break it into fields using the characters in
+ $IFS as separators, except as noted below. The first field is
assigned to the first name, the second field to the second name,
- etc., with leftover fields assigned to the last name. If name
+ etc., with leftover fields assigned to the last name. If name
is omitted then REPLY is used for scalars and reply for arrays.
- -r Raw mode: a `\' at the end of a line does not signify
+ -r Raw mode: a `\' at the end of a line does not signify
line continuation and backslashes in the line don't quote
the following character and are not removed.
-s Don't echo back characters if reading from the terminal.
-q Read only one character from the terminal and set name to
- `y' if this character was `y' or `Y' and to `n' other-
- wise. With this flag set the return status is zero only
+ `y' if this character was `y' or `Y' and to `n' other-
+ wise. With this flag set the return status is zero only
if the character was `y' or `Y'. This option may be used
- with a timeout (see -t); if the read times out, or en-
- counters end of file, status 2 is returned. Input is
+ with a timeout (see -t); if the read times out, or en-
+ counters end of file, status 2 is returned. Input is
read from the terminal unless one of -u or -p is present.
This option may also be used within zle widgets.
-k [ num ]
- Read only one (or num) characters. All are assigned to
+ Read only one (or num) characters. All are assigned to
the first name, without word splitting. This flag is ig-
- nored when -q is present. Input is read from the termi-
- nal unless one of -u or -p is present. This option may
+ nored when -q is present. Input is read from the termi-
+ nal unless one of -u or -p is present. This option may
also be used within zle widgets.
- Note that despite the mnemonic `key' this option does
+ Note that despite the mnemonic `key' this option does
read full characters, which may consist of multiple bytes
if the option MULTIBYTE is set.
-z Read one entry from the editor buffer stack and assign it
- to the first name, without word splitting. Text is
- pushed onto the stack with `print -z' or with push-line
- from the line editor (see zshzle(1)). This flag is ig-
+ to the first name, without word splitting. Text is
+ pushed onto the stack with `print -z' or with push-line
+ from the line editor (see zshzle(1)). This flag is ig-
nored when the -k or -q flags are present.
-e
- -E The input read is printed (echoed) to the standard out-
+ -E The input read is printed (echoed) to the standard out-
put. If the -e flag is used, no input is assigned to the
parameters.
- -A The first name is taken as the name of an array and all
+ -A The first name is taken as the name of an array and all
words are assigned to it.
-c
- -l These flags are allowed only if called inside a function
- used for completion (specified with the -K flag to com-
+ -l These flags are allowed only if called inside a function
+ used for completion (specified with the -K flag to com-
pctl). If the -c flag is given, the words of the current
command are read. If the -l flag is given, the whole line
- is assigned as a scalar. If both flags are present, -l
+ is assigned as a scalar. If both flags are present, -l
is used and -c is ignored.
-n Together with -c, the number of the word the cursor is on
- is read. With -l, the index of the character the cursor
+ is read. With -l, the index of the character the cursor
is on is read. Note that the command name is word number
- 1, not word 0, and that when the cursor is at the end of
- the line, its character index is the length of the line
+ 1, not word 0, and that when the cursor is at the end of
+ the line, its character index is the length of the line
plus one.
-u n Input is read from file descriptor n.
@@ -66,48 +66,48 @@ read [ -rszpqAclneE ] [ -t [ num ] ] [ -k [ num ] ] [ -d delim ]
-p Input is read from the coprocess.
-d delim
- Input is terminated by the first character of delim in-
+ Input is terminated by the first character of delim in-
stead of by newline.
-t [ num ]
Test if input is available before attempting to read. If
- num is present, it must begin with a digit and will be
- evaluated to give a number of seconds, which may be a
+ num is present, it must begin with a digit and will be
+ evaluated to give a number of seconds, which may be a
floating point number; in this case the read times out if
- input is not available within this time. If num is not
+ input is not available within this time. If num is not
present, it is taken to be zero, so that read returns im-
- mediately if no input is available. If no input is
+ mediately if no input is available. If no input is
available, return status 1 and do not set any variables.
This option is not available when reading from the editor
- buffer with -z, when called from within completion with
- -c or -l, with -q which clears the input queue before
- reading, or within zle where other mechanisms should be
+ buffer with -z, when called from within completion with
+ -c or -l, with -q which clears the input queue before
+ reading, or within zle where other mechanisms should be
used to test for input.
- Note that read does not attempt to alter the input pro-
- cessing mode. The default mode is canonical input, in
- which an entire line is read at a time, so usually `read
- -t' will not read anything until an entire line has been
- typed. However, when reading from the terminal with -k
- input is processed one key at a time; in this case, only
- availability of the first character is tested, so that
+ Note that read does not attempt to alter the input pro-
+ cessing mode. The default mode is canonical input, in
+ which an entire line is read at a time, so usually `read
+ -t' will not read anything until an entire line has been
+ typed. However, when reading from the terminal with -k
+ input is processed one key at a time; in this case, only
+ availability of the first character is tested, so that
e.g. `read -t -k 2' can still block on the second charac-
- ter. Use two instances of `read -t -k' if this is not
+ ter. Use two instances of `read -t -k' if this is not
what is wanted.
If the first argument contains a `?', the remainder of this word
is used as a prompt on standard error when the shell is interac-
tive.
- The value (exit status) of read is 1 when an end-of-file is en-
- countered, or when -c or -l is present and the command is not
- called from a compctl function, or as described for -q. Other-
+ The value (exit status) of read is 1 when an end-of-file is en-
+ countered, or when -c or -l is present and the command is not
+ called from a compctl function, or as described for -q. Other-
wise the value is 0.
- The behavior of some combinations of the -k, -p, -q, -u and -z
- flags is undefined. Presently -q cancels all the others, -p
- cancels -u, -k cancels -z, and otherwise -z cancels both -p and
+ The behavior of some combinations of the -k, -p, -q, -u and -z
+ flags is undefined. Presently -q cancels all the others, -p
+ cancels -u, -k cancels -z, and otherwise -z cancels both -p and
-u.
The -c or -l flags cancel any and all of -kpquz.
diff --git a/Doc/help/return b/Doc/help/return
index 61a32d48a..4f7c6abd2 100644
--- a/Doc/help/return
+++ b/Doc/help/return
@@ -1,21 +1,21 @@
return [ n ]
- Causes a shell function or `.' script to return to the invoking
+ Causes a shell function or `.' script to return to the invoking
script with the return status specified by an arithmetic expres-
sion n. For example, the following prints `42':
() { integer foo=40; return "foo + 2" }
echo $?
- If n is omitted, the return status is that of the last command
+ If n is omitted, the return status is that of the last command
executed.
- If return was executed from a trap in a TRAPNAL function, the
- effect is different for zero and non-zero return status. With
- zero status (or after an implicit return at the end of the
- trap), the shell will return to whatever it was previously pro-
+ If return was executed from a trap in a TRAPNAL function, the
+ effect is different for zero and non-zero return status. With
+ zero status (or after an implicit return at the end of the
+ trap), the shell will return to whatever it was previously pro-
cessing; with a non-zero status, the shell will behave as inter-
- rupted except that the return status of the trap is retained.
- Note that the numeric value of the signal which caused the trap
- is passed as the first argument, so the statement `return
- "128+$1"' will return the same status as if the signal had not
+ rupted except that the return status of the trap is retained.
+ Note that the numeric value of the signal which caused the trap
+ is passed as the first argument, so the statement `return
+ "128+$1"' will return the same status as if the signal had not
been trapped.
diff --git a/Doc/help/set b/Doc/help/set
index 9a0196f01..cb5637e1a 100644
--- a/Doc/help/set
+++ b/Doc/help/set
@@ -1,30 +1,30 @@
set [ {+|-}options | {+|-}o [ option_name ] ] ... [ {+|-}A [ name ] ]
[ arg ... ]
- Set the options for the shell and/or set the positional parame-
- ters, or declare and set an array. If the -s option is given,
- it causes the specified arguments to be sorted before assigning
+ Set the options for the shell and/or set the positional parame-
+ ters, or declare and set an array. If the -s option is given,
+ it causes the specified arguments to be sorted before assigning
them to the positional parameters (or to the array name if -A is
- used). With +s sort arguments in descending order. For the
- meaning of the other flags, see zshoptions(1). Flags may be
+ used). With +s sort arguments in descending order. For the
+ meaning of the other flags, see zshoptions(1). Flags may be
specified by name using the -o option. If no option name is sup-
- plied with -o, the current option states are printed: see the
- description of setopt below for more information on the format.
- With +o they are printed in a form that can be used as input to
+ plied with -o, the current option states are printed: see the
+ description of setopt below for more information on the format.
+ With +o they are printed in a form that can be used as input to
the shell.
- If the -A flag is specified, name is set to an array containing
- the given args; if no name is specified, all arrays are printed
+ If the -A flag is specified, name is set to an array containing
+ the given args; if no name is specified, all arrays are printed
together with their values.
If +A is used and name is an array, the given arguments will re-
- place the initial elements of that array; if no name is speci-
+ place the initial elements of that array; if no name is speci-
fied, all arrays are printed without their values.
- The behaviour of arguments after -A name or +A name depends on
+ The behaviour of arguments after -A name or +A name depends on
whether the option KSH_ARRAYS is set. If it is not set, all ar-
- guments following name are treated as values for the array, re-
- gardless of their form. If the option is set, normal option
- processing continues at that point; only regular arguments are
+ guments following name are treated as values for the array, re-
+ gardless of their form. If the option is set, normal option
+ processing continues at that point; only regular arguments are
treated as values for the array. This means that
set -A array -x -- foo
@@ -32,15 +32,15 @@ set [ {+|-}options | {+|-}o [ option_name ] ] ... [ {+|-}A [ name ] ]
sets array to `-x -- foo' if KSH_ARRAYS is not set, but sets the
array to foo and turns on the option `-x' if it is set.
- If the -A flag is not present, but there are arguments beyond
- the options, the positional parameters are set. If the option
- list (if any) is terminated by `--', and there are no further
+ If the -A flag is not present, but there are arguments beyond
+ the options, the positional parameters are set. If the option
+ list (if any) is terminated by `--', and there are no further
arguments, the positional parameters will be unset.
If no arguments and no `--' are given, then the names and values
- of all parameters are printed on the standard output. If the
+ of all parameters are printed on the standard output. If the
only argument is `+', the names of all parameters are printed.
For historical reasons, `set -' is treated as `set +xv' and `set
- - args' as `set +xv -- args' when in any other emulation mode
+ - args' as `set +xv -- args' when in any other emulation mode
than zsh's native mode.
diff --git a/Doc/help/setopt b/Doc/help/setopt
index 4478a1ed2..37eec1db4 100644
--- a/Doc/help/setopt
+++ b/Doc/help/setopt
@@ -1,27 +1,27 @@
setopt [ {+|-}options | {+|-}o option_name ] [ -m ] [ name ... ]
- Set the options for the shell. All options specified either
+ Set the options for the shell. All options specified either
with flags or by name are set.
If no arguments are supplied, the names of all options currently
- set are printed. The form is chosen so as to minimize the dif-
+ set are printed. The form is chosen so as to minimize the dif-
ferences from the default options for the current emulation (the
- default emulation being native zsh, shown as <Z> in zshop-
+ default emulation being native zsh, shown as <Z> in zshop-
tions(1)). Options that are on by default for the emulation are
- shown with the prefix no only if they are off, while other op-
- tions are shown without the prefix no and only if they are on.
- In addition to options changed from the default state by the
- user, any options activated automatically by the shell (for ex-
- ample, SHIN_STDIN or INTERACTIVE) will be shown in the list.
- The format is further modified by the option KSH_OPTION_PRINT,
- however the rationale for choosing options with or without the
+ shown with the prefix no only if they are off, while other op-
+ tions are shown without the prefix no and only if they are on.
+ In addition to options changed from the default state by the
+ user, any options activated automatically by the shell (for ex-
+ ample, SHIN_STDIN or INTERACTIVE) will be shown in the list.
+ The format is further modified by the option KSH_OPTION_PRINT,
+ however the rationale for choosing options with or without the
no prefix remains the same in this case.
- If the -m flag is given the arguments are taken as patterns
- (which should be quoted to protect them from filename expan-
- sion), and all options with names matching these patterns are
+ If the -m flag is given the arguments are taken as patterns
+ (which should be quoted to protect them from filename expan-
+ sion), and all options with names matching these patterns are
set.
- Note that a bad option name does not cause execution of subse-
- quent shell code to be aborted; this is behaviour is different
- from that of `set -o'. This is because set is regarded as a
+ Note that a bad option name does not cause execution of subse-
+ quent shell code to be aborted; this is behaviour is different
+ from that of `set -o'. This is because set is regarded as a
special builtin by the POSIX standard, but setopt is not.
diff --git a/Doc/help/shift b/Doc/help/shift
index 3bb236707..bb46a8f1f 100644
--- a/Doc/help/shift
+++ b/Doc/help/shift
@@ -1,6 +1,6 @@
shift [ -p ] [ n ] [ name ... ]
- The positional parameters ${n+1} ... are renamed to $1 ...,
- where n is an arithmetic expression that defaults to 1. If any
+ The positional parameters ${n+1} ... are renamed to $1 ...,
+ where n is an arithmetic expression that defaults to 1. If any
names are given then the arrays with these names are shifted in-
stead of the positional parameters.
diff --git a/Doc/help/source b/Doc/help/source
index b321b1c65..5b622a7ec 100644
--- a/Doc/help/source
+++ b/Doc/help/source
@@ -1,4 +1,4 @@
source file [ arg ... ]
- Same as `.', except that the current directory is always
- searched and is always searched first, before directories in
+ Same as `.', except that the current directory is always
+ searched and is always searched first, before directories in
$path.
diff --git a/Doc/help/suspend b/Doc/help/suspend
index f247380c4..82cacb14c 100644
--- a/Doc/help/suspend
+++ b/Doc/help/suspend
@@ -1,4 +1,4 @@
suspend [ -f ]
- Suspend the execution of the shell (send it a SIGTSTP) until it
- receives a SIGCONT. Unless the -f option is given, this will
+ Suspend the execution of the shell (send it a SIGTSTP) until it
+ receives a SIGCONT. Unless the -f option is given, this will
refuse to suspend a login shell.
diff --git a/Doc/help/test b/Doc/help/test
index 4b8d48e78..9abe33fd4 100644
--- a/Doc/help/test
+++ b/Doc/help/test
@@ -1,20 +1,20 @@
test [ arg ... ]
[ [ arg ... ] ]
- Like the system version of test. Added for compatibility; use
- conditional expressions instead (see the section `Conditional
+ Like the system version of test. Added for compatibility; use
+ conditional expressions instead (see the section `Conditional
Expressions'). The main differences between the conditional ex-
pression syntax and the test and [ builtins are: these commands
- are not handled syntactically, so for example an empty variable
- expansion may cause an argument to be omitted; syntax errors
- cause status 2 to be returned instead of a shell error; and
+ are not handled syntactically, so for example an empty variable
+ expansion may cause an argument to be omitted; syntax errors
+ cause status 2 to be returned instead of a shell error; and
arithmetic operators expect integer arguments rather than arith-
metic expressions.
The command attempts to implement POSIX and its extensions where
these are specified. Unfortunately there are intrinsic ambigui-
- ties in the syntax; in particular there is no distinction be-
- tween test operators and strings that resemble them. The stan-
- dard attempts to resolve these for small numbers of arguments
+ ties in the syntax; in particular there is no distinction be-
+ tween test operators and strings that resemble them. The stan-
+ dard attempts to resolve these for small numbers of arguments
(up to four); for five or more arguments compatibility cannot be
- relied on. Users are urged wherever possible to use the `[['
+ relied on. Users are urged wherever possible to use the `[['
test syntax which does not have these ambiguities.
diff --git a/Doc/help/times b/Doc/help/times
index 3126d95cf..0c08c120a 100644
--- a/Doc/help/times
+++ b/Doc/help/times
@@ -1,2 +1,2 @@
-times Print the accumulated user and system times for the shell and
+times Print the accumulated user and system times for the shell and
for processes run from the shell.
diff --git a/Doc/help/trap b/Doc/help/trap
index e8de30f4a..f83cde2f6 100644
--- a/Doc/help/trap
+++ b/Doc/help/trap
@@ -1,18 +1,18 @@
trap [ arg ] [ sig ... ]
- arg is a series of commands (usually quoted to protect it from
- immediate evaluation by the shell) to be read and executed when
- the shell receives any of the signals specified by one or more
- sig args. Each sig can be given as a number, or as the name of
+ arg is a series of commands (usually quoted to protect it from
+ immediate evaluation by the shell) to be read and executed when
+ the shell receives any of the signals specified by one or more
+ sig args. Each sig can be given as a number, or as the name of
a signal either with or without the string SIG in front (e.g. 1,
HUP, and SIGHUP are all the same signal).
If arg is `-', then the specified signals are reset to their de-
faults, or, if no sig args are present, all traps are reset.
- If arg is an empty string, then the specified signals are ig-
+ If arg is an empty string, then the specified signals are ig-
nored by the shell (and by the commands it invokes).
- If arg is omitted but one or more sig args are provided (i.e.
+ If arg is omitted but one or more sig args are provided (i.e.
the first argument is a valid signal number or name), the effect
is the same as if arg had been specified as `-'.
@@ -24,49 +24,49 @@ trap [ arg ] [ sig ... ]
have no SIGERR signal (this is the usual case).
If sig is DEBUG then arg will be executed before each command if
- the option DEBUG_BEFORE_CMD is set (as it is by default), else
+ the option DEBUG_BEFORE_CMD is set (as it is by default), else
after each command. Here, a `command' is what is described as a
- `sublist' in the shell grammar, see the section SIMPLE COMMANDS
- & PIPELINES in zshmisc(1). If DEBUG_BEFORE_CMD is set various
- additional features are available. First, it is possible to
- skip the next command by setting the option ERR_EXIT; see the
- description of the ERR_EXIT option in zshoptions(1). Also, the
+ `sublist' in the shell grammar, see the section SIMPLE COMMANDS
+ & PIPELINES in zshmisc(1). If DEBUG_BEFORE_CMD is set various
+ additional features are available. First, it is possible to
+ skip the next command by setting the option ERR_EXIT; see the
+ description of the ERR_EXIT option in zshoptions(1). Also, the
shell parameter ZSH_DEBUG_CMD is set to the string corresponding
- to the command to be executed following the trap. Note that
- this string is reconstructed from the internal format and may
+ to the command to be executed following the trap. Note that
+ this string is reconstructed from the internal format and may
not be formatted the same way as the original text. The parame-
ter is unset after the trap is executed.
- If sig is 0 or EXIT and the trap statement is executed inside
- the body of a function, then the command arg is executed after
- the function completes. The value of $? at the start of execu-
+ If sig is 0 or EXIT and the trap statement is executed inside
+ the body of a function, then the command arg is executed after
+ the function completes. The value of $? at the start of execu-
tion is the exit status of the shell or the return status of the
function exiting. If sig is 0 or EXIT and the trap statement is
not executed inside the body of a function, then the command arg
- is executed when the shell terminates; the trap runs before any
+ is executed when the shell terminates; the trap runs before any
zshexit hook functions.
ZERR, DEBUG, and EXIT traps are not executed inside other traps.
- ZERR and DEBUG traps are kept within subshells, while other
+ ZERR and DEBUG traps are kept within subshells, while other
traps are reset.
- Note that traps defined with the trap builtin are slightly dif-
+ Note that traps defined with the trap builtin are slightly dif-
ferent from those defined as `TRAPNAL () { ... }', as the latter
- have their own function environment (line numbers, local vari-
+ have their own function environment (line numbers, local vari-
ables, etc.) while the former use the environment of the command
in which they were called. For example,
trap 'print $LINENO' DEBUG
- will print the line number of a command executed after it has
+ will print the line number of a command executed after it has
run, while
TRAPDEBUG() { print $LINENO; }
will always print the number zero.
- Alternative signal names are allowed as described under kill
- above. Defining a trap under either name causes any trap under
- an alternative name to be removed. However, it is recommended
- that for consistency users stick exclusively to one name or an-
+ Alternative signal names are allowed as described under kill
+ above. Defining a trap under either name causes any trap under
+ an alternative name to be removed. However, it is recommended
+ that for consistency users stick exclusively to one name or an-
other.
diff --git a/Doc/help/ttyctl b/Doc/help/ttyctl
index 937fdf913..bcccb3453 100644
--- a/Doc/help/ttyctl
+++ b/Doc/help/ttyctl
@@ -1,22 +1,22 @@
ttyctl [ -fu ]
- The -f option freezes the tty (i.e. terminal or terminal emula-
- tor), and -u unfreezes it. When the tty is frozen, no changes
+ The -f option freezes the tty (i.e. terminal or terminal emula-
+ tor), and -u unfreezes it. When the tty is frozen, no changes
made to the tty settings by external programs will be honored by
- the shell, except for changes in the size of the screen; the
+ the shell, except for changes in the size of the screen; the
shell will simply reset the settings to their previous values as
soon as each command exits or is suspended. Thus, stty and sim-
- ilar programs have no effect when the tty is frozen. Freezing
- the tty does not cause the current state to be remembered: in-
+ ilar programs have no effect when the tty is frozen. Freezing
+ the tty does not cause the current state to be remembered: in-
stead, it causes future changes to the state to be blocked.
- Without options it reports whether the terminal is frozen or
+ Without options it reports whether the terminal is frozen or
not.
- Note that, regardless of whether the tty is frozen or not, the
- shell needs to change the settings when the line editor starts,
- so unfreezing the tty does not guarantee settings made on the
- command line are preserved. Strings of commands run between
- editing the command line will see a consistent tty state. See
+ Note that, regardless of whether the tty is frozen or not, the
+ shell needs to change the settings when the line editor starts,
+ so unfreezing the tty does not guarantee settings made on the
+ command line are preserved. Strings of commands run between
+ editing the command line will see a consistent tty state. See
also the shell variable STTY for a means of initialising the tty
- before running external commands and/or freezing the tty around
+ before running external commands and/or freezing the tty around
a single command.
diff --git a/Doc/help/typeset b/Doc/help/typeset
index 852b39153..9d5253e6e 100644
--- a/Doc/help/typeset
+++ b/Doc/help/typeset
@@ -5,48 +5,48 @@ typeset -T [ {+|-}Uglrux ] [ {+|-}LRZp [ n ] ]
typeset -f [ {+|-}TUkmtuz ] [ + ] [ name ... ]
Set or display attributes and values for shell parameters.
- Except as noted below for control flags that change the behav-
- ior, a parameter is created for each name that does not already
- refer to one. When inside a function, a new parameter is cre-
- ated for every name (even those that already exist), and is un-
- set again when the function completes. See `Local Parameters'
- in zshparam(1). The same rules apply to special shell parame-
+ Except as noted below for control flags that change the behav-
+ ior, a parameter is created for each name that does not already
+ refer to one. When inside a function, a new parameter is cre-
+ ated for every name (even those that already exist), and is un-
+ set again when the function completes. See `Local Parameters'
+ in zshparam(1). The same rules apply to special shell parame-
ters, which retain their special attributes when made local.
- For each name=value assignment, the parameter name is set to
- value. If the assignment is omitted and name does not refer to
- an existing parameter, a new parameter is intialized to empty
- string, zero, or empty array (as appropriate), unless the shell
- option TYPESET_TO_UNSET is set. When that option is set, the
- parameter attributes are recorded but the parameter remains un-
+ For each name=value assignment, the parameter name is set to
+ value. If the assignment is omitted and name does not refer to
+ an existing parameter, a new parameter is intialized to empty
+ string, zero, or empty array (as appropriate), unless the shell
+ option TYPESET_TO_UNSET is set. When that option is set, the
+ parameter attributes are recorded but the parameter remains un-
set.
- If the shell option TYPESET_SILENT is not set, for each remain-
- ing name that refers to a parameter that is already set, the
- name and value of the parameter are printed in the form of an
+ If the shell option TYPESET_SILENT is not set, for each remain-
+ ing name that refers to a parameter that is already set, the
+ name and value of the parameter are printed in the form of an
assignment. Nothing is printed for newly-created parameters, or
- when any attribute flags listed below are given along with the
- name. Using `+' instead of minus to introduce an attribute
+ when any attribute flags listed below are given along with the
+ name. Using `+' instead of minus to introduce an attribute
turns it off.
- If no name is present, the names and values of all parameters
+ If no name is present, the names and values of all parameters
are printed. In this case the attribute flags restrict the dis-
- play to only those parameters that have the specified at-
- tributes, and using `+' rather than `-' to introduce the flag
+ play to only those parameters that have the specified at-
+ tributes, and using `+' rather than `-' to introduce the flag
suppresses printing of the values of parameters when there is no
parameter name.
- All forms of the command handle scalar assignment. Array as-
- signment is possible if any of the reserved words declare, ex-
+ All forms of the command handle scalar assignment. Array as-
+ signment is possible if any of the reserved words declare, ex-
port, float, integer, local, readonly or typeset is matched when
the line is parsed (N.B. not when it is executed). In this case
- the arguments are parsed as assignments, except that the `+='
- syntax and the GLOB_ASSIGN option are not supported, and scalar
- values after = are not split further into words, even if ex-
- panded (regardless of the setting of the KSH_TYPESET option;
+ the arguments are parsed as assignments, except that the `+='
+ syntax and the GLOB_ASSIGN option are not supported, and scalar
+ values after = are not split further into words, even if ex-
+ panded (regardless of the setting of the KSH_TYPESET option;
this option is obsolete).
- Examples of the differences between command and reserved word
+ Examples of the differences between command and reserved word
parsing:
# Reserved word parsing
@@ -64,48 +64,48 @@ typeset -f [ {+|-}TUkmtuz ] [ + ] [ name ... ]
builtin typeset svar=$(echo two words)
The builtin keyword causes the above to use the standard builtin
- interface to typeset in which argument parsing is performed in
- the same way as for other commands. This example creates a
- scalar svar containing the value two and another scalar parame-
- ter words with no value. An array value in this case would ei-
- ther cause an error or be treated as an obscure set of glob
+ interface to typeset in which argument parsing is performed in
+ the same way as for other commands. This example creates a
+ scalar svar containing the value two and another scalar parame-
+ ter words with no value. An array value in this case would ei-
+ ther cause an error or be treated as an obscure set of glob
qualifiers.
Arbitrary arguments are allowed if they take the form of assign-
- ments after command line expansion; however, these only perform
+ ments after command line expansion; however, these only perform
scalar assignment:
var='svar=val'
typeset $var
- The above sets the scalar parameter svar to the value val.
- Parentheses around the value within var would not cause array
- assignment as they will be treated as ordinary characters when
+ The above sets the scalar parameter svar to the value val.
+ Parentheses around the value within var would not cause array
+ assignment as they will be treated as ordinary characters when
$var is substituted. Any non-trivial expansion in the name part
- of the assignment causes the argument to be treated in this
+ of the assignment causes the argument to be treated in this
fashion:
typeset {var1,var2,var3}=name
- The above syntax is valid, and has the expected effect of set-
- ting the three parameters to the same value, but the command
- line is parsed as a set of three normal command line arguments
- to typeset after expansion. Hence it is not possible to assign
+ The above syntax is valid, and has the expected effect of set-
+ ting the three parameters to the same value, but the command
+ line is parsed as a set of three normal command line arguments
+ to typeset after expansion. Hence it is not possible to assign
to multiple arrays by this means.
- Note that each interface to any of the commands may be disabled
- separately. For example, `disable -r typeset' disables the re-
- served word interface to typeset, exposing the builtin inter-
- face, while `disable typeset' disables the builtin. Note that
- disabling the reserved word interface for typeset may cause
- problems with the output of `typeset -p', which assumes the re-
+ Note that each interface to any of the commands may be disabled
+ separately. For example, `disable -r typeset' disables the re-
+ served word interface to typeset, exposing the builtin inter-
+ face, while `disable typeset' disables the builtin. Note that
+ disabling the reserved word interface for typeset may cause
+ problems with the output of `typeset -p', which assumes the re-
served word interface is available in order to restore array and
associative array values.
Unlike parameter assignment statements, typeset's exit status on
- an assignment that involves a command substitution does not re-
- flect the exit status of the command substitution. Therefore,
- to test for an error in a command substitution, separate the
+ an assignment that involves a command substitution does not re-
+ flect the exit status of the command substitution. Therefore,
+ to test for an error in a command substitution, separate the
declaration of the parameter from its initialization:
# WRONG
@@ -114,119 +114,119 @@ typeset -f [ {+|-}TUkmtuz ] [ + ] [ name ... ]
# RIGHT
typeset var1 && var1=$(exit 1) || echo "Trouble with var1"
- To initialize a parameter param to a command output and mark it
- readonly, use typeset -r param or readonly param after the pa-
+ To initialize a parameter param to a command output and mark it
+ readonly, use typeset -r param or readonly param after the pa-
rameter assignment statement.
- If no attribute flags are given, and either no name arguments
- are present or the flag +m is used, then each parameter name
- printed is preceded by a list of the attributes of that parame-
- ter (array, association, exported, float, integer, readonly, or
- undefined for autoloaded parameters not yet loaded). If +m is
- used with attribute flags, and all those flags are introduced
- with +, the matching parameter names are printed but their val-
+ If no attribute flags are given, and either no name arguments
+ are present or the flag +m is used, then each parameter name
+ printed is preceded by a list of the attributes of that parame-
+ ter (array, association, exported, float, integer, readonly, or
+ undefined for autoloaded parameters not yet loaded). If +m is
+ used with attribute flags, and all those flags are introduced
+ with +, the matching parameter names are printed but their val-
ues are not.
The following control flags change the behavior of typeset:
- + If `+' appears by itself in a separate word as the last
- option, then the names of all parameters (functions with
- -f) are printed, but the values (function bodies) are
- not. No name arguments may appear, and it is an error
- for any other options to follow `+'. The effect of `+'
- is as if all attribute flags which precede it were given
+ + If `+' appears by itself in a separate word as the last
+ option, then the names of all parameters (functions with
+ -f) are printed, but the values (function bodies) are
+ not. No name arguments may appear, and it is an error
+ for any other options to follow `+'. The effect of `+'
+ is as if all attribute flags which precede it were given
with a `+' prefix. For example, `typeset -U +' is equiv-
- alent to `typeset +U' and displays the names of all ar-
+ alent to `typeset +U' and displays the names of all ar-
rays having the uniqueness attribute, whereas `typeset -f
- -U +' displays the names of all autoloadable functions.
- If + is the only option, then type information (array,
- readonly, etc.) is also printed for each parameter, in
+ -U +' displays the names of all autoloadable functions.
+ If + is the only option, then type information (array,
+ readonly, etc.) is also printed for each parameter, in
the same manner as `typeset +m "*"'.
- -g The -g (global) 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,
+ -g The -g (global) 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 ef-
- fect when listing existing parameters, nor does the flag
+ unset) from an enclosing function. This flag does not
+ affect the parameter after creation, hence it has no ef-
+ fect when listing existing parameters, nor does the flag
+g have any effect except in combination with -m (see be-
low).
- -m If the -m flag is given the name arguments are taken as
- patterns (use quoting to prevent these from being inter-
- preted as file patterns). With no attribute flags, all
- parameters (or functions with the -f flag) with matching
+ -m If the -m flag is given the name arguments are taken as
+ patterns (use quoting to prevent these from being inter-
+ preted as file patterns). With no attribute flags, all
+ parameters (or functions with the -f flag) with matching
names are printed (the shell option TYPESET_SILENT is not
used in this case).
If the +g flag is combined with -m, a new local parameter
- is created for every matching parameter that is not al-
+ is created for every matching parameter that is not al-
ready local. Otherwise -m applies all other flags or as-
signments to the existing parameters.
- Except when assignments are made with name=value, using
+ Except when assignments are made with name=value, using
+m forces the matching parameters and their attributes to
- be printed, even inside a function. Note that -m is ig-
- nored if no patterns are given, so `typeset -m' displays
+ be printed, even inside a function. Note that -m is ig-
+ nored if no patterns are given, so `typeset -m' displays
attributes but `typeset -a +m' does not.
-p [ n ]
- If the -p option is given, parameters and values are
- printed in the form of a typeset command with an assign-
- ment, regardless of other flags and options. Note that
- the -H flag on parameters is respected; no value will be
+ If the -p option is given, parameters and values are
+ printed in the form of a typeset command with an assign-
+ ment, regardless of other flags and options. Note that
+ the -H flag on parameters is respected; no value will be
shown for these parameters.
-p may be followed by an optional integer argument. Cur-
- rently only the value 1 is supported. In this case ar-
+ rently only the value 1 is supported. In this case ar-
rays and associative arrays are printed with newlines be-
tween indented elements for readability.
-T [ scalar[=value] array[=(value ...)] [ sep ] ]
- This flag has a different meaning when used with -f; see
- below. Otherwise the -T option requires zero, two, or
- three arguments to be present. With no arguments, the
- list of parameters created in this fashion is shown.
- With two or three arguments, the first two are the name
- of a scalar and of an array parameter (in that order)
- that will be tied together in the manner of $PATH and
+ This flag has a different meaning when used with -f; see
+ below. Otherwise the -T option requires zero, two, or
+ three arguments to be present. With no arguments, the
+ list of parameters created in this fashion is shown.
+ With two or three arguments, the first two are the name
+ of a scalar and of an array parameter (in that order)
+ that will be tied together in the manner of $PATH and
$path. The optional third argument is a single-character
- separator which will be used to join the elements of the
- array to form the scalar; if absent, a colon is used, as
+ separator which will be used to join the elements of the
+ array to form the scalar; if absent, a colon is used, as
with $PATH. Only the first character of the separator is
- significant; any remaining characters are ignored.
+ significant; any remaining characters are ignored.
Multibyte characters are not yet supported.
- Only one of the scalar and array parameters may be as-
- signed an initial value (the restrictions on assignment
+ Only one of the scalar and array parameters may be as-
+ signed an initial value (the restrictions on assignment
forms described above also apply).
- Both the scalar and the array may be manipulated as nor-
- mal. If one is unset, the other will automatically be
- unset too. There is no way of untying the variables
+ Both the scalar and the array may be manipulated as nor-
+ mal. If one is unset, the other will automatically be
+ unset too. There is no way of untying the variables
without unsetting them, nor of converting the type of one
- of them with another typeset command; +T does not work,
+ of them with another typeset command; +T does not work,
assigning an array to scalar is an error, and assigning a
scalar to array sets it to be a single-element array.
- Note that both `typeset -xT ...' and `export -T ...'
- work, but only the scalar will be marked for export.
+ Note that both `typeset -xT ...' and `export -T ...'
+ work, but only the scalar will be marked for export.
Setting the value using the scalar version causes a split
on all separators (which cannot be quoted). It is possi-
ble to apply -T to two previously tied variables but with
- a different separator character, in which case the vari-
- ables remain joined as before but the separator is
+ a different separator character, in which case the vari-
+ ables remain joined as before but the separator is
changed.
When an existing scalar is tied to a new array, the value
- of the scalar is preserved but no attribute other than
+ of the scalar is preserved but no attribute other than
export will be preserved.
- Attribute flags that transform the final value (-L, -R, -Z, -l,
+ Attribute flags that transform the final value (-L, -R, -Z, -l,
-u) are only applied to the expanded value at the point of a pa-
- rameter expansion expression using `$'. They are not applied
- when a parameter is retrieved internally by the shell for any
+ rameter expansion expression using `$'. They are not applied
+ when a parameter is retrieved internally by the shell for any
purpose.
The following attribute flags may be specified:
@@ -235,164 +235,164 @@ typeset -f [ {+|-}TUkmtuz ] [ + ] [ name ... ]
ray Parameters' in zshparam(1).
-L [ n ]
- Left justify and remove leading blanks from the value
- when the parameter is expanded. If n is nonzero, it de-
+ Left justify and remove leading blanks from the value
+ when the parameter is expanded. If n is nonzero, it de-
fines the width of the field. If n is zero, the width is
determined by the width of the value of the first assign-
- ment. In the case of numeric parameters, the length of
- the complete value assigned to the parameter is used to
+ ment. In the case of numeric parameters, the length of
+ the complete value assigned to the parameter is used to
determine the width, not the value that would be output.
The width is the count of characters, which may be multi-
- byte characters if the MULTIBYTE option is in effect.
- Note that the screen width of the character is not taken
- into account; if this is required, use padding with pa-
- rameter expansion flags ${(ml...)...} as described in
+ byte characters if the MULTIBYTE option is in effect.
+ Note that the screen width of the character is not taken
+ into account; if this is required, use padding with pa-
+ rameter expansion flags ${(ml...)...} as described in
`Parameter Expansion Flags' in zshexpn(1).
When the parameter is expanded, it is filled on the right
- with blanks or truncated if necessary to fit the field.
- Note truncation can lead to unexpected results with nu-
- meric parameters. Leading zeros are removed if the -Z
+ with blanks or truncated if necessary to fit the field.
+ Note truncation can lead to unexpected results with nu-
+ meric parameters. Leading zeros are removed if the -Z
flag is also set.
-R [ n ]
- Similar to -L, except that right justification is used;
- when the parameter is expanded, the field is left filled
- with blanks or truncated from the end. May not be com-
+ Similar to -L, except that right justification is used;
+ when the parameter is expanded, the field is left filled
+ with blanks or truncated from the end. May not be com-
bined with the -Z flag.
- -U For arrays (but not for associative arrays), keep only
- the first occurrence of each duplicated value. This may
- also be set for tied parameters (see -T) or colon-sepa-
+ -U For arrays (but not for associative arrays), keep only
+ the first occurrence of each duplicated value. This may
+ also be set for tied parameters (see -T) or colon-sepa-
rated special parameters like PATH or FIGNORE, etc. Note
- the flag takes effect on assignment, and the type of the
- variable being assigned to is determinative; for vari-
- ables with shared values it is therefore recommended to
- set the flag for all interfaces, e.g. `typeset -U PATH
+ the flag takes effect on assignment, and the type of the
+ variable being assigned to is determinative; for vari-
+ ables with shared values it is therefore recommended to
+ set the flag for all interfaces, e.g. `typeset -U PATH
path'.
- This flag has a different meaning when used with -f; see
+ This flag has a different meaning when used with -f; see
below.
-Z [ n ]
- Specially handled if set along with the -L flag. Other-
- wise, similar to -R, except that leading zeros are used
- for padding instead of blanks if the first non-blank
- character is a digit. Numeric parameters are specially
- handled: they are always eligible for padding with ze-
+ Specially handled if set along with the -L flag. Other-
+ wise, similar to -R, except that leading zeros are used
+ for padding instead of blanks if the first non-blank
+ character is a digit. Numeric parameters are specially
+ handled: they are always eligible for padding with ze-
roes, and the zeroes are inserted at an appropriate place
in the output.
- -a The names refer to array parameters. An array parameter
+ -a The names refer to array parameters. An array parameter
may be created this way, but it may be assigned to in the
typeset statement only if the reserved word form of type-
- set is enabled (as it is by default). When displaying,
+ set is enabled (as it is by default). When displaying,
both normal and associative arrays are shown.
- -f The names refer to functions rather than parameters. No
- assignments can be made, and the only other valid flags
+ -f The names refer to functions rather than parameters. No
+ assignments can be made, and the only other valid flags
are -t, -T, -k, -u, -U and -z. The flag -t turns on exe-
- cution tracing for this function; the flag -T does the
+ cution tracing for this function; the flag -T does the
same, but turns off tracing for any named (not anonymous)
- function called from the present one, unless that func-
- tion also has the -t or -T flag. The -u and -U flags
- cause the function to be marked for autoloading; -U also
+ function called from the present one, unless that func-
+ tion also has the -t or -T flag. The -u and -U flags
+ cause the function to be marked for autoloading; -U also
causes alias expansion to be suppressed when the function
is loaded. See the description of the `autoload' builtin
for details.
- Note that the builtin functions provides the same basic
- capabilities as typeset -f but gives access to a few ex-
- tra options; autoload gives further additional options
+ Note that the builtin functions provides the same basic
+ capabilities as typeset -f but gives access to a few ex-
+ tra options; autoload gives further additional options
for the case typeset -fu and typeset -fU.
- -h Hide: only useful for special parameters (those marked
+ -h Hide: only useful for special parameters (those marked
`<S>' in the table in zshparam(1)), and for local parame-
- ters with the same name as a special parameter, though
- harmless for others. A special parameter with this at-
- tribute will not retain its special effect when made lo-
+ ters with the same name as a special parameter, though
+ harmless for others. A special parameter with this at-
+ tribute will not retain its special effect when made lo-
cal. Thus after `typeset -h PATH', a function containing
- `typeset PATH' will create an ordinary local parameter
- without the usual behaviour of PATH. Alternatively, the
+ `typeset PATH' will create an ordinary local parameter
+ without the usual behaviour of PATH. Alternatively, the
local parameter may itself be given this attribute; hence
- inside a function `typeset -h PATH' creates an ordinary
+ inside a function `typeset -h PATH' creates an ordinary
local parameter and the special PATH parameter is not al-
- tered in any way. It is also possible to create a local
- parameter using `typeset +h special', where the local
- copy of special will retain its special properties re-
- gardless of having the -h attribute. Global special pa-
- rameters loaded from shell modules (currently those in
- zsh/mapfile and zsh/parameter) are automatically given
+ tered in any way. It is also possible to create a local
+ parameter using `typeset +h special', where the local
+ copy of special will retain its special properties re-
+ gardless of having the -h attribute. Global special pa-
+ rameters loaded from shell modules (currently those in
+ zsh/mapfile and zsh/parameter) are automatically given
the -h attribute to avoid name clashes.
- -H Hide value: specifies that typeset will not display the
- value of the parameter when listing parameters; the dis-
+ -H Hide value: specifies that typeset will not display the
+ value of the parameter when listing parameters; the dis-
play for such parameters is always as if the `+' flag had
- been given. Use of the parameter is in other respects
+ been given. Use of the parameter is in other respects
normal, and the option does not apply if the parameter is
- specified by name, or by pattern with the -m option.
- This is on by default for the parameters in the zsh/pa-
+ specified by name, or by pattern with the -m option.
+ This is on by default for the parameters in the zsh/pa-
rameter and zsh/mapfile modules. Note, however, that un-
- like the -h flag this is also useful for non-special pa-
+ like the -h flag this is also useful for non-special pa-
rameters.
-i [ n ]
- Use an internal integer representation. If n is nonzero
- it defines the output arithmetic base, otherwise it is
- determined by the first assignment. Bases from 2 to 36
+ Use an internal integer representation. If n is nonzero
+ it defines the output arithmetic base, otherwise it is
+ determined by the first assignment. Bases from 2 to 36
inclusive are allowed.
-E [ n ]
Use an internal double-precision floating point represen-
tation. On output the variable will be converted to sci-
- entific notation. If n is nonzero it defines the number
+ entific notation. If n is nonzero it defines the number
of significant figures to display; the default is ten.
-F [ n ]
Use an internal double-precision floating point represen-
- tation. On output the variable will be converted to
+ tation. On output the variable will be converted to
fixed-point decimal notation. If n is nonzero it defines
- the number of digits to display after the decimal point;
+ the number of digits to display after the decimal point;
the default is ten.
- -l Convert the result to lower case whenever the parameter
+ -l Convert the result to lower case whenever the parameter
is expanded. The value is not converted when assigned.
- -r The given names are marked readonly. Note that if name
- is a special parameter, the readonly attribute can be
+ -r The given names are marked readonly. Note that if name
+ is a special parameter, the readonly attribute can be
turned on, but cannot then be turned off.
- If the POSIX_BUILTINS option is set, the readonly attri-
- bute is more restrictive: unset variables can be marked
- readonly and cannot then be set; furthermore, the read-
+ If the POSIX_BUILTINS option is set, the readonly attri-
+ bute is more restrictive: unset variables can be marked
+ readonly and cannot then be set; furthermore, the read-
only attribute cannot be removed from any variable.
- It is still possible to change other attributes of the
+ It is still possible to change other attributes of the
variable though, some of which like -U or -Z would affect
- the value. More generally, the readonly attribute should
+ the value. More generally, the readonly attribute should
not be relied on as a security mechanism.
- Note that in zsh (like in pdksh but unlike most other
- shells) it is still possible to create a local variable
- of the same name as this is considered a different vari-
+ Note that in zsh (like in pdksh but unlike most other
+ shells) it is still possible to create a local variable
+ of the same name as this is considered a different vari-
able (though this variable, too, can be marked readonly).
- Special variables that have been made readonly retain
+ Special variables that have been made readonly retain
their value and readonly attribute when made local.
- -t Tags the named parameters. Tags have no special meaning
- to the shell. This flag has a different meaning when
+ -t Tags the named parameters. Tags have no special meaning
+ to the shell. This flag has a different meaning when
used with -f; see above.
- -u Convert the result to upper case whenever the parameter
- is expanded. The value is not converted when assigned.
- This flag has a different meaning when used with -f; see
+ -u Convert the result to upper case whenever the parameter
+ is expanded. The value is not converted when assigned.
+ This flag has a different meaning when used with -f; see
above.
- -x Mark for automatic export to the environment of subse-
- quently executed commands. If the option GLOBAL_EXPORT
+ -x Mark for automatic export to the environment of subse-
+ quently executed commands. If the option GLOBAL_EXPORT
is set, this implies the option -g, unless +g is also ex-
- plicitly given; in other words the parameter is not made
+ plicitly given; in other words the parameter is not made
local to the enclosing function. This is for compatibil-
ity with previous versions of zsh.
@@ -404,12 +404,12 @@ float [ {+|-}Hghlprtux ] [ {+|-}EFLRZ [ n ] ] [ name[=value] ... ]
floating point numbers are not permitted.
integer [ {+|-}Hghlprtux ] [ {+|-}LRZi [ n ] ] [ name[=value] ... ]
- Equivalent to typeset -i, except that options irrelevant to in-
+ Equivalent to typeset -i, except that options irrelevant to in-
tegers are not permitted.
local [ {+|-}AHUahlprtux ] [ {+|-}EFLRZi [ n ] ] [ name[=value] ... ]
Same as typeset, except that the options -g, and -f are not per-
- mitted. In this case the -x option does not force the use of
+ mitted. In this case the -x option does not force the use of
-g, i.e. exported variables will be local to functions.
readonly
diff --git a/Doc/help/ulimit b/Doc/help/ulimit
index 0463ca046..8f2f63552 100644
--- a/Doc/help/ulimit
+++ b/Doc/help/ulimit
@@ -1,26 +1,26 @@
ulimit [ -HSa ] [ { -bcdfiklmnpqrsTtvwx | -N resource } [ limit ] ... ]
- Set or display resource limits of the shell and the processes
+ Set or display resource limits of the shell and the processes
started by the shell. The value of limit can be a number in the
unit specified below or one of the values `unlimited', which re-
- moves the limit on the resource, or `hard', which uses the cur-
+ moves the limit on the resource, or `hard', which uses the cur-
rent value of the hard limit on the resource.
- By default, only soft limits are manipulated. If the -H flag is
+ By default, only soft limits are manipulated. If the -H flag is
given use hard limits instead of soft limits. If the -S flag is
given together with the -H flag set both hard and soft limits.
If no options are used, the file size limit (-f) is assumed.
If limit is omitted the current value of the specified resources
- are printed. When more than one resource value is printed, the
+ are printed. When more than one resource value is printed, the
limit name and unit is printed before each value.
When looping over multiple resources, the shell will abort imme-
- diately if it detects a badly formed argument. However, if it
+ diately if it detects a badly formed argument. However, if it
fails to set a limit for some other reason it will continue try-
ing to set the remaining limits.
- Not all the following resources are supported on all systems.
+ Not all the following resources are supported on all systems.
Running ulimit -a will show which are supported.
-a Lists all of the current resource limits.
@@ -35,8 +35,8 @@ ulimit [ -HSa ] [ { -bcdfiklmnpqrsTtvwx | -N resource } [ limit ] ... ]
-n open file descriptors.
-p The number of pseudo-terminals.
-q Bytes in POSIX message queues.
- -r Maximum real time priority. On some systems where this
- is not available, such as NetBSD, this has the same ef-
+ -r Maximum real time priority. On some systems where this
+ is not available, such as NetBSD, this has the same ef-
fect as -T for compatibility with sh.
-s Kilobytes on the size of the stack.
-T The number of simultaneous threads available to the user.
@@ -47,13 +47,13 @@ ulimit [ -HSa ] [ { -bcdfiklmnpqrsTtvwx | -N resource } [ limit ] ... ]
-w Kilobytes on the size of swapped out memory.
-x The number of locks on files.
- A resource may also be specified by integer in the form `-N re-
- source', where resource corresponds to the integer defined for
- the resource by the operating system. This may be used to set
- the limits for resources known to the shell which do not corre-
+ A resource may also be specified by integer in the form `-N re-
+ source', where resource corresponds to the integer defined for
+ the resource by the operating system. This may be used to set
+ the limits for resources known to the shell which do not corre-
spond to option letters. Such limits will be shown by number in
the output of `ulimit -a'.
- The number may alternatively be out of the range of limits com-
- piled into the shell. The shell will try to read or write the
+ The number may alternatively be out of the range of limits com-
+ piled into the shell. The shell will try to read or write the
limit anyway, and will report an error if this fails.
diff --git a/Doc/help/umask b/Doc/help/umask
index a27f722c8..593b5dc03 100644
--- a/Doc/help/umask
+++ b/Doc/help/umask
@@ -1,8 +1,8 @@
umask [ -S ] [ mask ]
The umask is set to mask. mask can be either an octal number or
a symbolic value as described in the chmod(1) man page. If mask
- is omitted, the current value is printed. The -S option causes
+ is omitted, the current value is printed. The -S option causes
the mask to be printed as a symbolic value. Otherwise, the mask
- is printed as an octal number. Note that in the symbolic form
- the permissions you specify are those which are to be allowed
+ is printed as an octal number. Note that in the symbolic form
+ the permissions you specify are those which are to be allowed
(not denied) to the users specified.
diff --git a/Doc/help/unhash b/Doc/help/unhash
index a94c55dd4..8dd6121ac 100644
--- a/Doc/help/unhash
+++ b/Doc/help/unhash
@@ -1,21 +1,21 @@
unhash [ -adfms ] name ...
- Remove the element named name from an internal hash table. The
- default is remove elements from the command hash table. The -a
- option causes unhash to remove regular or global aliases; note
- when removing a global aliases that the argument must be quoted
- to prevent it from being expanded before being passed to the
- command. The -s option causes unhash to remove suffix aliases.
- The -f option causes unhash to remove shell functions. The -d
- options causes unhash to remove named directories. If the -m
- flag is given the arguments are taken as patterns (should be
- quoted) and all elements of the corresponding hash table with
+ Remove the element named name from an internal hash table. The
+ default is remove elements from the command hash table. The -a
+ option causes unhash to remove regular or global aliases; note
+ when removing a global aliases that the argument must be quoted
+ to prevent it from being expanded before being passed to the
+ command. The -s option causes unhash to remove suffix aliases.
+ The -f option causes unhash to remove shell functions. The -d
+ options causes unhash to remove named directories. If the -m
+ flag is given the arguments are taken as patterns (should be
+ quoted) and all elements of the corresponding hash table with
matching names will be removed.
unalias [ -ams ] name ...
- Removes aliases. This command works the same as unhash -a, ex-
- cept that the -a option removes all regular or global aliases,
- or with -s all suffix aliases: in this case no name arguments
- may appear. The options -m (remove by pattern) and -s without
+ Removes aliases. This command works the same as unhash -a, ex-
+ cept that the -a option removes all regular or global aliases,
+ or with -s all suffix aliases: in this case no name arguments
+ may appear. The options -m (remove by pattern) and -s without
-a (remove listed suffix aliases) behave as for unhash -a. Note
that the meaning of -a is different between unalias and unhash.
diff --git a/Doc/help/unlimit b/Doc/help/unlimit
index 42d64480a..8c6c4697e 100644
--- a/Doc/help/unlimit
+++ b/Doc/help/unlimit
@@ -1,10 +1,10 @@
unlimit [ -hs ] resource ...
- The resource limit for each resource is set to the hard limit.
- If the -h flag is given and the shell has appropriate privi-
- leges, the hard resource limit for each resource is removed.
- The resources of the shell process are only changed if the -s
+ The resource limit for each resource is set to the hard limit.
+ If the -h flag is given and the shell has appropriate privi-
+ leges, the hard resource limit for each resource is removed.
+ The resources of the shell process are only changed if the -s
flag is given.
- The unlimit command is not made available by default when the
- shell starts in a mode emulating another shell. It can be made
+ The unlimit command is not made available by default when the
+ shell starts in a mode emulating another shell. It can be made
available with the command `zmodload -F zsh/rlimits b:unlimit'.
diff --git a/Doc/help/unset b/Doc/help/unset
index a48687fd5..3e8183648 100644
--- a/Doc/help/unset
+++ b/Doc/help/unset
@@ -1,20 +1,20 @@
unset [ -fmv ] name ...
- Each named parameter is unset. Local parameters remain local
- even if unset; they appear unset within scope, but the previous
+ Each named parameter is unset. Local parameters remain local
+ even if unset; they appear unset within scope, but the previous
value will still reappear when the scope ends.
Individual elements of associative array parameters may be unset
- by using subscript syntax on name, which should be quoted (or
- the entire command prefixed with noglob) to protect the sub-
+ by using subscript syntax on name, which should be quoted (or
+ the entire command prefixed with noglob) to protect the sub-
script from filename generation.
- If the -m flag is specified the arguments are taken as patterns
- (should be quoted) and all parameters with matching names are
+ If the -m flag is specified the arguments are taken as patterns
+ (should be quoted) and all parameters with matching names are
unset. Note that this cannot be used when unsetting associative
- array elements, as the subscript will be treated as part of the
+ array elements, as the subscript will be treated as part of the
pattern.
- The -v flag specifies that name refers to parameters. This is
+ The -v flag specifies that name refers to parameters. This is
the default behaviour.
unset -f is equivalent to unfunction.
diff --git a/Doc/help/unsetopt b/Doc/help/unsetopt
index dd8654a2f..f9ef22d36 100644
--- a/Doc/help/unsetopt
+++ b/Doc/help/unsetopt
@@ -1,8 +1,8 @@
unsetopt [ {+|-}options | {+|-}o option_name ] [ name ... ]
- Unset the options for the shell. All options specified either
- with flags or by name are unset. If no arguments are supplied,
+ Unset the options for the shell. All options specified either
+ with flags or by name are unset. If no arguments are supplied,
the names of all options currently unset are printed. If the -m
- flag is given the arguments are taken as patterns (which should
- be quoted to preserve them from being interpreted as glob pat-
- terns), and all options with names matching these patterns are
+ flag is given the arguments are taken as patterns (which should
+ be quoted to preserve them from being interpreted as glob pat-
+ terns), and all options with names matching these patterns are
unset.
diff --git a/Doc/help/wait b/Doc/help/wait
index 876a9669f..753127278 100644
--- a/Doc/help/wait
+++ b/Doc/help/wait
@@ -1,25 +1,25 @@
wait [ job ... ]
- Wait for the specified jobs or processes. If job is not given
- then all currently active child processes are waited for. Each
+ Wait for the specified jobs or processes. If job is not given
+ then all currently active child processes are waited for. Each
job can be either a job specification or the process ID of a job
- in the job table. The exit status from this command is that of
+ in the job table. The exit status from this command is that of
the job waited for. If job represents an unknown job or process
- ID, a warning is printed (unless the POSIX_BUILTINS option is
+ ID, a warning is printed (unless the POSIX_BUILTINS option is
set) and the exit status is 127.
- It is possible to wait for recent processes (specified by
+ It is possible to wait for recent processes (specified by
process ID, not by job) that were running in the background even
- if the process has exited. Typically the process ID will be
- recorded by capturing the value of the variable $! immediately
- after the process has been started. There is a limit on the
- number of process IDs remembered by the shell; this is given by
+ if the process has exited. Typically the process ID will be
+ recorded by capturing the value of the variable $! immediately
+ after the process has been started. There is a limit on the
+ number of process IDs remembered by the shell; this is given by
the value of the system configuration parameter CHILD_MAX. When
- this limit is reached, older process IDs are discarded, least
+ this limit is reached, older process IDs are discarded, least
recently started processes first.
- Note there is no protection against the process ID wrapping,
- i.e. if the wait is not executed soon enough there is a chance
- the process waited for is the wrong one. A conflict implies
+ Note there is no protection against the process ID wrapping,
+ i.e. if the wait is not executed soon enough there is a chance
+ the process waited for is the wrong one. A conflict implies
both process IDs have been generated by the shell, as other pro-
cesses are not recorded, and that the user is potentially inter-
ested in both, so this problem is intrinsic to process IDs.
diff --git a/Doc/help/whence b/Doc/help/whence
index 5ef016295..9f39fe7d6 100644
--- a/Doc/help/whence
+++ b/Doc/help/whence
@@ -2,55 +2,55 @@ whence [ -vcwfpamsS ] [ -x num ] name ...
For each name, indicate how it would be interpreted if used as a
command name.
- If name is not an alias, built-in command, external command,
- shell function, hashed command, or a reserved word, the exit
- status shall be non-zero, and -- if -v, -c, or -w was passed --
- a message will be written to standard output. (This is differ-
- ent from other shells that write that message to standard er-
+ If name is not an alias, built-in command, external command,
+ shell function, hashed command, or a reserved word, the exit
+ status shall be non-zero, and -- if -v, -c, or -w was passed --
+ a message will be written to standard output. (This is differ-
+ ent from other shells that write that message to standard er-
ror.)
- whence is most useful when name is only the last path component
- of a command, i.e. does not include a `/'; in particular, pat-
- tern matching only succeeds if just the non-directory component
+ whence is most useful when name is only the last path component
+ of a command, i.e. does not include a `/'; in particular, pat-
+ tern matching only succeeds if just the non-directory component
of the command is passed.
-v Produce a more verbose report.
- -c Print the results in a csh-like format. This takes
+ -c Print the results in a csh-like format. This takes
precedence over -v.
- -w For each name, print `name: word' where word is one of
- alias, builtin, command, function, hashed, reserved or
- none, according as name corresponds to an alias, a
- built-in command, an external command, a shell function,
+ -w For each name, print `name: word' where word is one of
+ alias, builtin, command, function, hashed, reserved or
+ none, according as name corresponds to an alias, a
+ built-in command, an external command, a shell function,
a command defined with the hash builtin, a reserved word,
- or is not recognised. This takes precedence over -v and
+ or is not recognised. This takes precedence over -v and
-c.
- -f Causes the contents of a shell function to be displayed,
- which would otherwise not happen unless the -c flag were
+ -f Causes the contents of a shell function to be displayed,
+ which would otherwise not happen unless the -c flag were
used.
- -p Do a path search for name even if it is an alias, re-
+ -p Do a path search for name even if it is an alias, re-
served word, shell function or builtin.
- -a Do a search for all occurrences of name throughout the
- command path. Normally only the first occurrence is
+ -a Do a search for all occurrences of name throughout the
+ command path. Normally only the first occurrence is
printed.
- -m The arguments are taken as patterns (pattern characters
- should be quoted), and the information is displayed for
+ -m The arguments are taken as patterns (pattern characters
+ should be quoted), and the information is displayed for
each command matching one of these patterns.
- -s If a pathname contains symlinks, print the symlink-free
+ -s If a pathname contains symlinks, print the symlink-free
pathname as well.
- -S As -s, but if the pathname had to be resolved by follow-
- ing multiple symlinks, the intermediate steps are
+ -S As -s, but if the pathname had to be resolved by follow-
+ ing multiple symlinks, the intermediate steps are
printed, too. The symlink resolved at each step might be
anywhere in the path.
- -x num Expand tabs when outputting shell functions using the -c
+ -x num Expand tabs when outputting shell functions using the -c
option. This has the same effect as the -x option to the
functions builtin.
diff --git a/Doc/help/zcompile b/Doc/help/zcompile
index f79597e7c..e649320a2 100644
--- a/Doc/help/zcompile
+++ b/Doc/help/zcompile
@@ -1,58 +1,58 @@
zcompile [ -U ] [ -z | -k ] [ -R | -M ] file [ name ... ]
zcompile -ca [ -m ] [ -R | -M ] file [ name ... ]
zcompile -t file [ name ... ]
- This builtin command can be used to compile functions or
- scripts, storing the compiled form in a file, and to examine
- files containing the compiled form. This allows faster au-
+ This builtin command can be used to compile functions or
+ scripts, storing the compiled form in a file, and to examine
+ files containing the compiled form. This allows faster au-
toloading of functions and sourcing of scripts by avoiding pars-
ing of the text when the files are read.
The first form (without the -c, -a or -t options) creates a com-
piled file. If only the file argument is given, the output file
has the name `file.zwc' and will be placed in the same directory
- as the file. The shell will load the compiled file instead of
- the normal function file when the function is autoloaded; see
+ as the file. The shell will load the compiled file instead of
+ the normal function file when the function is autoloaded; see
the section `Autoloading Functions' in zshmisc(1) for a descrip-
- tion of how autoloaded functions are searched. The extension
+ tion of how autoloaded functions are searched. The extension
.zwc stands for `zsh word code'.
- If there is at least one name argument, all the named files are
- compiled into the output file given as the first argument. If
- file does not end in .zwc, this extension is automatically ap-
+ If there is at least one name argument, all the named files are
+ compiled into the output file given as the first argument. If
+ file does not end in .zwc, this extension is automatically ap-
pended. Files containing multiple compiled functions are called
- `digest' files, and are intended to be used as elements of the
+ `digest' files, and are intended to be used as elements of the
FPATH/fpath special array.
- The second form, with the -c or -a options, writes the compiled
- definitions for all the named functions into file. For -c, the
- names must be functions currently defined in the shell, not
- those marked for autoloading. Undefined functions that are
+ The second form, with the -c or -a options, writes the compiled
+ definitions for all the named functions into file. For -c, the
+ names must be functions currently defined in the shell, not
+ those marked for autoloading. Undefined functions that are
marked for autoloading may be written by using the -a option, in
which case the fpath is searched and the contents of the defini-
- tion files for those functions, if found, are compiled into
- file. If both -c and -a are given, names of both defined func-
+ tion files for those functions, if found, are compiled into
+ file. If both -c and -a are given, names of both defined func-
tions and functions marked for autoloading may be given. In ei-
- ther case, the functions in files written with the -c or -a op-
- tion will be autoloaded as if the KSH_AUTOLOAD option were un-
+ ther case, the functions in files written with the -c or -a op-
+ tion will be autoloaded as if the KSH_AUTOLOAD option were un-
set.
The reason for handling loaded and not-yet-loaded functions with
- different options is that some definition files for autoloading
- define multiple functions, including the function with the same
- name as the file, and, at the end, call that function. In such
- cases the output of `zcompile -c' does not include the addi-
- tional functions defined in the file, and any other initializa-
+ different options is that some definition files for autoloading
+ define multiple functions, including the function with the same
+ name as the file, and, at the end, call that function. In such
+ cases the output of `zcompile -c' does not include the addi-
+ tional functions defined in the file, and any other initializa-
tion code in the file is lost. Using `zcompile -a' captures all
this extra information.
- If the -m option is combined with -c or -a, the names are used
- as patterns and all functions whose names match one of these
- patterns will be written. If no name is given, the definitions
- of all functions currently defined or marked as autoloaded will
+ If the -m option is combined with -c or -a, the names are used
+ as patterns and all functions whose names match one of these
+ patterns will be written. If no name is given, the definitions
+ of all functions currently defined or marked as autoloaded will
be written.
Note the second form cannot be used for compiling functions that
- include redirections as part of the definition rather than
+ include redirections as part of the definition rather than
within the body of the function; for example
fn1() { { ... } >~/logfile }
@@ -61,62 +61,62 @@ zcompile -t file [ name ... ]
fn1() { ... } >~/logfile
- cannot. It is possible to use the first form of zcompile to
- compile autoloadable functions that include the full function
+ cannot. It is possible to use the first form of zcompile to
+ compile autoloadable functions that include the full function
definition instead of just the body of the function.
- The third form, with the -t option, examines an existing com-
- piled file. Without further arguments, the names of the origi-
+ The third form, with the -t option, examines an existing com-
+ piled file. Without further arguments, the names of the origi-
nal files compiled into it are listed. The first line of output
- shows the version of the shell which compiled the file and how
+ shows the version of the shell which compiled the file and how
the file will be used (i.e. by reading it directly or by mapping
- it into memory). With arguments, nothing is output and the re-
- turn status is set to zero if definitions for all names were
- found in the compiled file, and non-zero if the definition for
+ it into memory). With arguments, nothing is output and the re-
+ turn status is set to zero if definitions for all names were
+ found in the compiled file, and non-zero if the definition for
at least one name was not found.
Other options:
-U Aliases are not expanded when compiling the named files.
- -R When the compiled file is read, its contents are copied
- into the shell's memory, rather than memory-mapped (see
- -M). This happens automatically on systems that do not
+ -R When the compiled file is read, its contents are copied
+ into the shell's memory, rather than memory-mapped (see
+ -M). This happens automatically on systems that do not
support memory mapping.
When compiling scripts instead of autoloadable functions,
- it is often desirable to use this option; otherwise the
- whole file, including the code to define functions which
- have already been defined, will remain mapped, conse-
+ it is often desirable to use this option; otherwise the
+ whole file, including the code to define functions which
+ have already been defined, will remain mapped, conse-
quently wasting memory.
- -M The compiled file is mapped into the shell's memory when
- read. This is done in such a way that multiple instances
- of the shell running on the same host will share this
+ -M The compiled file is mapped into the shell's memory when
+ read. This is done in such a way that multiple instances
+ of the shell running on the same host will share this
mapped file. If neither -R nor -M is given, the zcompile
- builtin decides what to do based on the size of the com-
+ builtin decides what to do based on the size of the com-
piled file.
-k
- -z These options are used when the compiled file contains
+ -z These options are used when the compiled file contains
functions which are to be autoloaded. If -z is given, the
function will be autoloaded as if the KSH_AUTOLOAD option
- is not set, even if it is set at the time the compiled
+ is not set, even if it is set at the time the compiled
file is read, while if the -k is given, the function will
- be loaded as if KSH_AUTOLOAD is set. These options also
- take precedence over any -k or -z options specified to
- the autoload builtin. If neither of these options is
- given, the function will be loaded as determined by the
- setting of the KSH_AUTOLOAD option at the time the com-
+ be loaded as if KSH_AUTOLOAD is set. These options also
+ take precedence over any -k or -z options specified to
+ the autoload builtin. If neither of these options is
+ given, the function will be loaded as determined by the
+ setting of the KSH_AUTOLOAD option at the time the com-
piled file is read.
- These options may also appear as many times as necessary
- between the listed names to specify the loading style of
+ These options may also appear as many times as necessary
+ between the listed names to specify the loading style of
all following functions, up to the next -k or -z.
The created file always contains two versions of the com-
- piled format, one for big-endian machines and one for
- small-endian machines. The upshot of this is that the
+ piled format, one for big-endian machines and one for
+ small-endian machines. The upshot of this is that the
compiled file is machine independent and if it is read or
- mapped, only one half of the file is actually used (and
+ mapped, only one half of the file is actually used (and
mapped).
diff --git a/Doc/help/zmodload b/Doc/help/zmodload
index a19159d71..735241b57 100644
--- a/Doc/help/zmodload
+++ b/Doc/help/zmodload
@@ -6,235 +6,235 @@ zmodload -u [ -abcdpf [ -I ] ] [ -iL ] ...
zmodload -A [ -L ] [ modalias[=module] ... ]
zmodload -R modalias ...
Performs operations relating to zsh's loadable modules. Loading
- of modules while the shell is running (`dynamical loading') is
- not available on all operating systems, or on all installations
- on a particular operating system, although the zmodload command
+ of modules while the shell is running (`dynamical loading') is
+ not available on all operating systems, or on all installations
+ on a particular operating system, although the zmodload command
itself is always available and can be used to manipulate modules
- built into versions of the shell executable without dynamical
+ built into versions of the shell executable without dynamical
loading.
- Without arguments the names of all currently loaded binary mod-
- ules are printed. The -L option causes this list to be in the
- form of a series of zmodload commands. Forms with arguments
+ Without arguments the names of all currently loaded binary mod-
+ ules are printed. The -L option causes this list to be in the
+ form of a series of zmodload commands. Forms with arguments
are:
zmodload [ -is ] name ...
zmodload -u [ -i ] name ...
- In the simplest case, zmodload loads a binary module.
- The module must be in a file with a name consisting of
+ In the simplest case, zmodload loads a binary module.
+ The module must be in a file with a name consisting of
the specified name followed by a standard suffix, usually
`.so' (`.sl' on HPUX). If the module to be loaded is al-
- ready loaded the duplicate module is ignored. If zmod-
- load detects an inconsistency, such as an invalid module
- name or circular dependency list, the current code block
- is aborted. If it is available, the module is loaded if
- necessary, while if it is not available, non-zero status
+ ready loaded the duplicate module is ignored. If zmod-
+ load detects an inconsistency, such as an invalid module
+ name or circular dependency list, the current code block
+ is aborted. If it is available, the module is loaded if
+ necessary, while if it is not available, non-zero status
is silently returned. The option -i is accepted for com-
patibility but has no effect.
- The named module is searched for in the same way a com-
- mand is, using $module_path instead of $path. However,
- the path search is performed even when the module name
- contains a `/', which it usually does. There is no way
+ The named module is searched for in the same way a com-
+ mand is, using $module_path instead of $path. However,
+ the path search is performed even when the module name
+ contains a `/', which it usually does. There is no way
to prevent the path search.
- If the module supports features (see below), zmodload
- tries to enable all features when loading a module. If
- the module was successfully loaded but not all features
+ If the module supports features (see below), zmodload
+ tries to enable all features when loading a module. If
+ the module was successfully loaded but not all features
could be enabled, zmodload returns status 2.
- If the option -s is given, no error is printed if the
- module was not available (though other errors indicating
- a problem with the module are printed). The return sta-
- tus indicates if the module was loaded. This is appro-
+ If the option -s is given, no error is printed if the
+ module was not available (though other errors indicating
+ a problem with the module are printed). The return sta-
+ tus indicates if the module was loaded. This is appro-
priate if the caller considers the module optional.
With -u, zmodload unloads modules. The same name must be
- given that was given when the module was loaded, but it
+ given that was given when the module was loaded, but it
is not necessary for the module to exist in the file sys-
tem. The -i option suppresses the error if the module is
already unloaded (or was never loaded).
- Each module has a boot and a cleanup function. The mod-
+ Each module has a boot and a cleanup function. The mod-
ule will not be loaded if its boot function fails. Simi-
- larly a module can only be unloaded if its cleanup func-
+ larly a module can only be unloaded if its cleanup func-
tion runs successfully.
zmodload -F [ -almLe -P param ] module [ [+-]feature ... ]
- zmodload -F allows more selective control over the fea-
- tures provided by modules. With no options apart from
- -F, the module named module is loaded, if it was not al-
- ready loaded, and the list of features is set to the re-
- quired state. If no features are specified, the module
+ zmodload -F allows more selective control over the fea-
+ tures provided by modules. With no options apart from
+ -F, the module named module is loaded, if it was not al-
+ ready loaded, and the list of features is set to the re-
+ quired state. If no features are specified, the module
is loaded, if it was not already loaded, but the state of
features is unchanged. Each feature may be preceded by a
- + to turn the feature on, or - to turn it off; the + is
+ + to turn the feature on, or - to turn it off; the + is
assumed if neither character is present. Any feature not
explicitly mentioned is left in its current state; if the
module was not previously loaded this means any such fea-
tures will remain disabled. The return status is zero if
- all features were set, 1 if the module failed to load,
- and 2 if some features could not be set (for example, a
+ all features were set, 1 if the module failed to load,
+ and 2 if some features could not be set (for example, a
parameter couldn't be added because there was a different
parameter of the same name) but the module was loaded.
- The standard features are builtins, conditions, parame-
- ters and math functions; these are indicated by the pre-
- fix `b:', `c:' (`C:' for an infix condition), `p:' and
- `f:', respectively, followed by the name that the corre-
- sponding feature would have in the shell. For example,
+ The standard features are builtins, conditions, parame-
+ ters and math functions; these are indicated by the pre-
+ fix `b:', `c:' (`C:' for an infix condition), `p:' and
+ `f:', respectively, followed by the name that the corre-
+ sponding feature would have in the shell. For example,
`b:strftime' indicates a builtin named strftime and
- p:EPOCHSECONDS indicates a parameter named EPOCHSECONDS.
+ p:EPOCHSECONDS indicates a parameter named EPOCHSECONDS.
The module may provide other (`abstract') features of its
own as indicated by its documentation; these have no pre-
fix.
- With -l or -L, features provided by the module are
- listed. With -l alone, a list of features together with
- their states is shown, one feature per line. With -L
- alone, a zmodload -F command that would cause enabled
- features of the module to be turned on is shown. With
- -lL, a zmodload -F command that would cause all the fea-
- tures to be set to their current state is shown. If one
- of these combinations is given with the option -P param
- then the parameter param is set to an array of features,
+ With -l or -L, features provided by the module are
+ listed. With -l alone, a list of features together with
+ their states is shown, one feature per line. With -L
+ alone, a zmodload -F command that would cause enabled
+ features of the module to be turned on is shown. With
+ -lL, a zmodload -F command that would cause all the fea-
+ tures to be set to their current state is shown. If one
+ of these combinations is given with the option -P param
+ then the parameter param is set to an array of features,
either features together with their state or (if -L alone
is given) enabled features.
With the option -L the module name may be omitted; then a
- list of all enabled features for all modules providing
- features is printed in the form of zmodload -F commands.
- If -l is also given, the state of both enabled and dis-
+ list of all enabled features for all modules providing
+ features is printed in the form of zmodload -F commands.
+ If -l is also given, the state of both enabled and dis-
abled features is output in that form.
- A set of features may be provided together with -l or -L
- and a module name; in that case only the state of those
- features is considered. Each feature may be preceded by
- + or - but the character has no effect. If no set of
+ A set of features may be provided together with -l or -L
+ and a module name; in that case only the state of those
+ features is considered. Each feature may be preceded by
+ + or - but the character has no effect. If no set of
features is provided, all features are considered.
- With -e, the command first tests that the module is
- loaded; if it is not, status 1 is returned. If the mod-
- ule is loaded, the list of features given as an argument
- is examined. Any feature given with no prefix is simply
- tested to see if the module provides it; any feature
- given with a prefix + or - is tested to see if is pro-
- vided and in the given state. If the tests on all fea-
- tures in the list succeed, status 0 is returned, else
+ With -e, the command first tests that the module is
+ loaded; if it is not, status 1 is returned. If the mod-
+ ule is loaded, the list of features given as an argument
+ is examined. Any feature given with no prefix is simply
+ tested to see if the module provides it; any feature
+ given with a prefix + or - is tested to see if is pro-
+ vided and in the given state. If the tests on all fea-
+ tures in the list succeed, status 0 is returned, else
status 1.
- With -m, each entry in the given list of features is
+ With -m, each entry in the given list of features is
taken as a pattern to be matched against the list of fea-
- tures provided by the module. An initial + or - must be
- given explicitly. This may not be combined with the -a
+ tures provided by the module. An initial + or - must be
+ given explicitly. This may not be combined with the -a
option as autoloads must be specified explicitly.
- With -a, the given list of features is marked for au-
- toload from the specified module, which may not yet be
- loaded. An optional + may appear before the feature
- name. If the feature is prefixed with -, any existing
- autoload is removed. The options -l and -L may be used
+ With -a, the given list of features is marked for au-
+ toload from the specified module, which may not yet be
+ loaded. An optional + may appear before the feature
+ name. If the feature is prefixed with -, any existing
+ autoload is removed. The options -l and -L may be used
to list autoloads. Autoloading is specific to individual
- features; when the module is loaded only the requested
- feature is enabled. Autoload requests are preserved if
- the module is subsequently unloaded until an explicit
- `zmodload -Fa module -feature' is issued. It is not an
- error to request an autoload for a feature of a module
+ features; when the module is loaded only the requested
+ feature is enabled. Autoload requests are preserved if
+ the module is subsequently unloaded until an explicit
+ `zmodload -Fa module -feature' is issued. It is not an
+ error to request an autoload for a feature of a module
that is already loaded.
- When the module is loaded each autoload is checked
- against the features actually provided by the module; if
- the feature is not provided the autoload request is
- deleted. A warning message is output; if the module is
+ When the module is loaded each autoload is checked
+ against the features actually provided by the module; if
+ the feature is not provided the autoload request is
+ deleted. A warning message is output; if the module is
being loaded to provide a different feature, and that au-
toload is successful, there is no effect on the status of
- the current command. If the module is already loaded at
- the time when zmodload -Fa is run, an error message is
+ the current command. If the module is already loaded at
+ the time when zmodload -Fa is run, an error message is
printed and status 1 returned.
- zmodload -Fa can be used with the -l, -L, -e and -P op-
- tions for listing and testing the existence of autoload-
+ zmodload -Fa can be used with the -l, -L, -e and -P op-
+ tions for listing and testing the existence of autoload-
able features. In this case -l is ignored if -L is spec-
ified. zmodload -FaL with no module name lists autoloads
for all modules.
- Note that only standard features as described above can
- be autoloaded; other features require the module to be
+ Note that only standard features as described above can
+ be autoloaded; other features require the module to be
loaded before enabling.
zmodload -d [ -L ] [ name ]
zmodload -d name dep ...
zmodload -ud name [ dep ... ]
The -d option can be used to specify module dependencies.
- The modules named in the second and subsequent arguments
+ The modules named in the second and subsequent arguments
will be loaded before the module named in the first argu-
ment.
- With -d and one argument, all dependencies for that mod-
+ With -d and one argument, all dependencies for that mod-
ule are listed. With -d and no arguments, all module de-
- pendencies are listed. This listing is by default in a
- Makefile-like format. The -L option changes this format
+ pendencies are listed. This listing is by default in a
+ Makefile-like format. The -L option changes this format
to a list of zmodload -d commands.
If -d and -u are both used, dependencies are removed. If
- only one argument is given, all dependencies for that
+ only one argument is given, all dependencies for that
module are removed.
zmodload -ab [ -L ]
zmodload -ab [ -i ] name [ builtin ... ]
zmodload -ub [ -i ] builtin ...
- The -ab option defines autoloaded builtins. It defines
- the specified builtins. When any of those builtins is
- called, the module specified in the first argument is
- loaded and all its features are enabled (for selective
- control of features use `zmodload -F -a' as described
- above). If only the name is given, one builtin is de-
- fined, with the same name as the module. -i suppresses
- the error if the builtin is already defined or au-
- toloaded, but not if another builtin of the same name is
+ The -ab option defines autoloaded builtins. It defines
+ the specified builtins. When any of those builtins is
+ called, the module specified in the first argument is
+ loaded and all its features are enabled (for selective
+ control of features use `zmodload -F -a' as described
+ above). If only the name is given, one builtin is de-
+ fined, with the same name as the module. -i suppresses
+ the error if the builtin is already defined or au-
+ toloaded, but not if another builtin of the same name is
already defined.
- With -ab and no arguments, all autoloaded builtins are
- listed, with the module name (if different) shown in
+ With -ab and no arguments, all autoloaded builtins are
+ listed, with the module name (if different) shown in
parentheses after the builtin name. The -L option
changes this format to a list of zmodload -a commands.
- If -b is used together with the -u option, it removes
- builtins previously defined with -ab. This is only pos-
- sible if the builtin is not yet loaded. -i suppresses
+ If -b is used together with the -u option, it removes
+ builtins previously defined with -ab. This is only pos-
+ sible if the builtin is not yet loaded. -i suppresses
the error if the builtin is already removed (or never ex-
isted).
- Autoload requests are retained if the module is subse-
+ Autoload requests are retained if the module is subse-
quently unloaded until an explicit `zmodload -ub builtin'
is issued.
zmodload -ac [ -IL ]
zmodload -ac [ -iI ] name [ cond ... ]
zmodload -uc [ -iI ] cond ...
- The -ac option is used to define autoloaded condition
- codes. The cond strings give the names of the conditions
- defined by the module. The optional -I option is used to
- define infix condition names. Without this option prefix
+ The -ac option is used to define autoloaded condition
+ codes. The cond strings give the names of the conditions
+ defined by the module. The optional -I option is used to
+ define infix condition names. Without this option prefix
condition names are defined.
If given no condition names, all defined names are listed
- (as a series of zmodload commands if the -L option is
+ (as a series of zmodload commands if the -L option is
given).
- The -uc option removes definitions for autoloaded condi-
+ The -uc option removes definitions for autoloaded condi-
tions.
zmodload -ap [ -L ]
zmodload -ap [ -i ] name [ parameter ... ]
zmodload -up [ -i ] parameter ...
- The -p option is like the -b and -c options, but makes
+ The -p option is like the -b and -c options, but makes
zmodload work on autoloaded parameters instead.
zmodload -af [ -L ]
zmodload -af [ -i ] name [ function ... ]
zmodload -uf [ -i ] function ...
- The -f option is like the -b, -p, and -c options, but
+ The -f option is like the -b, -p, and -c options, but
makes zmodload work on autoloaded math functions instead.
zmodload -a [ -L ]
@@ -244,65 +244,65 @@ zmodload -R modalias ...
zmodload -e [ -A ] [ string ... ]
The -e option without arguments lists all loaded modules;
- if the -A option is also given, module aliases corre-
- sponding to loaded modules are also shown. If arguments
- are provided, nothing is printed; the return status is
- set to zero if all strings given as arguments are names
+ if the -A option is also given, module aliases corre-
+ sponding to loaded modules are also shown. If arguments
+ are provided, nothing is printed; the return status is
+ set to zero if all strings given as arguments are names
of loaded modules and to one if at least on string is not
- the name of a loaded module. This can be used to test
- for the availability of things implemented by modules.
- In this case, any aliases are automatically resolved and
+ the name of a loaded module. This can be used to test
+ for the availability of things implemented by modules.
+ In this case, any aliases are automatically resolved and
the -A flag is not used.
zmodload -A [ -L ] [ modalias[=module] ... ]
For each argument, if both modalias and module are given,
define modalias to be an alias for the module module. If
- the module modalias is ever subsequently requested, ei-
+ the module modalias is ever subsequently requested, ei-
ther via a call to zmodload or implicitly, the shell will
- attempt to load module instead. If module is not given,
- show the definition of modalias. If no arguments are
+ attempt to load module instead. If module is not given,
+ show the definition of modalias. If no arguments are
given, list all defined module aliases. When listing, if
- the -L flag was also given, list the definition as a
+ the -L flag was also given, list the definition as a
zmodload command to recreate the alias.
- The existence of aliases for modules is completely inde-
- pendent of whether the name resolved is actually loaded
- as a module: while the alias exists, loading and unload-
- ing the module under any alias has exactly the same ef-
- fect as using the resolved name, and does not affect the
- connection between the alias and the resolved name which
+ The existence of aliases for modules is completely inde-
+ pendent of whether the name resolved is actually loaded
+ as a module: while the alias exists, loading and unload-
+ ing the module under any alias has exactly the same ef-
+ fect as using the resolved name, and does not affect the
+ connection between the alias and the resolved name which
can be removed either by zmodload -R or by redefining the
- alias. Chains of aliases (i.e. where the first resolved
- name is itself an alias) are valid so long as these are
- not circular. As the aliases take the same format as
- module names, they may include path separators: in this
- case, there is no requirement for any part of the path
- named to exist as the alias will be resolved first. For
+ alias. Chains of aliases (i.e. where the first resolved
+ name is itself an alias) are valid so long as these are
+ not circular. As the aliases take the same format as
+ module names, they may include path separators: in this
+ case, there is no requirement for any part of the path
+ named to exist as the alias will be resolved first. For
example, `any/old/alias' is always a valid alias.
- Dependencies added to aliased modules are actually added
- to the resolved module; these remain if the alias is re-
- moved. It is valid to create an alias whose name is one
- of the standard shell modules and which resolves to a
+ Dependencies added to aliased modules are actually added
+ to the resolved module; these remain if the alias is re-
+ moved. It is valid to create an alias whose name is one
+ of the standard shell modules and which resolves to a
different module. However, if a module has dependencies,
- it will not be possible to use the module name as an
- alias as the module will already be marked as a loadable
+ it will not be possible to use the module name as an
+ alias as the module will already be marked as a loadable
module in its own right.
Apart from the above, aliases can be used in the zmodload
- command anywhere module names are required. However,
+ command anywhere module names are required. However,
aliases will not be shown in lists of loaded modules with
a bare `zmodload'.
zmodload -R modalias ...
For each modalias argument that was previously defined as
a module alias via zmodload -A, delete the alias. If any
- was not defined, an error is caused and the remainder of
+ was not defined, an error is caused and the remainder of
the line is ignored.
- Note that zsh makes no distinction between modules that were
- linked into the shell and modules that are loaded dynamically.
+ Note that zsh makes no distinction between modules that were
+ linked into the shell and modules that are loaded dynamically.
In both cases this builtin command has to be used to make avail-
- able the builtins and other things defined by modules (unless
- the module is autoloaded on these definitions). This is true
+ able the builtins and other things defined by modules (unless
+ the module is autoloaded on these definitions). This is true
even for systems that don't support dynamic loading of modules.
diff --git a/Doc/version.yo b/Doc/version.yo
index 3ca873cfd..6d3311e27 100644
--- a/Doc/version.yo
+++ b/Doc/version.yo
@@ -1,6 +1,6 @@
IFDEF(INCWSLEVEL)(INCWSLEVEL())(STARTDEF())
-def(version)(0)(5.8.1.3-test)
-def(date)(0)(May 1, 2022)
+def(version)(0)(5.9)
+def(date)(0)(May 14, 2022)
def(zshenv)(0)(/etc/zshenv)
def(zprofile)(0)(/etc/zprofile)
def(zshrc)(0)(/etc/zshrc)
diff --git a/Doc/zsh.1 b/Doc/zsh.1
index b5a7a96c3..3abc460fb 100644
--- a/Doc/zsh.1
+++ b/Doc/zsh.1
@@ -1,4 +1,4 @@
-.TH "ZSH" "1" "May 1, 2022" "zsh 5\&.8\&.1\&.3-test"
+.TH "ZSH" "1" "May 14, 2022" "zsh 5\&.9"
.SH "NAME"
zsh \- the Z shell
.\" Yodl file: Zsh/intro.yo
diff --git a/Doc/zsh.texi b/Doc/zsh.texi
index 9796d4c81..8c806e2ea 100644
--- a/Doc/zsh.texi
+++ b/Doc/zsh.texi
@@ -27,8 +27,8 @@
@end iftex
@titlepage
@title The Z Shell Manual
-@subtitle Version 5.8.1.3-test
-@subtitle Updated May 1, 2022
+@subtitle Version 5.9
+@subtitle Updated May 14, 2022
@author Original documentation by Paul Falstad
@page
This is a texinfo version of the documentation for the Z Shell, originally by
@@ -63,7 +63,7 @@ POSIX shells, but its default mode is not POSIX compatible, either.
@noindent
@cindex version
-Version 5.8.1.3-test, last updated May 1, 2022.
+Version 5.9, last updated May 14, 2022.
@end ifinfo
@menu
@@ -13692,7 +13692,8 @@ point numbers are not permitted.
@itemx @t{functions +M} [ @t{-m} ] @var{mathfn} ...
Equivalent to @t{typeset -f}, with the exception of the @t{-c}, @t{-x},
@t{-M} and @t{-W} options. For @t{functions -u} and @t{functions -U},
-see @t{autoload}, which provides additional options.
+see @t{autoload}, which provides additional options. For @t{functions -t}
+and @t{functions -T}, see @t{typeset -f}.
@noindent
The @t{-x} option indicates that any functions output will have
@@ -35523,7 +35524,7 @@ distribution in your home directory, you would use the commands:
@noindent
@example
mkdir ~/zsh_help
-perl ~/zsh-5.8.1.3-test/Util/helpfiles ~/zsh_help
+perl ~/zsh-5.9/Util/helpfiles ~/zsh_help
@end example
@noindent
@@ -35684,7 +35685,7 @@ Run @t{zkbd} either as an autoloaded function, or as a shell script:
@noindent
@example
-zsh -f ~/zsh-5.8.1.3-test/Functions/Misc/zkbd
+zsh -f ~/zsh-5.9/Functions/Misc/zkbd
@end example
@noindent
@@ -35749,7 +35750,7 @@ command and redirect the output into a file:
@noindent
@example
-. ~/zsh-5.8.1.3-test/Util/reporter > zsh.report
+. ~/zsh-5.9/Util/reporter > zsh.report
@end example
@noindent
diff --git a/Doc/zshall.1 b/Doc/zshall.1
index 23e556c42..c2b1913ec 100644
--- a/Doc/zshall.1
+++ b/Doc/zshall.1
@@ -1,4 +1,4 @@
-.TH "ZSHALL" "1" "May 1, 2022" "zsh 5\&.8\&.1\&.3-test"
+.TH "ZSHALL" "1" "May 14, 2022" "zsh 5\&.9"
.SH "NAME"
zshall \- the Z shell meta\-man page
.\" Yodl file: Zsh/intro.yo
@@ -486,7 +486,7 @@ file will be used instead\&.
.so man1/zshtcpsys.1
.so man1/zshzftpsys.1
.so man1/zshcontrib.1
-.TH "ZSHALL" "1" "May 1, 2022" "zsh 5\&.8\&.1\&.3\-test"
+.TH "ZSHALL" "1" "May 14, 2022" "zsh 5\&.9"
.\" Yodl file: Zsh/filelist.yo
.SH "FILES"
.PD 0
diff --git a/Doc/zshbuiltins.1 b/Doc/zshbuiltins.1
index b420791a5..2c84d2662 100644
--- a/Doc/zshbuiltins.1
+++ b/Doc/zshbuiltins.1
@@ -1,4 +1,4 @@
-.TH "ZSHBUILTINS" "1" "May 1, 2022" "zsh 5\&.8\&.1\&.3-test"
+.TH "ZSHBUILTINS" "1" "May 14, 2022" "zsh 5\&.9"
.SH "NAME"
zshbuiltins \- zsh built\-in commands
.\" Yodl file: Zsh/builtins.yo
@@ -948,7 +948,8 @@ point numbers are not permitted\&.
\fBfunctions +M\fP [ \fB\-m\fP ] \fImathfn\fP \&.\&.\&.
Equivalent to \fBtypeset \-f\fP, with the exception of the \fB\-c\fP, \fB\-x\fP,
\fB\-M\fP and \fB\-W\fP options\&. For \fBfunctions \-u\fP and \fBfunctions \-U\fP,
-see \fBautoload\fP, which provides additional options\&.
+see \fBautoload\fP, which provides additional options\&. For \fBfunctions \-t\fP
+and \fBfunctions \-T\fP, see \fBtypeset \-f\fP\&.
.RS
.PP
The \fB\-x\fP option indicates that any functions output will have
diff --git a/Doc/zshcalsys.1 b/Doc/zshcalsys.1
index c6bc64e4b..c555653e5 100644
--- a/Doc/zshcalsys.1
+++ b/Doc/zshcalsys.1
@@ -1,4 +1,4 @@
-.TH "ZSHCALSYS" "1" "May 1, 2022" "zsh 5\&.8\&.1\&.3-test"
+.TH "ZSHCALSYS" "1" "May 14, 2022" "zsh 5\&.9"
.SH "NAME"
zshcalsys \- zsh calendar system
.\" Yodl file: Zsh/calsys.yo
diff --git a/Doc/zshcompctl.1 b/Doc/zshcompctl.1
index ec9f58fe6..a199bf192 100644
--- a/Doc/zshcompctl.1
+++ b/Doc/zshcompctl.1
@@ -1,4 +1,4 @@
-.TH "ZSHCOMPCTL" "1" "May 1, 2022" "zsh 5\&.8\&.1\&.3-test"
+.TH "ZSHCOMPCTL" "1" "May 14, 2022" "zsh 5\&.9"
.SH "NAME"
zshcompctl \- zsh programmable completion
.\" Yodl file: Zsh/compctl.yo
diff --git a/Doc/zshcompsys.1 b/Doc/zshcompsys.1
index f43924b46..9402b51f1 100644
--- a/Doc/zshcompsys.1
+++ b/Doc/zshcompsys.1
@@ -1,4 +1,4 @@
-.TH "ZSHCOMPSYS" "1" "May 1, 2022" "zsh 5\&.8\&.1\&.3-test"
+.TH "ZSHCOMPSYS" "1" "May 14, 2022" "zsh 5\&.9"
.SH "NAME"
zshcompsys \- zsh completion system
.\" Yodl file: Zsh/compsys.yo
diff --git a/Doc/zshcompwid.1 b/Doc/zshcompwid.1
index 22c1d086d..25d51be9d 100644
--- a/Doc/zshcompwid.1
+++ b/Doc/zshcompwid.1
@@ -1,4 +1,4 @@
-.TH "ZSHCOMPWID" "1" "May 1, 2022" "zsh 5\&.8\&.1\&.3-test"
+.TH "ZSHCOMPWID" "1" "May 14, 2022" "zsh 5\&.9"
.SH "NAME"
zshcompwid \- zsh completion widgets
.\" Yodl file: Zsh/compwid.yo
diff --git a/Doc/zshcontrib.1 b/Doc/zshcontrib.1
index 573822d46..a12aca674 100644
--- a/Doc/zshcontrib.1
+++ b/Doc/zshcontrib.1
@@ -1,4 +1,4 @@
-.TH "ZSHCONTRIB" "1" "May 1, 2022" "zsh 5\&.8\&.1\&.3-test"
+.TH "ZSHCONTRIB" "1" "May 14, 2022" "zsh 5\&.9"
.SH "NAME"
zshcontrib \- user contributions to zsh
.\" Yodl file: Zsh/contrib.yo
@@ -41,7 +41,7 @@ distribution in your home directory, you would use the commands:
.RS
.nf
\fBmkdir ~/zsh_help
-perl ~/zsh\-5\&.8\&.1\&.3\-test/Util/helpfiles ~/zsh_help\fP
+perl ~/zsh\-5\&.9/Util/helpfiles ~/zsh_help\fP
.fi
.RE
.PP
@@ -181,7 +181,7 @@ Run \fBzkbd\fP either as an autoloaded function, or as a shell script:
.PP
.RS
.nf
-\fBzsh \-f ~/zsh\-5\&.8\&.1\&.3\-test/Functions/Misc/zkbd\fP
+\fBzsh \-f ~/zsh\-5\&.9/Functions/Misc/zkbd\fP
.fi
.RE
.PP
@@ -237,7 +237,7 @@ command and redirect the output into a file:
.PP
.RS
.nf
-\fB\&. ~/zsh\-5\&.8\&.1\&.3\-test/Util/reporter > zsh\&.report\fP
+\fB\&. ~/zsh\-5\&.9/Util/reporter > zsh\&.report\fP
.fi
.RE
.PP
diff --git a/Doc/zshexpn.1 b/Doc/zshexpn.1
index ccd132af4..c6d60350c 100644
--- a/Doc/zshexpn.1
+++ b/Doc/zshexpn.1
@@ -1,4 +1,4 @@
-.TH "ZSHEXPN" "1" "May 1, 2022" "zsh 5\&.8\&.1\&.3-test"
+.TH "ZSHEXPN" "1" "May 14, 2022" "zsh 5\&.9"
.SH "NAME"
zshexpn \- zsh expansion and substitution
.\" Yodl file: Zsh/expn.yo
diff --git a/Doc/zshmisc.1 b/Doc/zshmisc.1
index dac720b87..802f8a82c 100644
--- a/Doc/zshmisc.1
+++ b/Doc/zshmisc.1
@@ -1,4 +1,4 @@
-.TH "ZSHMISC" "1" "May 1, 2022" "zsh 5\&.8\&.1\&.3-test"
+.TH "ZSHMISC" "1" "May 14, 2022" "zsh 5\&.9"
.SH "NAME"
zshmisc \- everything and then some
.\" Yodl file: Zsh/grammar.yo
diff --git a/Doc/zshmodules.1 b/Doc/zshmodules.1
index 6c167fc8d..9c6ceedb5 100644
--- a/Doc/zshmodules.1
+++ b/Doc/zshmodules.1
@@ -1,4 +1,4 @@
-.TH "ZSHMODULES" "1" "May 1, 2022" "zsh 5\&.8\&.1\&.3-test"
+.TH "ZSHMODULES" "1" "May 14, 2022" "zsh 5\&.9"
.SH "NAME"
zshmodules \- zsh loadable modules
.\" Yodl file: Zsh/modules.yo
diff --git a/Doc/zshoptions.1 b/Doc/zshoptions.1
index e37a1315c..1850be56e 100644
--- a/Doc/zshoptions.1
+++ b/Doc/zshoptions.1
@@ -1,4 +1,4 @@
-.TH "ZSHOPTIONS" "1" "May 1, 2022" "zsh 5\&.8\&.1\&.3-test"
+.TH "ZSHOPTIONS" "1" "May 14, 2022" "zsh 5\&.9"
.SH "NAME"
zshoptions \- zsh options
.\" Yodl file: Zsh/options.yo
diff --git a/Doc/zshparam.1 b/Doc/zshparam.1
index fde15f575..99096cfad 100644
--- a/Doc/zshparam.1
+++ b/Doc/zshparam.1
@@ -1,4 +1,4 @@
-.TH "ZSHPARAM" "1" "May 1, 2022" "zsh 5\&.8\&.1\&.3-test"
+.TH "ZSHPARAM" "1" "May 14, 2022" "zsh 5\&.9"
.SH "NAME"
zshparam \- zsh parameters
.\" Yodl file: Zsh/params.yo
diff --git a/Doc/zshroadmap.1 b/Doc/zshroadmap.1
index fc04710a9..4a4275041 100644
--- a/Doc/zshroadmap.1
+++ b/Doc/zshroadmap.1
@@ -1,4 +1,4 @@
-.TH "ZSHROADMAP" "1" "May 1, 2022" "zsh 5\&.8\&.1\&.3-test"
+.TH "ZSHROADMAP" "1" "May 14, 2022" "zsh 5\&.9"
.SH "NAME"
zshroadmap \- informal introduction to the zsh manual
.\" Yodl file: Zsh/roadmap.yo
diff --git a/Doc/zshtcpsys.1 b/Doc/zshtcpsys.1
index 101f3fcd3..a00bf85c7 100644
--- a/Doc/zshtcpsys.1
+++ b/Doc/zshtcpsys.1
@@ -1,4 +1,4 @@
-.TH "ZSHTCPSYS" "1" "May 1, 2022" "zsh 5\&.8\&.1\&.3-test"
+.TH "ZSHTCPSYS" "1" "May 14, 2022" "zsh 5\&.9"
.SH "NAME"
zshtcpsys \- zsh tcp system
.\" Yodl file: Zsh/tcpsys.yo
diff --git a/Doc/zshzftpsys.1 b/Doc/zshzftpsys.1
index 782e4c0d7..492701c3d 100644
--- a/Doc/zshzftpsys.1
+++ b/Doc/zshzftpsys.1
@@ -1,4 +1,4 @@
-.TH "ZSHZFTPSYS" "1" "May 1, 2022" "zsh 5\&.8\&.1\&.3-test"
+.TH "ZSHZFTPSYS" "1" "May 14, 2022" "zsh 5\&.9"
.SH "NAME"
zshzftpsys \- zftp function front\-end
.\" Yodl file: Zsh/zftpsys.yo
diff --git a/Doc/zshzle.1 b/Doc/zshzle.1
index f70a7d482..8097bca96 100644
--- a/Doc/zshzle.1
+++ b/Doc/zshzle.1
@@ -1,4 +1,4 @@
-.TH "ZSHZLE" "1" "May 1, 2022" "zsh 5\&.8\&.1\&.3-test"
+.TH "ZSHZLE" "1" "May 14, 2022" "zsh 5\&.9"
.SH "NAME"
zshzle \- zsh command line editor
.\" Yodl file: Zsh/zle.yo
diff --git a/Etc/.gitignore b/Etc/.gitignore
deleted file mode 100644
index 595541f37..000000000
--- a/Etc/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-FAQ*.html
diff --git a/Src/openssh_bsd_setres_id.c b/Src/openssh_bsd_setres_id.c
index 217a6d074..26c7d3958 100644
--- a/Src/openssh_bsd_setres_id.c
+++ b/Src/openssh_bsd_setres_id.c
@@ -55,6 +55,16 @@
#include <unistd.h>
#include <string.h>
+#ifdef __NetBSD__
+/*
+ * On NetBSD, setreuid() does not reset the saved uid if the real uid
+ * is not modified. Better to use setuid() that resets all of real,
+ * effective and saved uids to the specified value. Same for setregid().
+ */
+#define BROKEN_SETREUID
+#define BROKEN_SETREGID
+#endif
+
#if defined(ZSH_IMPLEMENT_SETRESGID) || defined(BROKEN_SETRESGID)
int
setresgid(gid_t rgid, gid_t egid, gid_t sgid)
diff --git a/Src/patchlevel.h.release b/Src/patchlevel.h.release
index b95d69ac2..7d9e0d5e8 100644
--- a/Src/patchlevel.h.release
+++ b/Src/patchlevel.h.release
@@ -1 +1 @@
-#define ZSH_PATCHLEVEL "zsh-5.8.1.3-test-0-g3210020"
+#define ZSH_PATCHLEVEL "zsh-5.9-0-g73d3173"
diff --git a/Test/D03procsubst.ztst b/Test/D03procsubst.ztst
index 1e5cd9f6c..d68db35fa 100644
--- a/Test/D03procsubst.ztst
+++ b/Test/D03procsubst.ztst
@@ -167,5 +167,25 @@
print -rC1 -- $TMPPREFIX*(N)
}
0f:external command with =(...) on LHS of pipeline cleans up its tempfiles
+F:subshells including pipe LHS do not pass through zexit()
# (Expected result: no output.)
+# Confirm tempfile exists in the function, but not after exit
+ () {
+ local -x TMPPREFIX=$PWD/exit
+ $ZTST_testdir/../Src/zsh -fc '
+ () {
+ print -rC1 -- $TMPPREFIX*
+ exit
+ } =(sleep 5)
+ '
+ print -rC1 -- $TMPPREFIX*(N)
+ }
+0:regression test: exit in shell function cleans up tempfiles
+F:see preceding test
+*>*.tmp/exit*
+
+ print -u $ZTST_fd 'This test hangs the shell when it fails...'
+ true | false =(nosuchcommand$$)
+1:regression test: race condition with pipe and procsubst
+*?\(eval\):2: command not found: nosuchcommand*
diff --git a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst
index cbd802f23..e2e9a25ef 100644
--- a/Test/D07multibyte.ztst
+++ b/Test/D07multibyte.ztst
@@ -627,3 +627,17 @@ F:support character sets outside the portable 7-bit range.
0:locale gets restored when locale parameters go out of scope (regression test for 45772)
>❯
>❯
+
+ # Subshell for zmodload isolation
+ (
+ zmodload zsh/stat
+ typeset -A sizes
+ touch 50150-é 50150-Ą
+ # Using +size solely in order to make it easier to write the expectations
+ zstat +size -A sizes -nor -- 50150-*
+ print -r -- 50150-Ą $sizes[50150-Ą]
+ print -r -- 50150-é $sizes[50150-é]
+ )
+0:(workers/50150) zsh/stat with Unicode and metafication
+>50150-Ą 0
+>50150-é 0
diff --git a/Test/E01options.ztst b/Test/E01options.ztst
index 72749e6ab..2acbfd357 100644
--- a/Test/E01options.ztst
+++ b/Test/E01options.ztst
@@ -752,6 +752,13 @@
>These are the contents of the file
>These are the contents of the file
+# Subshell to shield nullexec redirections
+ ( exec 3>&1 3>&2; print -u 3 some words )
+ sleep 1 # let background multi thread catch up
+0:regression test: multios with nullexec
+>some words
+?some words
+
# tried this with other things, but not on its own, so much.
unsetopt nomatch
print with nonomatch: flooble*
diff --git a/Test/V14system.ztst b/Test/V14system.ztst
index ffdb730a4..81253324f 100644
--- a/Test/V14system.ztst
+++ b/Test/V14system.ztst
@@ -147,3 +147,69 @@ F:This timing test might fail due to process scheduling issues unrelated to zsh.
0:zsystem flock successful wait test, fractional seconds
?elapsed time seems OK
F:This timing test might fail due to process scheduling issues unrelated to zsh.
+
+ unset chars REPLY
+ print -n a few words | sysread -i 0 -c chars
+ ret=$?
+ print -- $chars x${REPLY}x
+ return ret
+0:sysread default
+>11 xa few wordsx
+
+ unset chars REPLY
+ sysread -i 9 -c chars
+ ret=$?
+ print -- $chars x${REPLY}x
+ return ret
+2:sysread read error
+>-1 xx
+
+ REPLY="say nothing"
+ sysread -i 9 -c chars
+ ret=$?
+ print -- $chars x${REPLY}x
+ return ret
+2f:sysread read error
+F:The value of $REPLY should be empty or unset when nothing is read?
+>-1 xx
+
+ unset chars REPLY
+ print -n a few words | sysread -i 0 -o 9 -c chars
+ ret=$?
+ print -- $chars x${REPLY}x
+ return ret
+3:sysread write error
+>11 xx
+
+ sleep 3 | sysread -i 0 -t 1
+4:sysread timeout
+
+ sysread -i 0 </dev/null
+5:sysread end of file
+
+ unset chars oration
+ print -n a few words | sysread -i 0 -o 9 -c chars oration
+ ret=$?
+ print $chars x${oration}x $REPLY
+ return ret
+3:regression test: sysread write error with both -o and a parameter
+>11 xa few wordsx
+
+ unset chars oration
+ print a few words | sysread -i 0 -o 1 -c chars oration
+ ret=$?
+ print -- $chars x${oration}x $REPLY
+ return ret
+0:regression test: sucessful sysread with both -o and a parameter
+>a few words
+>12 xx
+
+ oration="do not say these words"
+ print a few words | sysread -i 0 -o 1 -c chars oration
+ ret=$?
+ print -- $chars x${oration}x $REPLY
+ return ret
+0f:successful sysread with both -o and a parameter
+F:The value of $oration should be empty or unset when everything is written?
+>a few words
+>12 xx