Manual Pages for UNIX Darwin command on man zshbuiltins
MyWebUniversity

Manual Pages for UNIX Darwin command on man zshbuiltins

ZSHBUILTINS(1) ZSHBUILTINS(1)

NAME

zshbuiltins - zsh built-in commands

SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS

- simple command

See the section `Precommand Modifiers'. .. file [ arg ... ] Read commands from file and execute them in the current shell environment. If file does not contain a slash, or if PPAATTHHDDIIRRSS is set, the

shell looks in the components of $$ppaatthh to find the directory

containing file. Files in the current directory are not read

unless `..' appears somewhere in $$ppaatthh. If a file named

`file..zzwwcc' is found, is newer than file, and is the compiled form (created with the zzccoommppiillee builtin) of file, then commands are read from that file instead of file. If any arguments arg are given, they become the positional parameters; the old positional parameters are restored when the file is done executing. The exit status is the exit status of the last command executed. :: [ arg ... ] This command does nothing, although normal argument expansions is performed which may have effects on shell parameters. A zero exit code is returned.

aalliiaass [ {++||-}}ggmmrrssLL ]] [[ name[[==value]] ...... ]]

For each name with a corresponding value, define an alias with that value. A trailing space in value causes the next word to

be checked for alias expansion. If the -gg flag is present,

define a global alias; global aliases are expanded even if they do not occur in command position.

If the -ss flags is present, define a suffix alias: if the com-

mand word on a command line is in the form `text..name', where

text is any non-empty string, it is replaced by the text `value

text..name'. Note that name is treated as a literal string, not a pattern. A trailing space in value is not special in this case. For example,

aalliiaass -ss ppss==ggvv

will cause the command `**..ppss' to be expanded to `ggvv **..ppss'. As alias expansion is carried out earlier than globbing, the `**..ppss' will then be expanded. Suffix aliases constitute a different name space from other aliases (so in the above example it is still possible to create an alias for the command ppss) and the two sets are never listed together. For each name with no value, print the value of name, if any. With no arguments, print all currently defined aliases other

than suffix aliases. If the -mm flag is given the arguments are

taken as patterns (they should be quoted to preserve them from being interpreted as glob patterns), and the aliases matching these patterns are printed. When printing aliases and one of

the -gg, -rr or -ss flags is present, restrict the printing to

global, regular or suffix aliases, respectively; a regular alias is one which is neither a global nor a suffix alias. Using `++'

instead of `-', or ending the option list with a single `++',

prevents the values of the aliases from being printed.

If the -LL flag is present, then print each alias in a manner

suitable for putting in a startup script. The exit status is nonzero if a name (with no value) is given for which no alias has been defined.

aauuttoollooaadd [ {++|-}UUXXkkttzz ] [ -ww ] [ name ... ]

Equivalent to ffuunnccttiioonnss -uu, with the exception of -XX/++XX and -ww.

The flag -XX may be used only inside a shell function, and may

not be followed by a name. It causes the calling function to be marked for autoloading and then immediately loaded and executed, with the current array of positional parameters as arguments. This replaces the previous definition of the function. If no

function definition is found, an error is printed and the func-

tion remains undefined and marked for autoloading.

The flag ++XX attempts to load each name as an autoloaded func-

tion, but does not execute it. The exit status is zero (suc-

cess) if the function was not previously defined and a defini-

tion for it was found. This does not replace any existing defi-

nition of the function. The exit status is nonzero (failure) if the function was already defined or when no definition was found. In the latter case the function remains undefined and

marked for autoloading. If ksh-style autoloading is enabled,

the function created will contain the contents of the file plus a call to the function itself appended to it, thus giving normal ksh autoloading behaviour on the first call to the function.

With the -ww flag, the names are taken as names of files compiled

with the zzccoommppiillee builtin, and all functions defined in them are marked for autoloading. bbgg [ job ... ] job ... && Put each specified job in the background, or the current job if none is specified. bbiinnddkkeeyy See the section `Zle Builtins' in zshzle(1). bbrreeaakk [ n ] Exit from an enclosing ffoorr, wwhhiillee, uunnttiill, sseelleecctt or rreeppeeaatt loop. If n is specified, then break n levels instead of just one. bbuuiillttiinn name [ args ... ] Executes the builtin name, with the given args. bbyyee Same as eexxiitt. ccaapp See the section `The zsh/cap Module' in zshmodules(1).

ccdd [ -ssLLPP ] [ arg ]

ccdd [ -ssLLPP ] old new

ccdd [ -ssLLPP ] {++|-}n

Change the current directory. In the first form, change the

current directory to arg, or to the value of $$HHOOMMEE if arg is not

specified. If arg is `-', change to the value of $$OOLLDDPPWWDD, the

previous directory. Otherwise, if a directory named arg is not found in the current directory and arg does not begin with a slash, search each component of the shell parameter ccddppaatthh. If no directory is found and the option CCDDAABBLLEEVVAARRSS is set, and a parameter named arg exists whose value begins with a slash, treat its value as the directory. In that case, the parameter is added to the named directory hash table. The second form of ccdd substitutes the string new for the string old in the name of the current directory, and tries to change to this new directory. The third form of ccdd extracts an entry from the directory stack, and changes to that directory. An argument of the form `++n' identifies a stack entry by counting from the left of the list shown by the ddiirrss command, starting with zero. An argument of

the form `-n' counts from the right. If the PPUUSSHHDDMMIINNUUSS option

is set, the meanings of `++' and `-' in this context are swapped.

If the -ss option is specified, ccdd refuses to change the current

directory if the given pathname contains symlinks. If the -PP

option is given or the CCHHAASSEELLIINNKKSS option is set, symbolic links

are resolved to their true values. If the -LL option is given

symbolic links are followed regardless of the state of the CCHHAASSEELLIINNKKSS option. cchhddiirr Same as ccdd. cclloonnee See the section `The zsh/clone Module' in zshmodules(1).

ccoommmmaanndd [ -ppvvVV ] simple command

The simple command argument is taken as an external command instead of a function or builtin and is executed. If the PPOOSSIIXXBBUUIILLTTIINNSS option is set, builtins will also be executed but

certain special properties of them are suppressed. The -pp flag

causes a default path to be searched instead of that in $$ppaatthh.

With the -vv flag, ccoommmmaanndd is similar to wwhheennccee and with -VV, it

is equivalent to wwhheennccee -vv.

See also the section `Precommand Modifiers'. ccoommppaarrgguummeennttss See the section `The zsh/computil Module' in zshmodules(1). ccoommppccaallll See the section `The zsh/compctl Module' in zshmodules(1). ccoommppccttll See the section `The zsh/compctl Module' in zshmodules(1). ccoommppddeessccrriibbee See the section `The zsh/computil Module' in zshmodules(1). ccoommppffiilleess See the section `The zsh/computil Module' in zshmodules(1). ccoommppggrroouuppss See the section `The zsh/computil Module' in zshmodules(1). ccoommppqquuoottee See the section `The zsh/computil Module' in zshmodules(1). ccoommppttaaggss See the section `The zsh/computil Module' in zshmodules(1). ccoommppttrryy See the section `The zsh/computil Module' in zshmodules(1). ccoommppvvaalluueess See the section `The zsh/computil Module' in zshmodules(1). ccoonnttiinnuuee [ n ] Resume the next iteration of the enclosing ffoorr, wwhhiillee, uunnttiill,

