diff options
Diffstat (limited to 'Doc/Zsh/options.yo')
-rw-r--r-- | Doc/Zsh/options.yo | 51 |
1 files changed, 34 insertions, 17 deletions
diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo index 068a253ac..20d9fc2a8 100644 --- a/Doc/Zsh/options.yo +++ b/Doc/Zsh/options.yo @@ -63,6 +63,10 @@ item(tt(AUTO_CD) (tt(-J)))( If a command is issued that can't be executed as a normal command, and the command is the name of a directory, perform the tt(cd) command to that directory. +This option is only applicable if the option tt(SHIN_STDIN) is set, +i.e. if commands are being read from standard input. The option +is designed for interactive use; it is recommended that tt(cd) +be used explicitly in scripts to avoid ambiguity. ) pindex(AUTO_PUSHD) pindex(NO_AUTO_PUSHD) @@ -492,9 +496,10 @@ pindex(NOFORCEFLOAT) cindex(floating point, forcing use of) cindex(forcing use of floating point) item(tt(FORCE_FLOAT))( -Constants in arithmetic evaluation will be treated as floating point -even without the use of a decimal point. Integers in any base -will be converted. +Constants in arithmetic evaluation will be treated as +floating point even without the use of a decimal point; the +values of integer variables will be converted to floating point when +used in arithmetic expressions. Integers in any base will be converted. ) pindex(GLOB) pindex(NO_GLOB) @@ -535,7 +540,7 @@ pindex(GLOBSUBST) pindex(NOGLOBSUBST) item(tt(GLOB_SUBST) <C> <K> <S>)( Treat any characters resulting from parameter expansion as being -eligible for file expansion and filename generation, and any +eligible for filename expansion and filename generation, and any characters resulting from command substitution as being eligible for filename generation. Braces (and commas in between) do not become eligible for expansion. @@ -804,7 +809,7 @@ pindex(NOHISTBEEP) cindex(history beeping) cindex(beep, history) item(tt(HIST_BEEP) <D>)( -Beep when an attempt is made to access a history entry which +Beep in ZLE when a widget attempts to access a history entry which isn't there. ) pindex(HIST_EXPIRE_DUPS_FIRST) @@ -1434,10 +1439,10 @@ shell is saved for output within a subshell (for example, within a pipeline). When the option is set, the output of tt(jobs) is empty until a job is started within the subshell. -When the option is set, it becomes possible to use the tt(wait) builtin to -wait for the last job started in the background (as given by tt($!)) even -if that job has already exited. This works even if the option is turned -on temporarily around the use of the tt(wait) builtin. +In previous versions of the shell, it was necessary to enable +tt(POSIX_JOBS) in order for the builtin command tt(wait) to return the +status of background jobs that had already exited. This is no longer +the case. ) enditem() @@ -1841,8 +1846,8 @@ cindex(history style, csh) item(tt(CSH_JUNKIE_HISTORY) <C>)( A history reference without an event specifier will always refer to the previous command. Without this option, such a history reference refers -to the same event as the previous history reference, defaulting to the -previous command. +to the same event as the previous history reference on the current +command line, defaulting to the previous command. ) pindex(CSH_JUNKIE_LOOPS) pindex(NO_CSH_JUNKIE_LOOPS) @@ -2092,7 +2097,7 @@ pindex(NOPOSIXTRAPS) cindex(traps, on function exit) cindex(traps, POSIX compatibility) item(tt(POSIX_TRAPS) <K> <S>)( -When the is option is set, the usual zsh behaviour of executing +When this option is set, the usual zsh behaviour of executing traps for tt(EXIT) on exit from shell functions is suppressed. In that case, manipulating tt(EXIT) traps always alters the global trap for exiting the shell; the tt(LOCAL_TRAPS) option is @@ -2195,10 +2200,22 @@ pindex(NOPRIVILEGED) cindex(privileged mode) cindex(mode, privileged) item(tt(PRIVILEGED) (tt(-p), ksh: tt(-p)))( -Turn on privileged mode. This is enabled automatically on startup if the -effective user (group) ID is not equal to the real user (group) ID. Turning -this option off causes the effective user and group IDs to be set to the -real user and group IDs. This option disables sourcing user startup files. +Turn on privileged mode. Typically this is used when script is to be run +with elevated privileges. This should be done as follows directly with +the tt(-p) option to zsh so that it takes effect during startup. + +example(#!/bin/zsh -p) + +The option is enabled automatically on startup if the effective user +(group) ID is not equal to the real user (group) ID. In this case, +turning the option off causes the effective user and group IDs to be set +to the real user and group IDs. Be aware that if that fails the shell may +be running with different IDs than was intended so a script should check +for failure and act accordingly, for example: + +example(unsetopt privileged || exit) + +The tt(PRIVILEGED) option disables sourcing user startup files. If zsh is invoked as `tt(sh)' or `tt(ksh)' with this option set, tt(/etc/suid_profile) is sourced (after tt(/etc/profile) on interactive shells). Sourcing tt(~/.profile) is disabled and the contents of the @@ -2231,7 +2248,7 @@ taken as a file to run will instead be treated as a normal positional parameter. Note that setting or unsetting this option on the command line does not necessarily affect the state the option will have while the shell is -running - that is purely an indicator of whether on not commands are +running - that is purely an indicator of whether or not commands are em(actually) being read from standard input. The value of this option can only be changed via flags supplied at invocation of the shell. |