- simple command
. file [ arg ... ]
PATH_DIRS
is set, the shell looks in the components of
path
to find the directory containing file. Files in the
current directory are not read unless `.' appears somewhere in
path
. 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 ... ]
alias [ -grmL ] [ name[=value] ] ...
autoload [ name ... ]
fpath
variable will be searched
to find the actual function definition when the function is first
referenced. The definition is contained in a file of the same name as
the function. If the file found contains a standard definition for the
function, that is stored as the function; otherwise, the contents of the
entire file are stored as the function. The latter format allows functions
to be used directly as scripts.
bg [ job ... ]
job ... &
bindkey -mevd
bindkey -r in-string ...
bindkey [ -a ] in-string [ command ] ...
bindkey -s [ -a ] in-string out-string ...
VISUAL
or EDITOR
variables
contain the string `vi'. Metafied characters are bound to
self-insert by default. The `-m' option loads the compiled-in
bindings of these characters for the mode determined by the preceding
options, or the current mode if used alone. Any previous binding done
by the user will be preserved. If the `-r' option is given, remove
any binding for each in-string. If the `-s' option is not
specified, bind each in-string to a specified command. If
no command is specified, print the binding of in-string if
it is bound, or return a nonzero exit code if it is not bound. If the
`-s' option is specified, bind each in-string to each
specified out-string. When in-string is typed,
out-string will be pushed back and treated as input to the line
editor. The process is recursive, but to avoid infinite loops the shell
will report an error if more than 20 consecutive replacements happen.
If the `-a' option is specified, bind the in-strings in the
alternative keymap instead of the standard one. The alternative keymap
is used in vi command mode.
It's possible for an in-string to be bound to something and also
be the beginning of a longer bound string. In this case the shell will
wait a certain time to see if more characters are typed, and if not it
will execute the binding. This timeout is defined by the
KEYTIMEOUT
parameter; the default is 0.4 seconds. No timeout is
done if the prefix string is not bound.
For either in-string or out-string, control characters may
be specified in the form ^X
, and the backslash may be used to
introduce one of the following escape sequences:
\a
\n
\b
\t
\v
\f
\r
\e
\E
\NNN
\xNN
\M-xxx
-
after the
M
is optional.
\C-X
M
is optional.
\
escapes the following character. Delete is
written as ^?
. Note that \M^?
and ^\M?
are not the
same.
Multi-character in-strings cannot contain the null character
(^@
or ^
). If they appear in a bindkey command, they
will be silently translated to \M-^@
. This restriction does not
apply to out-strings, single-character in-strings and the
first character of a multi-char in-string.
break [ n ]
for
, while
, until
,
select
, or repeat
loop. If n is specified, then
break n levels instead of just one.
builtin name [ args ] ...
bye
exit
.
cd [ arg ]
cd old new
cd [+-]n
HOME
if arg is
not specified. If arg is -
, change to the value of
OLDPWD
, the previous directory. 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 cdpath
. If
the option CDABLEVARS
is set, and a parameter named arg
exists whose value begins with a slash, treat its value as the
directory.
The second form of cd
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 cd
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
dirs
command, 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.
chdir
cd
.
command simple command
compctl
continue [ num ]
for
, while
,
until
, select
, or repeat
loop. If n is
specified, break out of n-1 loops and resume at the n'th
enclosing loop.
declare [ arg ... ]
typeset
.
dirs [ -v ] [ arg ... ]
pushd
command, and removed with the cd
or popd
commands. If
arguments are specified, load them onto the directory stack, replacing
anything that was there, and push the current directory onto the
stack.
disable [ -afmr ] arg ...
disable
to act on aliases. The
`-f' option causes disable
to act on shell functions. The
`-r' option causes disable
to act on reserved words. Without
arguments all disabled hash table elements from the corresponding hash table
are printed. With the `-m' flag the arguments are taken as patterns
(which should be quoted to preserve them from being taken as glob patterns)
and all hash table elements from the corresponding hash table matching these
patterns are disabled. Disabled objects can be enabled with the
enable
command.
disown [ job ... ]
job ... &|
job ... &!
job
is
specified use the current job
.
echo [ -neE ] [ arg ... ]
echo
recognizes the following escape sequences:
\a
\b
\c
\e
\f
\n
\r
\t
\v
\\
\0NNN
\xNN
x
. A non-hexadecimal digit terminates the number.
BSD_ECHO
option can be used to
disable these escape sequences. In the later case `-e' flag can be
used to enable them.
echotc cap [ arg ... ]
emulate [ -R ] [ zsh | sh | ksh | csh ]
csh
will never be fully emulated. If the argument is not one of the
shells listed above, zsh
will be used as a default. If the `-R'
option is given, all options are reset to their default value corresponding
to the specified emulation mode.
enable [ -afmr ] arg ...
disable
. The default is to enable builtin commands. The
`-a' option causes enable
to act on aliases. The `-f'
option causes enable
to act on shell functions. The `-r' option
causes enable
to act on reserved words. Without arguments all enable
hash table elements from the corresponding hash table are printed. With
the `-m' flag the arguments are taken as patterns (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 disable
builtin command.
eval [ arg ... ]
exec simple command
exit [ n ]
EOF
condition will also cause the shell to exit, unless the
IGNORE_EOF
option is set.
export [ name[=value] ... ]
export
is equivalent
to typeset -x
.
false
fc [ -e ename ] [ -nlrdDfEim ] [ old=new ... ] [ first [ last ]]
fc -ARWI [ filename ]
FCEDIT
is
used. If ename is -
, no editor is invoked. When editing
is complete, the edited command(s) is executed. If first is not
specified, it will be set to -1 (the most recent event), or to -16 if
the `-l' flag is given. If last is not specified, it will be
set to first, or to -1 if the `-l' flag is given. The flag
`-r' reverses the order of the commands and the flag `-n'
suppresses command numbers when listing. Also when listing, `-d'
prints timestamps for each command, `-f' prints full time and date
stamps. Adding the `-E' flag causes the dates to be printed as
(dd.mm.yyyy
), instead of the default, mm/dd/yyyy
. Adding the
`-i' flag causes the dates to be printed as yyyy-mm-dd
, in a
fixed format. With the `-D' flag, fc
prints elapsed times.
fc -R
reads the history from the given file, fc -W
writes the
history out to the given file, and fc -A
appends the history out to
the given file. fc -AI
(WI
) appends (writes) only those events
that are new since the last incremental append (write) to the history
file. In any case the file will have no more than SAVEHIST
entries.
fg [ job ... ]
job ...
functions [ +-tum ] [ name ... ]
typeset -f
.
getln name ...
read -zr
. The flags
`-c', `-l', `-A', `-e', `-E', and `-n' are
also supported.
getopts optstring name [ arg ... ]
+
or a -
. An argument not beginning with a +
or a -
,
or the argument --
, ends the options. optstring contains
the letters that getopts
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, 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 OPTIND
. The option argument, if any, is stored in
OPTARG
.
A leading :
in optstring causes getopts
to store the
letter of the invalid option in OPTARG
, and to set name to
?
for an unknown option and to :
when a required option is
missing. Otherwise, getopts
prints an error message. The exit
status is nonzero when there are no more options.
hash [ -dfmr ] [ name[=value ] ] ...
hash
will list the entire command
hash table.
The `-m' option causes the arguments to be taken as patterns
(they should be quoted) and the elements of the command hash table matching
these patterns are printed.
The `-r' option causes the command hash table to be thrown out and
restarted. The `-f' option causes the entire path to be searched, and
all the commands found are added to the hash table. These options cannot be
used with any arguments.
For each name with a corresponding value, put name in the
command hash table, associating it with the pathname value. Whenever
name is used as a command argument, the shell will try to execute the
file given by value. For each name with no corresponding
value, search for name in the path, and add it to the command
hash table, and associating it with the discovered path, if it is found.
Adding the `-d' option causes hash
to act on the named directory
table instead of the command hash table. The remaining discussion of
hash
will assume that the `-d' is given.
If invoked without any arguments, and without any other options,
hash -d
lists the entire named directory table.
The `-m' option causes the arguments to be taken as patterns (they
should be quoted) and the elements of the named directory table matching
these patterns are printed.
The `-r' option causes the named directory table to be thrown out and
restarted so that it only contains ~
. The `-f' option causes
all usernames to be added to the named directory table. These options cannot
be used with any arguments.
For each name with a corresponding value, put name
in the named directory table. The directory name name is then
associated with the specified path value, so that value may
be referred to as ~name
. For each name with no
corresponding value, search for as a username and as a parameter. If
it is found, it is added to the named directory hash table.
history [ -nrdDfEim ] [ first [ last ]]
fc -l
.
integer [ +-lrtux ] [ name[=value] ]
typeset -i
, except that options irrelevant to integers
are not permitted.
jobs [ -lprs ] [ job ... ]
kill [ -s signal_name ] job ...
kill [ -sig ] job ...
kill -l [ sig ... ]
SIGTERM
or the specified signal to the given jobs or
processes. Signals are given by number or by names, 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 third
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 signal the name of the signal is printed.
let arg ...
limit [ -hs ] [ resource [ limit ] ] ...
cputime
filesize
datasize
stacksize
coredumpsize
resident
memoryuse
memorylocked
descriptors
openfiles
vmemorysize
nh
nk
nm
mm:ss
local [ +-LRZilrtu [n]] [ name[=value] ]
typeset
, except that the options `-x' and `-f'
are not permitted.
log
watch
parameter.
logout
noglob simple command
popd [ +-n ]
cd
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 dirs
command, 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.
print [ -nrslzpNDPoOicm ] [ -un ] [ -R [ -en ]] [ arg ... ]
-
, the arguments are printed on the
standard output as described by echo
, with the following
differences: the escape sequence \M-x
metafies the character
x
(sets the highest bit), \C-x
produces a control
character (\C-@
and \C-?
give the characters NULL and
delete) and \E
is a synonym for \e
. Finally, if not in an
escape sequence, \
escapes the following character and is not
printed.
-r
echo
.
-R
echo
command which does not process escape 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.
-m
-s
-n
-l
-N
-o
-O
-i
-c
-un
-p
-z
-D
~
expressions, as appropriate.
-P
PROMPT
parameter.
pushd [ arg ]
pushd old new
pushd +-n
HOME
if the PUSHD_TO_HOME
option is
set or if there is only one entry on the stack. If arg is
-
, change to the value of OLDPWD
, the previous directory.
If a directory named arg is not found in the current directory and
arg does not contain a slash, search each component of the shell
parameter cdpath
. If the option CDABLEVARS
is set, and a
parameter named arg exists whose value begins with a slash, treat
its value as the directory. If the option PUSHD_SILENT
is not
set, the directory stack will be printed after a pushd
is
performed.
The second form of pushd
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 pushd
changes directory by rotating the directory
list. An argument of the form +n
identifies a stack entry by counting
from the left of the list shown by the dirs
command, 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.
pushln
print -nz
.
pwd [ -r ]
CHASE_LINKS
option is set, the
printed path will not contain symbolic links.
r
fc -e -
.
read [ -rzpqAclneE ] [ -k [num] ] [ -un ] [ name?prompt ] [ name ... ]
IFS
as separators.
-r
\
at the end of a line does not signify line continuation.
-q
-k [ num ]
-z
-e
-E
-A
-c
-l
compctl
). 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 name
is omitted
then REPLY
is used for scalars and reply
for arrays.
-n
-un
-p
?
, the remainder of this word is
used as a prompt
on standard error when the shell is interactive. The
exit status is 0
unless an end-of-file is encountered.
readonly [ name[=value]] ...
rehash [ -df ]
rehash
to act on the named directory table
instead of the command hash table. This reduces the named directory table to
only the ~
entry. If the `-f' option is also used, the named
directory table is rebuilt immediately.
rehash
is equivalent to hash -r
.
return [ n ]
.
script to return to the invoking
script with the return status specified by n. If n is
omitted then the return status is that of the last command
executed.
If return
was executed from a trap in a `TRAPxxx' function, the
effect is different for zero and nonzero 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 processing; with a non-zero status, the shell
will behave as interrupted except that the return status of the trap is
retained. Note that 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.
sched [+]hh:mm command ...
sched [ -item ]
-item
, removes the given item from the list.
set [ +-options ] [ +-o option name ] ... [ +-A [ name ] ] [ arg ... ]
+
, the names of all
parameters are printed.
setopt [ -m ] [ +-options ] [ name ... ]
shift [ n ] [ name ... ]
$n+1
... are renamed
$1
, 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.
source
path
.
suspend [ -f ]
SIGTSTP
) until it
receives a SIGCONT
. If the `-f' option is not given,
complain if this is a login shell.
test arg ...
[ arg ... ]
test
. Added for compatibility; use
conditional expressions instead.
times
trap [ arg ] [ sig ] ...
-
, then all traps sig are reset to
their default values. If arg is the null string, then this signal
is ignored by the shell and by the commands it invokes. If sig is
ZERR
then arg will be executed after each command with a
nonzero exit status. If sig is DEBUG
then arg will
be executed after each command. 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. 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
command with no
arguments prints a list of commands associated with each signal.
true
ttyctl [ -fu ]
stty
and similar programs have no effect when the tty is
frozen. Without options it reports whether the terminal is frozen or
not.
type [ -fpam ] name ...
whence -v
.
typeset [ +-LRUZfilrtuxm [n]] [ name[=value]] ...
ALL_EXPORT
is set, in which case the parameter will be exported
provided no parameter of that name already exists. The following
attributes are valid:
-L
-R
-U
PATH
or FIGNORE
,
etc.
-Z
-f
fpath
parameter will be searched to find the function definition
when the function is first referenced.; see autoload
.
-i
-l
-r
-t
-u
-x
+
rather than -
causes these flags to be turned off.
If no arguments are given but flags are specified, a list of named
parameters which have these flags set is printed. Using +
instead of -
keeps their values from being printed. If no
arguments or options are given, the names and attributes of all
parameters are printed. If only the `-m' flag is given the
arguments are taken as patterns (which should be quoted), and all
parameters or functions (with the `-f' flag) with matching names
are printed.
ulimit [ -SHacdflmnpstv ] [ limit ] ...
unlimited
. 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
values are printed the limit name and unit is printed before each value.
-a
-c
-d
-f
-l
-m
-n
-s
-t
-u
-v
umask [ -S] [ mask ]
chmod(1)
. If mask
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 (not denied) to the users specified).
unalias [ -m ] name ...
unalias
is equivalent to unhash -a
.
unfunction [ -m ] name ...
unfunction
is equivalent to unhash -f
.
unhash [ -adfm ] name ...
unhash
to remove 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.
unlimit [ -hs ] resource ...
unset [ -fm ] name ...
Unset -f
is equivalent to
unfunction
.
unsetopt [ -m ] [ +-options ] [ name ... ]
vared [ -c ] [ -h ] [ -p prompt] [ -r rprompt ] name
zle
.
wait [ job ... ]
whence [ -vcfpam ] name ...
where
whence -ca
.
which [ -pam ] name ...
whence -c
.
Go to the first, previous, next, last section, table of contents.