sseelleecctt or rreeppeeaatt loop. If n is specified, break out of n-1

loops and resume at the nth enclosing loop. ddeeccllaarree Same as ttyyppeesseett.

ddiirrss [ -cc ] [ arg ... ]

ddiirrss [ -llppvv ]

With no arguments, print the contents of the directory stack. Directories are added to this stack with the ppuusshhdd command, and

removed with the ccdd or ppooppdd commands. If arguments are speci-

fied, load them onto the directory stack, replacing anything that was there, and push the current directory onto the stack.

-cc clear the directory stack.

-ll print directory names in full instead of using of using ~~

expressions.

-pp print directory entries one per line.

-vv number the directories in the stack when printing.

ddiissaabbllee [ -aaffmmrrss ] name ...

Temporarily disable the named hash table elements. The default is to disable builtin commands. This allows you to use an external command with the same name as a builtin command. The

-aa option causes ddiissaabbllee to act on regular or global aliases.

The -ss option causes ddiissaabbllee to act on suffix aliases. The -ff

option causes ddiissaabbllee to act on shell functions. The -rr options

causes ddiissaabbllee to act on reserved words. Without arguments all disabled hash table elements from the corresponding hash table

are printed. With the -mm flag the arguments are taken as pat-

terns (which should be quoted to prevent them from undergoing

filename expansion), and all hash table elements from the corre-

sponding hash table matching these patterns are disabled. Dis-

abled objects can be enabled with the eennaabbllee command. ddiissoowwnn [ job ... ] job ... &&|| job ... &&!! Remove the specified jobs from the job table; the shell will no longer report their status, and will not complain if you try to exit an interactive shell with them running or stopped. If no job is specified, disown the current job. If the jobs are currently stopped and the AAUUTTOOCCOONNTTIINNUUEE option is not set, a warning is printed containing information about how to make them running after they have been disowned. If one of the latter two forms is used, the jobs will automatically be made running, independent of the setting of the AAUUTTOOCCOONNTTIINNUUEE option.

eecchhoo [ -nneeEE ] [ arg ... ]

Write each arg on the standard output, with a space separating

each one. If the -nn flag is not present, print a newline at the

end. eecchhoo recognizes the following escape sequences: \\aa bell character \\bb backspace \\cc suppress final newline \\ee escape \\ff form feed \\nn linefeed (newline) \\rr carriage return \\tt horizontal tab \\vv vertical tab \\\\ backslash \\00NNN character code in octal \\xxNN character code in hexadecimal \\uuNNNN unicode character code in hexadecimal \\UUNNNNNNNN unicode character code in hexadecimal

The -EE flag, or the BBSSDDEECCHHOO option, can be used to disable

these escape sequences. In the latter case, -ee flag can be used

to enable them. eecchhoottcc See the section `The zsh/termcap Module' in zshmodules(1). eecchhoottii See the section `The zsh/terminfo Module' in zshmodules(1).

eemmuullaattee [ -LLRR ] {zzsshh|sshh|kksshh|ccsshh}

Set up zsh options to emulate the specified shell as much as possible. ccsshh will never be fully emulated. If the argument is not one of the shells listed above, zzsshh will be used as a default; more precisely, the tests performed on the argument are the same as those used to determine the emulation at startup

based on the shell name, see the section `Compatibility' in zsh-

misc(1) . If the -RR option is given, all options are reset to

their default value corresponding to the specified emulation mode, except for certain options describing the interactive environment; otherwise, only those options likely to cause portability problems in scripts and functions are altered. If

the -LL option is given, the options LLOOCCAALLOOPPTTIIOONNSS and

LLOOCCAALLTTRRAAPPSS will be set as well, causing the effects of the eemmuu-

llaattee command and any sseettoopptt and ttrraapp commands to be local to the immediately surrounding shell function, if any; normally these options are turned off in all emulation modes except kksshh.

eennaabbllee [ -aaffmmrrss ] name ...

Enable the named hash table elements, presumably disabled ear-

lier with ddiissaabbllee. The default is to enable builtin commands.

The -aa option causes eennaabbllee to act on regular or global aliases.

The -ss option causes eennaabbllee to act on suffix aliases. The -ff

option causes eennaabbllee to act on shell functions. The -rr option

causes eennaabbllee to act on reserved words. Without arguments all enabled hash table elements from the corresponding hash table

are printed. With the -mm flag the arguments are taken as pat-

terns (should be quoted) and all hash table elements from the corresponding hash table matching these patterns are enabled.

Enabled objects can be disabled with the ddiissaabbllee builtin com-

mand. eevvaall [ arg ... ]

Read the arguments as input to the shell and execute the result-

ing command in the current shell process. eexxeecc simple command See the section `Precommand Modifiers'. eexxiitt [ n ] Exit the shell with the exit code specified by n; if none is specified, use the exit code from the last command executed. An EOF condition will also cause the shell to exit, unless the IIGGNNOORREEEEOOFF option is set. eexxppoorrtt [ name[==value] ... ]

The specified names are marked for automatic export to the envi-

ronment of subsequently executed commands. Equivalent to ttyyppee-

sseett -ggxx. If a parameter specified does not already exist, it is

created in the global scope. ffaallssee [ arg ... ] Do nothing and return an exit code of 1.

ffcc [ -ee ename ] [ -nnllrrddDDffEEiimm ] [ old==new ... ] [ first [ last ] ]

ffcc -pp [ -aa ] [ filename [ histsize [ savehistsize ] ] ]

ffcc -PP

ffcc -AARRWWII [ filename ]

Select a range of commands from first to last from the history list. The arguments first and last may be specified as a number or as a string. A negative number is used as an offset to the current history event number. A string specifies the most recent event beginning with the given string. All substitutions old==new, if any, are then performed on the commands.

If the -ll flag is given, the resulting commands are listed on

standard output. If the -mm flag is also given the first argu-

ment is taken as a pattern (should be quoted) and only the his-

tory events matching this pattern will be shown. Otherwise the

editor program ename is invoked on a file containing these his-

tory events. If ename is not given, the value of the parameter

FFCCEEDDIITT is used. If ename is `-', no editor is invoked. When

editing is complete, the edited command is executed.

If first is not specified, it will be set to -1 (the most recent

event), or to -16 if the -ll flag is given. If last is not spec-

ified, it will be set to first, or to -1 if the -ll flag is

given.

The flag -rr reverses the order of the commands and the flag -nn

suppresses command numbers when listing. Also when listing, -dd

prints timestamps for each command, and -ff prints full time-date

stamps. Adding the -EE flag causes the dates to be printed as

`dd..mm..yyyy', instead of the default `mm//dd//yyyy'. Adding the

-ii flag causes the dates to be printed in ISO8601 `yyyy-mm-dd'

format. With the -DD flag, ffcc prints elapsed times.

`ffcc -pp' pushes the current history list onto a stack and

switches to a new history list. If the -aa option is also speci-

fied, this history list will be automatically popped when the

current function scope is exited, which is a much better solu-

tion than creating a trap function to call `ffcc -PP' manually. If

no arguments are specified, the history list is left empty,

$$HHIISSTTFFIILLEE is unset, and $$HHIISSTTSSIIZZEE & $$SSAAVVEEHHIISSTT are set to their

default values. If one argument is given, $$HHIISSTTFFIILLEE is set to

that filename, $$HHIISSTTSSIIZZEE & $$SSAAVVEEHHIISSTT are left unchanged, and the

history file is read in (if it exists) to initialize the new

list. If a second argument is specified, $$HHIISSTTSSIIZZEE & $$SSAAVVEEHHIISSTT

are instead set to the single specified numeric value. Finally,

if a third argument is specified, $$SSAAVVEEHHIISSTT is set to a separate

value from $$HHIISSTTSSIIZZEE. You are free to change these environment

values for the new history list however you desire in order to manipulate the new history list.

`ffcc -PP' pops the history list back to an older list saved by `ffcc

-pp'. The current list is saved to its $$HHIISSTTFFIILLEE before it is

destroyed (assuming that $$HHIISSTTFFIILLEE and $$SSAAVVEEHHIISSTT are set appro-

priately, of course). The values of $$HHIISSTTFFIILLEE, $$HHIISSTTSSIIZZEE, and

$$SSAAVVEEHHIISSTT are restored to the values they had when `ffcc -pp' was

called. Note that this restoration can conflict with making

these variables "local", so your best bet is to avoid local dec-

larations for these variables in functions that use `ffcc -pp'.

The one other guaranteed-safe combination is declaring these

variables to be local at the top of your function and using the

automatic option (-aa) with `ffcc -pp'. Finally, note that it is

legal to manually pop a push marked for automatic popping if you need to do so before the function exits.

`ffcc -RR' reads the history from the given file, `ffcc -WW' writes

the history out to the given file, and `ffcc -AA' appends the his-

tory out to the given file. If no filename is specified, the

$$HHIISSTTFFIILLEE is assumed. If the -II option is added to -RR, only

those events that are not already contained within the internal

history list are added. If the -II option is added to -AA or -WW,

only those events that are new since last incremental append/write to the history file are appended/written. In any

case, the created file will have no more than $$SSAAVVEEHHIISSTT entries.

ffgg [ job ... ] job ... Bring each specified job in turn to the foreground. If no job is specified, resume the current job.

ffllooaatt [ {++|-}EEFFHHgghhllpprrttuuxx ] [ -LLRRZZ [ n ]] [ name[==value] ... ]

Equivalent to ttyyppeesseett -EE, except that options irrelevant to

floating point numbers are not permitted.

ffuunnccttiioonnss [ {++|-}UUXXkkmmttuuzz ] [ name ... ]

Equivalent to ttyyppeesseett -ff.

ggeettccaapp See the section `The zsh/cap Module' in zshmodules(1).

ggeettllnn [ -AAccllnneeEE ] name ...

Read the top value from the buffer stack and put it in the shell

parameter nnaammee. Equivalent to rreeaadd -zzrr.

ggeettooppttss 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 letters that ggeettooppttss recognizes. If a letter is followed by a `::', that option is expected to have an argument. The options can be separated from the argument by blanks. Each time it is invoked, ggeettooppttss 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 OOPPTTIINNDD. The option argument, if any, is stored in OOPPTTAARRGG. The first option to be examined may be changed by explicitly assigning to OOPPTTIINNDD. OOPPTTIINNDD has an initial value of 11, and is normally reset to 11 upon exit from a shell function. OOPPTTAARRGG is not reset and retains its value from the most recent call to ggeettooppttss. If either of OOPPTTIINNDD or OOPPTTAARRGG 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 ggeettooppttss to store the letter of any invalid option in OOPPTTAARRGG, and to set name to `??' for an unknown option and to `::' when a required option is missing. Otherwise, ggeettooppttss sets name to `??' and prints an error message when an option is invalid. The exit status is nonzero when there are no more options.

hhaasshh [ -LLddffmmrrvv ] [ name[==value] ] ...

hhaasshh 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 PPAATTHH (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 -dd option; without the option

the command hash table is used, and with the option the named directory hash table is used.

Given no arguments, and neither the -rr or -ff options, the

selected hash table will be listed in full.

The -rr option causes the selected hash table to be emptied. It

will be subsequently rebuilt in the normal fashion. The -ff

option causes the selected hash table to be fully rebuilt imme-

diately. For the command hash table this hashes all the abso-

lute directories in the PPAATTHH, and for the named directory hash table this adds all users' home directories. These two options cannot be used with any arguments.

The -mm 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 selected 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 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 to the hash table, checking what the appropriate vvaalluuee is in the normal manner for that hash table. If an appropriate vvaalluuee can't be found, then the hash table will be unchanged.

The -vv option causes hash table entries to be listed as they are

added by explicit specification. If has no effect if used with

-ff.

If the -LL flag is present, then each hash table entry is printed

in the form of a call to hash. hhiissttoorryy

Same as ffcc -ll.

iinntteeggeerr [ {++|-}HHgghhiillpprrttuuxx ] [ -LLRRZZ [ n ]] [ name[==value] ... ]

Equivalent to ttyyppeesseett -ii, except that options irrelevant to

integers are not permitted.

jjoobbss [ -ddllpprrss ] [ job ... ]

jjoobbss -ZZ string

Lists information about each given job, or all jobs if job is

omitted. The -ll flag lists process IDs, and the -pp flag lists

process groups. If the -rr flag is specified only running jobs

will be listed and if the -ss flag is given only stopped jobs are

shown. If the -dd 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 -ZZ option replaces the shell's argument and environment

space with the given string, truncated if necessary to fit.

This will normally be visible in ppss (ps(1)) listings. This fea-

ture is typically used by daemons, to indicate their state.

kkiillll [ -ss signalname | -nn signalnumber | -sig ] job ...

kkiillll -ll [ sig ... ]

Sends either SSIIGGTTEERRMM or the specified signal to the given jobs or processes. Signals are given by number or by names, with or without the `SSIIGG' prefix. If the signal being sent is not `KKIILLLL' or `CCOONNTT', then the job will be sent a `CCOONNTT' 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, kkiillll -ll, 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 signal the name of the signal is printed. On some systems, alternative signal names are allowed for a few signals. Typical examples are SSIIGGCCHHLLDD and SSIIGGCCLLDD or SSIIGGPPOOLLLL and SSIIGGIIOO, assuming they correspond to the same signal number. kkiillll

-ll will only list the preferred form, however kkiillll -ll alt will

show if the alternative form corresponds to a signal number.

For example, under Linux kkiillll -ll IIOO and kkiillll -ll PPOOLLLL both output

29, hence kkiillll -IIOO and kkiillll -PPOOLLLL have the same effect.

lleett arg ... Evaluate each arg as an arithmetic expression. See the section

`Arithmetic Evaluation' for a description of arithmetic expres-

sions. The exit status is 0 if the value of the last expression is nonzero, and 1 otherwise.

lliimmiitt [ -hhss ] [ resource [ limit ] ] ...

Set or display resource limits. Unless the -ss flag is given,

the limit applies only the children of the shell. If -ss 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 resource, otherwise set the limit to the specified value. If

the -hh 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

fails to set a limit for some other reason it will continue try-

ing to set the remaining limits. resource can be one of: aaddddrreessssssppaaccee Maximum amount of address space used. aaiioommeemmoorryylloocckkeedd

Maximum amount of memory locked in RAM for AIO opera-

tions. aaiiooooppeerraattiioonnss Maximum number of AIO operations. ccaacchheeddtthhrreeaaddss Maximum number of cached threads. ccoorreedduummppssiizzee Maximum size of a core dump. ccppuuttiimmee Maximum CPU seconds per process. ddaattaassiizzee Maximum data size (including stack) for each process. ddeessccrriippttoorrss Maximum value for a file descriptor. ffiilleessiizzee Largest single file allowed. mmaaxxpprroocc Maximum number of processes. mmaaxxpptthhrreeaaddss Maximum number of threads per process. mmeemmoorryylloocckkeedd Maximum amount of memory locked in RAM. mmeemmoorryyuussee Maximum resident set size. rreessiiddeenntt Maximum resident set size. ssoocckkbbuuffssiizzee Maximum size of all socket buffers. ssttaacckkssiizzee Maximum stack size for each process. vvmmeemmoorryyssiizzee Maximum amount of virtual memory.

Which of these resource limits are available depends on the sys-

tem. resource can be abbreviated to any unambiguous prefix. It can also be an integer, which corresponds to the integer defined 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 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 -ss option is

present. limit is a number, with an optional scaling factor, as follows: nhh hours nkk kilobytes (default) nmm megabytes or minutes [mm::]ss minutes and seconds

llooccaall [ {++|-}AAEEFFHHUUaahhllpprrttuuxx ] [ -LLRRZZii [ n ]] [ name[==value] ] ...

Same as ttyyppeesseett, except that the options -gg, and -ff are not per-

mitted. In this case the -xx option does not force the use of

-gg, i.e. exported variables will be local to functions.

lloogg List all users currently logged in who are affected by the cur-

rent setting of the wwaattcchh parameter. llooggoouutt [ n ] Same as eexxiitt, except that it only works in a login shell. nnoogglloobb simple command See the section `Precommand Modifiers'.

ppooppdd [ {++|-}n ]

Remove an entry from the directory stack, and perform a ccdd to the new top directory. With no argument, the current top entry is removed. An argument of the form `++n' identifies a stack entry by counting from the left of the list shown by the ddiirrss

command, starting with zero. An argument of the form -nn counts

from the right. If the PPUUSSHHDDMMIINNUUSS option is set, the meanings

of `++' and `-' in this context are swapped.

pprriinntt [ -aabbccDDiillmmnnNNooOOppPPrrsszz ] [ -uu n ] [ -ff format ] [ -CC cols ]

[ -RR [ -eenn ]] [ arg ... ]

With the `-ff' option the arguments are printed as described by

pprriinnttff. With no flags or with the flag `-', the arguments are

printed on the standard output as described by eecchhoo, with the

following differences: the escape sequence `\\MM-x' metafies the

character x (sets the highest bit), `\\CC-x' produces a control

character (`\\CC-@@' and `\\CC-??' give the characters NUL and

delete), and `\\EE' is a synonym for `\\ee'. Finally, if not in an escape sequence, `\\' escapes the following character and is not printed.

-aa Print arguments with the column incrementing first. Only

useful with the -cc and -CC options.

-bb Recognize all the escape sequences defined for the bbiinndd-

kkeeyy command, see zshzle(1).

-cc Print the arguments in columns. Unless -aa is also given,

arguments are printed with the row incrementing first.

-CC cols

Print the arguments in cols columns. Unless -aa is also

given, arguments are printed with the row incrementing first.

-DD Treat the arguments as directory names, replacing pre-

fixes with ~~ expressions, as appropriate.

-ii If given together with -oo or -OO, sorting is performed

case-independently.

-ll Print the arguments separated by newlines instead of spa-

ces.

-mm 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.

-nn Do not add a newline to the output.

-NN Print the arguments separated and terminated by nulls.

-oo Print the arguments sorted in ascending order.

-OO Print the arguments sorted in descending order.

-pp Print the arguments to the input of the coprocess.

-PP Perform prompt expansion (see zshmisc(1)).

-rr Ignore the escape conventions of eecchhoo.

-RR Emulate the BSD eecchhoo command, which does not process

escape sequences unless the -ee flag is given. The -nn

flag suppresses the trailing newline. Only the -ee and -nn

flags are recognized after -RR; all other arguments and

options are printed.

-ss Place the results in the history list instead of on the

standard output.

-uu n Print the arguments to file descriptor n.

-zz Push the arguments onto the editing buffer stack, sepa-

rated by spaces.

If any of `-mm', `-oo' or `-OO' are used in combination with `-ff'

and there are no arguments (after the removal process in the

case of `-mm') then nothing is printed.

pprriinnttff format [ arg ... ]

Print the arguments according to the format specification. For-

matting rules are the same as used in C. The same escape

sequences as for eecchhoo are recognised in the format. All C con-

version specifications ending in one of csdiouxXeEfgGn are han-

dled. In addition to this, `%%bb' can be used instead of `%%ss' to

cause escape sequences in the argument to be recognised and `%%qq'

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' for a

description of arithmetic expressions. With `%%nn', the corre-

sponding 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 be subject to future change. If arguments remain unused after formatting, the format string is reused until all arguments have been consumed. With the pprriinntt

builtin, this can be suppressed by using the -rr 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.

ppuusshhdd [ -ssLLPP ] [ arg ]

ppuusshhdd [ -ssLLPP ] old new

ppuusshhdd [ -ssLLPP ] {++|-}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 $$HHOOMMEE if the PPUUSSHHDDTTOOHHOOMMEE option is set or if

there is only one entry on the stack. Otherwise, arg is inter-

preted as it would be by ccdd. The meaning of old and new in the second form is also the same as for ccdd.

The third form of ppuusshhdd changes directory by rotating the direc-

tory list. An argument of the form `++n' identifies a stack entry by counting from the left of the list shown by the ddiirrss

command, starting with zero. An argument of the form `-n'

counts from the right. If the PPUUSSHHDDMMIINNUUSS option is set, the

meanings of `++' and `-' in this context are swapped.

If the option PPUUSSHHDDSSIILLEENNTT is not set, the directory stack will be printed after a ppuusshhdd is performed.

The options -ss, -LL and -PP have the same meanings as for the ccdd

builtin. ppuusshhllnn [ arg ... ]

Equivalent to pprriinntt -nnzz.

ppwwdd [ -rrLLPP ]

Print the absolute pathname of the current working directory.

If the -rr or the -PP flag is specified, or the CCHHAASSEELLIINNKKSS option

is set and the -LL flag is not given, the printed path will not

contain symbolic links.

rr Same as ffcc -ee -.

rreeaadd [ -rrsszzppqqAAccllnneeEE ] [ -tt [ num ] ] [ -kk [ num ] ] [ -dd delim ]

[ -uu n ] [ name[??prompt] ] [ name ... ]

Read one line and break it into fields using the characters in

$$IIFFSS 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 is omitted then RREEPPLLYY is used for scalars and rreeppllyy for arrays.

-rr 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.

-ss Don't echo back characters if reading from the terminal.

Currently does not work with the -qq option.

-qq Read only one character from the terminal and set name to

`yy' if this character was `yy' or `YY' and to `nn' other-

wise. With this flag set the return value is zero only if the character was `yy' or `YY'. Note that this always

reads from the terminal, even if used with the -pp or -uu

or -zz flags or with redirected input. This option may

also be used within zle widgets.

-kk [ num ]

Read only one (or num) characters. All are assigned to the first name, without word splitting. This flag is

ignored when -qq is present. Input is read from the ter-

minal unless one of -uu or -pp is present. This option may

also be used within zle widgets.

-zz 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 `pprriinntt -zz' or with ppuusshh-lliinnee

from the line editor (see zshzle(1)). This flag is

ignored when the -kk or -qq flags are present.

-ee

-EE The input read is printed (echoed) to the standard out-

put. If the -ee flag is used, no input is assigned to the

parameters.

-AA The first name is taken as the name of an array and all

words are assigned to it.

-cc

-ll These flags are allowed only if called inside a function

used for completion (specified with the -KK flag to ccoomm-

ppccttll). If the -cc flag is given, the words of the current

command are read. If the -ll flag is given, the whole line

is assigned as a scalar. If both flags are present, -ll

is used and -cc is ignored.

-nn Together with -cc, the number of the word the cursor is on

is read. With -ll, 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 plus one.

-uu n Input is read from file descriptor n.

-pp Input is read from the coprocess.

-dd delim

Input is terminated by the first character of delim instead of by newline.

-tt [ 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 floating point number; in this case the read times out if input is not available within this time. If num is not present, it is taken to be zero, so that rreeaadd returns immediately 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 -zz, when called from within completion with

-cc or -ll, with -qq 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 `rreeaadd

-tt' will not read anything until an entire line has been

typed. However, when reading from the terminal with -kk

input is processed one key at a time; in this case, only availability of the first character is tested, so that

e.g. `rreeaadd -tt -kk 22' can still block on the second charac-

ter. Use two instances of `rreeaadd -tt -kk' if this is not

what is wanted. If the first argument contains a `??',

the remainder of this word is used as a prompt on stan-

dard error when the shell is interactive.

The value (exit status) of rreeaadd is 1 when an end-of-file is

encountered, or when -cc or -ll is present and the command is not

called from a ccoommppccttll function, or as described for -qq. Other-

wise the value is 0.

The behavior of some combinations of the -kk, -pp, -qq, -uu and -zz

flags is undefined. Presently -qq cancels all the others, -pp

cancels -uu, -kk cancels -zz, and otherwise -zz cancels both -pp and

-uu.

The -cc or -ll flags cancel any and all of -kkppqquuzz.

rreeaaddoonnllyy

Same as ttyyppeesseett -rr.

rreehhaasshh Same as hhaasshh -rr.

rreettuurrnn [ n ] Causes a shell function or .. script to return to the invoking script with the return status specified by n. If n is omitted, the return status is that of the last command executed. If rreettuurrnn was executed from a trap in a TTRRAAPPNAL 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 `rreettuurrnn

$$((((112288++$$11))))' will return the same status as if the signal had

not been trapped. sscchheedd See the section `The zsh/sched Module' in zshmodules(1).

sseett [ {++|-}options | {++|-}oo [ optionname ] ] ... [ {++|-}AA [ name ] ] [

arg ... ]

Set the options for the shell and/or set the positional parame-

ters, or declare and set an array. If the -ss option is given,

it causes the specified arguments to be sorted before assigning

them to the positional parameters (or to the array name if -AA is

used). With ++ss sort arguments in descending order. For the meaning of the other flags, see zshoptions(1). Flags may be

specified by name using the -oo option. If no option name is sup-

plied with -oo, the current option states are printed. With ++oo

they are printed in a form that can be used as input to the shell.

If the -AA 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 ++AA is used and name is an array, the given arguments will

replace the initial elements of that array; if no name is speci-

fied, all arrays are printed without their values.

The behaviour of arguments after -AA name or ++AA name depends on

whether the option KKSSHHAARRRRAAYYSS is set. If it is not set, all arguments following name are treated as values for the array, regardless 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

sseett -AA aarrrraayy -xx -- ffoooo

sets aarrrraayy to `-xx -- ffoooo' if KKSSHHAARRRRAAYYSS is not set, but sets the

array to ffoooo and turns on the option `-xx' if it is set.

If the -AA 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 only argument is `++', the names of all parameters are printed. sseettccaapp See the section `The zsh/cap Module' in zshmodules(1).

sseettoopptt [ {++|-}options | {++|-}oo optionname ] [ name ... ]

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. If the -mm

flag is given the arguments are taken as patterns (which should be quoted to protect them from filename expansion), and all options with names matching these patterns are set. sshhiifftt [ n ] [ name ... ]

The positional parameters $${{n+1}} ... are renamed to $$11 ...,

where n is an arithmetic expression that defaults to 1. If any names are given then the arrays with these names are shifted instead of the positional parameters. ssoouurrccee file [ arg ... ] Same as .., except that the current directory is always searched

and is always searched first, before directories in $$ppaatthh.

ssttaatt See the section `The zsh/stat Module' in zshmodules(1).

ssuussppeenndd [ -ff ]

Suspend the execution of the shell (send it a SSIIGGTTSSTTPP) until it

receives a SSIIGGCCOONNTT. Unless the -ff option is given, this will

refuse to suspend a login shell. tteesstt [ arg ... ] [[ [ arg ... ] ]] Like the system version of tteesstt. Added for compatibility; use conditional expressions instead (see the section `Conditional Expressions'). The main differences between the conditional

expression syntax and the tteesstt and [[ builtins are: these com-

mands 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 arithemetic expressions. ttiimmeess Print the accumulated user and system times for the shell and for processes run from the shell. ttrraapp [ 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 sig. Each sig can be given as a number or as

the name of a signal. If arg is `-', then all traps sig are

reset to their default values. If arg is the empty string, then this signal is ignored by the shell and by the commands it invokes. If sig is ZZEERRRR then arg will be executed after each command with

a nonzero exit status. If sig is DDEEBBUUGG then arg will be exe-

cuted after each command. If sig is 00 or EEXXIITT and the ttrraapp statement is executed inside the body of a function, then the command arg is executed after the function completes. If sig is 00 or EEXXIITT and the ttrraapp statement is not executed inside the body of a function, then the command arg is executed when the shell terminates. ZZEERRRR, DDEEBBUUGG and EEXXIITT traps are not executed inside other traps. The ttrraapp command with no arguments prints a list of commands associated with each signal.

Note that traps defined with the ttrraapp builtin are slightly dif-

ferent from those defined as `TTRRAAPPNAL () { ... }', as the latter

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,

ttrraapp ''pprriinntt $$LLIINNEENNOO'' DDEEBBUUGG

will print the line number of a command executed after it has run, while

TTRRAAPPDDEEBBUUGG(()) {{ pprriinntt $$LLIINNEENNOO;; }}

will always print the number zero. Alternative signal names are allowed as described under kkiillll 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 another. ttrruuee [ arg ... ] Do nothing and return an exit code of 0.

ttttyyccttll -ffuu

The -ff option freezes the tty, and -uu 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 shell will simply reset the settings to

their previous values as soon as each command exits or is sus-

pended. Thus, ssttttyy and similar programs have no effect when the tty is frozen. Without options it reports whether the terminal is frozen or not.

ttyyppee [ -wwffppaammss ] name ...

Equivalent to wwhheennccee -vv.

ttyyppeesseett [ {++|-}AAEEFFHHUUaaffgghhkkllpprrttuuxxmmzz ] [ -LLRRZZii [ n ]] [ name[==value] ... ]

ttyyppeesseett -T [ {++||-}}UUrruuxx ]] [[ -LLRRZZ [[ n ]]]] SCALAR[[==value]] array [[ sep ]]

Set or display attributes and values for shell parameters. A parameter is created for each name that does not already refer to one. When inside a function, a new parameter is created for every name (even those that already exist), and is unset again

when the function completes. See `Local Parameters' in zsh-

param(1). The same rules apply to special shell parameters, which retain their special attributes when made local. For each name==value assignment, the parameter name is set to value. Note that arrays currently cannot be assigned in ttyyppeesseett expressions, only scalars and integers.

If the shell option TTYYPPEESSEETTSSIILLEENNTT is not set, for each remain-

ing name that refers to a parameter that is 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 turns it off.

If the -pp option is given, parameters and values are printed in

the form of a typeset comand and an assignment (which will be

printed separately for arrays and associative arrays), regard-

less of other flags and options. Note that the -hh flag on

parameters is respected; no value will be shown for these param-

eters.

If the -TT option is given, two or three arguments must be

present (an exception is that zero arguments are allowed to show the list of parameters created in this fashion). The first two are the name of a scalar and an array parameter (in that order)

that will be tied together in the manner of $$PPAATTHH and $$ppaatthh.

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 with $$PPAATTHH. Only the

first character of the separator is significant; any remaining characters are ignored. Only the scalar parameter may be assigned an initial value. Both the scalar and the array may otherwise be manipulated as normal. If one is unset, the other will automatically be unset too. There is no way of untying the variables without unsetting them, or converting the type of one

of them with another ttyyppeesseett command; ++TT does not work, assign-

ing an array to SCALAR is an error, and assigning a scalar to

array sets it to be a single-element array. Note that both

`ttyyppeesseett -xxTT ......' and `eexxppoorrtt -TT ......' 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).

The -gg (global) flag is treated specially: it means that any

resulting parameter will not be restricted to local scope. Note that this does not necessarily mean that the parameter will be global, as the flag will apply to any existing parameter (even if unset) from an enclosing function. This flag does not affect

the parameter after creation, hence it has no effect when list-

ing existing parameters, nor does the flag ++gg have any effect

except in combination with -mm (see below).

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

attributes, and using `++' rather than `-' to introduce the flag

suppresses printing of the values of parameters when there is no parameter name. Also, if the last option is the word `++', then names are printed but values are not.

If the -mm flag is given the name arguments are taken as patterns

(which should be quoted). With no attribute flags, all parame-

ters (or functions with the -ff flag) with matching names are

printed (the shell option TTYYPPEESSEETTSSIILLEENNTT is not used in this

case). Note that -mm is ignored if no patterns are given. If

the ++gg flag is combined with -mm, a new local parameter is cre-

ated for every matching parameter that is not already local.

Otherwise -mm applies all other flags or assignments to the

existing parameters. Except when assignments are made with name==value, using ++mm forces the matching parameters to be printed, even inside a function.

If no attribute flags are given and either no -mm flag is present

or the ++mm form was used, each parameter name printed is preceded

by a list of the attributes of that parameter (aarrrraayy, aassssoocciiaa-

ttiioonn, eexxppoorrtteedd, iinntteeggeerr, rreeaaddoonnllyy). If ++mm is used with attribute flags, and all those flags are introduced with ++, the matching parameter names are printed but their values are not. The following attribute flags may be specified:

-AA The names refer to associative array parameters; see

`Array Parameters' in zshparam(1).

-LL Left justify and remove leading blanks from value. If n

is nonzero, it defines the width of the field. If n is zero, the width is determined by the width of the value

of the first assignment. In the case of numeric parame-

ters, the length of the complete value assigned to the parameter is used to determine the width, not the value that would be output. When the parameter is expanded, it

is filled on the right with blanks or truncated if neces-

sary to fit the field. Note truncation can lead to unex-

pected results with numeric parameters. Leading zeros

are removed if the -ZZ flag is also set.

-RR Similar to -LL, 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 -ZZ flag.

-UU For arrays (but not for associative arrays), keep only

the first occurrence of each duplicated value. This may

also be set for colon-separated special parameters like

PPAATTHH or FFIIGGNNOORREE, etc. This flag has a different meaning

when used with -ff; see below.

-ZZ Specially handled if set along with the -LL flag. Other-

wise, similar to -RR, 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 zeroes, and the zeroes are inserted at an appropriate place in the output.

-aa The names refer to array parameters. An array parameter

may be created this way, but it may not be assigned to in the ttyyppeesseett statement. When displaying, both normal and associative arrays are shown.

-ff The names refer to functions rather than parameters. No

assignments can be made, and the only other valid flags

are -tt, -kk, -uu, -UU and -zz. The flag -tt turns on execu-

tion tracing for this function. The -uu and -UU flags

cause the function to be marked for autoloading; -UU also

causes alias expansion to be suppressed when the function is loaded. The ffppaatthh parameter will be searched to find

the function definition when the function is first refer-

enced; see the section `Functions'. The -kk and -zz flags

make the function be loaded using ksh-style or zsh-style

autoloading respectively. If neither is given, the set-

ting of the KSHAUTOLOAD option determines how the func-

tion is loaded.

-hh Hide: only useful for special parameters (those marked

`' in the table in zshparams(1)), and for local param-

eters with the same name as a special parameter, though harmless for others. A special parameter with this attribute will not retain its special effect when made

local. Thus after `ttyyppeesseett -hh PPAATTHH', a function contain-

ing `ttyyppeesseett PPAATTHH' will create an ordinary local parame-

ter without the usual behaviour of PPAATTHH. Alternatively, the local parameter may itself be given this attribute;

hence inside a function `ttyyppeesseett -hh PPAATTHH' creates an

ordinary local parameter and the special PPAATTHH parameter is not altered in any way. It is also possible to create a local parameter using `ttyyppeesseett ++hh special', where the local copy of special will retain its special properties

regardless of having the -hh attribute. Global special

parameters loaded from shell modules (currently those in zzsshh//mmaappffiillee and zzsshh//ppaarraammeetteerr) are automatically given

the -hh attribute to avoid name clashes.

-HH Hide value: specifies that ttyyppeesseett 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 normal, and the option does not apply if the parameter is

specified by name, or by pattern with the -mm option.

This is on by default for the parameters in the zzsshh//ppaarraammeetteerr and zzsshh//mmaappffiillee modules. Note, however,

that unlike the -hh flag this is also useful for non-spe-

cial parameters.

-ii Use an internal integer representation. If n is nonzero

it defines the output arithmetic base, otherwise it is determined by the first assignment.

-EE 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 of significant figures to display; the default is ten.

-FF Use an internal double-precision floating point represen-

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 default is ten.

-ll Convert the result to lower case whenever the parameter

is expanded. The value is not converted when assigned.

-rr 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.

-tt Tags the named parameters. Tags have no special meaning

to the shell. This flag has a different meaning when

used with -ff; see above.

-uu 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 -ff; see

above.

-xx Mark for automatic export to the environment of subse-

quently executed commands. If the option GGLLOOBBAALLEEXXPPOORRTT

is set, this implies the option -gg, unless ++gg is also

explicitly given; in other words the parameter is not

made local to the enclosing function. This is for com-

patibility with previous versions of zsh.

uulliimmiitt [ [ -SSHHaaccddffllmmnnppssttvv | -NN resource [ limit ] ... ]

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 the value `uunnlliimmiitteedd'. By default, only

soft limits are manipulated. If the -HH flag is given use hard

limits instead of soft limits. If the -SS flag is given together

with the -HH flag set both hard and soft limits. If no options

are used, the file size limit (-ff) is assumed. If limit is

omitted the current value of the specified resources are printed. When more than one resource values are 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

fails to set a limit for some other reson it will continue try-

ing to set the remaining limits.

-aa Lists all of the current resource limits.

-cc 512-byte blocks on the size of core dumps.

-dd K-bytes on the size of the data segment.

-ff 512-byte blocks on the size of files written.

-ll K-bytes on the size of locked-in memory.

-mm K-bytes on the size of physical memory.

-nn open file descriptors.

-ss K-bytes on the size of the stack.

-tt CPU seconds to be used.

-uu processes available to the user.

-vv K-bytes on the size of virtual memory. On some systems

this refers to the limit called `address space'.

A resource may also be specified by integer in the form `-NN

resource', 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 `uulliimmiitt -aa'.

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.

uummaasskk [ -SS ] [ mask ]

The umask is set to mask. mask can be either an octal number or a symbolic value as described in chmod(1). If mask is omitted,

the current value is printed. The -SS 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 permis-

sions you specify are those which are to be allowed (not denied) to the users specified. uunnaalliiaass

Same as uunnhhaasshh -aa.

uunnffuunnccttiioonn

Same as uunnhhaasshh -ff.

uunnhhaasshh [ -aaddffmmss ] name ...

Remove the element named name from an internal hash table. The

default is remove elements from the command hash table. The -aa

option causes uunnhhaasshh to remove regular or global aliases. The

-ss option causes uunnhhaasshh to remove suffix aliases. The -ff option

causes uunnhhaasshh to remove shell functions. The -dd options causes

uunnhhaasshh to remove named directories. If the -mm flag is given the

arguments are taken as patterns (should be quoted) and all ele-

ments of the corresponding hash table with matching names will be removed.

uunnlliimmiitt [ -hhss ] resource ...

The resource limit for each resource is set to the hard limit.

If the -hh 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 -ss

flag is given.

uunnsseett [ -ffmmvv ] name ...

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 nnoogglloobb) to protect the sub-

script from filename generation.

If the -mm 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 pattern.

The -vv flag specifies that name refers to parameters. This is

the default behaviour.

uunnsseett -ff is equivalent to uunnffuunnccttiioonn.

uunnsseettoopptt [ {++|-}options | {++|-}oo optionname ] [ name ... ]

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 -mm

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. vvaarreedd See the section `Zle Builtins' in zshzle(1). wwaaiitt [ job ... ] 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 the job waited for.

wwhheennccee [ -vvccwwffppaammss ] name ...

For each name, indicate how it would be interpreted if used as a command name.

-vv Produce a more verbose report.

-cc Print the results in a ccsshh-like format. This takes

precedence over -vv.

-ww For each name, print `name:: word' where word is one of

aalliiaass, bbuuiillttiinn, ccoommmmaanndd, ffuunnccttiioonn, hhaasshheedd, rreesseerrvveedd or nnoonnee, according as name corresponds to an alias, a

built-in command, an external command, a shell function,

a command defined with the hhaasshh builtin, a reserved word,

or is not recognised. This takes precedence over -vv and

-cc.

-ff Causes the contents of a shell function to be displayed,

which would otherwise not happen unless the -cc flag were

used.

-pp Do a path search for name even if it is an alias,

reserved word, shell function or builtin.

-aa Do a search for all occurrences of name throughout the

command path. Normally only the first occurrence is printed.

-mm The arguments are taken as patterns (should be quoted),

and the information is displayed for each command match-

ing one of these patterns.

-ss If a pathname contains symlinks, print the symlink-free

pathname as well.

wwhheerree [ -wwppmmss ] name ...

Equivalent to wwhheennccee -ccaa.

wwhhiicchh [ -wwppaammss ] name ...

Equivalent to wwhheennccee -cc.

zzccoommppiillee [ -UU ] [ -zz | -kk ] [ -RR | -MM ] file [ name ... ]

zzccoommppiillee -ccaa [ -mm ] [ -RR | -MM ] file [ name ... ]

zzccoommppiillee -tt 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 autoloading of functions and execution of scripts by avoiding parsing of the text when the files are read.

The first form (without the -cc, -aa or -tt options) creates a com-

piled file. If only the file argument is given, the output file has the name `file..zzwwcc' 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

the section `Autoloading Functions' in zshfunc(1) for a descrip-

tion of how autoloaded functions are searched. The extension ..zzwwcc 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 ..zzwwcc, this extension is automatically appended. Files containing multiple compiled functions are called `digest' files, and are intended to be used as elements of the FFPPAATTHH/ffppaatthh special array.

The second form, with the -cc or -aa options, writes the compiled

definitions for all the named functions into file. For -cc, 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 -aa option, in

which case the ffppaatthh is searched and the contents of the defini-

tion files for those functions, if found, are compiled into

file. If both -cc and -aa are given, names of both defined func-

tions and functions marked for autoloading may be given. In

either case, the functions in files written with the -cc or -aa

option will be autoloaded as if the KKSSHHAAUUTTOOLLOOAADD option were unset.

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 `zzccoommppiillee -cc' does not include the addi-

tional functions defined in the file, and any other initializa-

tion code in the file is lost. Using `zzccoommppiillee -aa' captures all

this extra information.

If the -mm option is combined with -cc or -aa, 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.

The third form, with the -tt 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 the file will be used (i.e. by reading it directly or by mapping it into memory). With arguments, nothing is output and the return value 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:

-UU Aliases are not expanded when compiling the named files.

-RR When the compiled file is read, its contents are copied

into the shell's memory, rather than memory-mapped (see

-MM). 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-

quently wasting memory.

-MM 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 -RR nor -MM is given, the zzccoommppiillee

builtin decides what to do based on the size of the com-

piled file.

-kk

-zz These options are used when the compiled file contains

functions which are to be autoloaded. If -zz is given, the

function will be autoloaded as if the KKSSHHAAUUTTOOLLOOAADD option is not set, even if it is set at the time the compiled

file is read, while if the -kk is given, the function will

be loaded as if KKSSHHAAUUTTOOLLOOAADD is set. These options also

take precedence over any -kk or -zz options specified to

the aauuttoollooaadd builtin. If neither of these options is given, the function will be loaded as determined by the

setting of the KKSSHHAAUUTTOOLLOOAADD 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

all following functions, up to the next -kk or -zz.

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

compiled file is machine independent and if it is read or mapped, only one half of the file is actually used (and mapped). zzffoorrmmaatt See the section `The zsh/zutil Module' in zshmodules(1). zzffttpp See the section `The zsh/zftp Module' in zshmodules(1). zzllee See the section `Zle Builtins' in zshzle(1).

zzmmooddllooaadd [ -ddLL ] [ ... ]

zzmmooddllooaadd -ee [ -AA ] [ ... ]

zzmmooddllooaadd [ -aa [ -bbccppff [ -II ] ] ] [ -iiLL ] ...

zzmmooddllooaadd -uu [ -aabbccddppff [ -II ] ] [ -iiLL ] ...

zzmmooddllooaadd -AA [ -LL ] [ modalias[==module] ... ]

zzmmooddllooaadd -RR 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 zzmmooddllooaadd command itself is always available and can be used to manipulate modules built into versions of the shell executable without dynamical loading.

Without arguments the names of all currently loaded binary mod-

ules are printed. The -LL option causes this list to be in the

form of a series of zzmmooddllooaadd commands. Forms with arguments are:

zzmmooddllooaadd [ -ii ] name ...

zzmmooddllooaadd -uu [ -ii ] name ...

In the simplest case, zzmmooddllooaadd 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 `..ssoo' (`..ssll' on HPUX). If the module to be loaded is

already loaded and the -ii option is given, the duplicate

module is ignored. Otherwise zzmmooddllooaadd prints an error message.

The named module is searched for in the same way a com-

mand is, using $$mmoodduulleeppaatthh instead of $$ppaatthh. 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.

With -uu, zzmmooddllooaadd unloads modules. The same name must be

given that was given when the module was loaded, but it

is not necessary for the module to exist in the filesys-

tem. The -ii 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-

ule will not be loaded if its boot function fails. Simi-

larly a module can only be unloaded if its cleanup func-

tion runs successfully.

zzmmooddllooaadd -dd [ -LL ] [ name ]

zzmmooddllooaadd -dd name dep ...

zzmmooddllooaadd -uudd name [ dep ... ]

The -dd option can be used to specify module dependencies.

The modules named in the second and subsequent arguments

will be loaded before the module named in the first argu-

ment.

With -dd and one argument, all dependencies for that mod-

ule are listed. With -dd and no arguments, all module

dependencies are listed. This listing is by default in a

Makefile-like format. The -LL option changes this format

to a list of zzmmooddllooaadd -dd commands.

If -dd and -uu are both used, dependencies are removed. If

only one argument is given, all dependencies for that module are removed.

zzmmooddllooaadd -aabb [ -LL ]

zzmmooddllooaadd -aabb [ -ii ] name [ builtin ... ]

zzmmooddllooaadd -uubb [ -ii ] builtin ...

The -aabb 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. If only the name is given, one builtin is

defined, with the same name as the module. -ii suppresses

the error if the builtin is already defined or autoloaded, regardless of which module it came from.

With -aabb and no arguments, all autoloaded builtins are

listed, with the module name (if different) shown in

parentheses after the builtin name. The -LL option

changes this format to a list of zzmmooddllooaadd -aa commands.

If -bb is used together with the -uu option, it removes

builtins previously defined with -aabb. This is only pos-

sible if the builtin is not yet loaded. -ii suppresses

the error if the builtin is already removed (or never existed).

zzmmooddllooaadd -aacc [ -IILL ]

zzmmooddllooaadd -aacc [ -iiII ] name [ cond ... ]

zzmmooddllooaadd -uucc [ -iiII ] cond ...

The -aacc option is used to define autoloaded condition

codes. The cond strings give the names of the conditions

defined by the module. The optional -II 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 zzmmooddllooaadd commands if the -LL option is

given).

The -uucc option removes definitions for autoloaded condi-

tions.

zzmmooddllooaadd -aapp [ -LL ]

zzmmooddllooaadd -aapp [ -ii ] name [ parameter ... ]

zzmmooddllooaadd -uupp [ -ii ] parameter ...

The -pp option is like the -bb and -cc options, but makes

zzmmooddllooaadd work on autoloaded parameters instead.

zzmmooddllooaadd -aaff [ -LL ]

zzmmooddllooaadd -aaff [ -ii ] name [ function ... ]

zzmmooddllooaadd -uuff [ -ii ] function ...

The -ff option is like the -bb, -pp, and -cc options, but

makes zzmmooddllooaadd work on autoloaded math functions instead.

zzmmooddllooaadd -aa [ -LL ]

zzmmooddllooaadd -aa [ -ii ] name [ builtin ... ]

zzmmooddllooaadd -uuaa [ -ii ] builtin ...

Equivalent to -aabb and -uubb.

zzmmooddllooaadd -ee [ -AA ] [ string ... ]

The -ee option without arguments lists all loaded modules;

if the -AA option is also given, module aliases corre-

sponding to loaded modules are also shown. With argu-

ments only 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 avail-

ability of things implemented by modules. In this case,

any aliases are automatically resolved and the -AA flag is

not used.

zzmmooddllooaadd -AA [ -LL ] [ 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, either via a call to zzmmooddllooaadd or implicitly, the shell will 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 list-

ing, if the -LL flag was also given, list the definition

as a zzmmooddllooaadd 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 effect as using the resolved name, and does not affect the connection between the alias and the resolved name

which can be removed either by zzmmooddllooaadd -RR or by redefin-

ing 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 example, `aannyy//oolldd//aalliiaass' is always a valid alias. Dependencies added to aliased modules are actually added to the resolved module; these remain if the alias is removed. 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 module in its own right. Apart from the above, aliases can be used in the zzmmooddllooaadd command anywhere module names are required. However, aliases will not be shown in lists of loaded modules with a bare `zzmmooddllooaadd'.

zzmmooddllooaadd -RR modalias ...

For each modalias argument that was previously defined as

a module alias via zzmmooddllooaadd -AA, delete the alias. If any

was not defined, an error is caused and the remainder of the line is ignored. Note that zzsshh 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 even for systems that don't support dynamic loading of modules. zzppaarrsseeooppttss See the section `The zsh/zutil Module' in zshmodules(1). zzpprrooff See the section `The zsh/zprof Module' in zshmodules(1). zzppttyy See the section `The zsh/zpty Module' in zshmodules(1). zzrreeggeexxppaarrssee See the section `The zsh/zutil Module' in zshmodules(1). zzssoocckkeett See the section `The zsh/net/socket Module' in zshmodules(1). zzssttyyllee See the section `The zsh/zutil Module' in zshmodules(1). zzttccpp See the section `The zsh/net/tcp Module' in zshmodules(1). zsh 4.2.3 January 13, 2005 ZSHBUILTINS(1)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™