/
usr
/
share
/
zsh
/
5.5.1
/
help
/
/usr/share/zsh/5.5.1/help
mkdir
upload
Name
Size
Mode
Actions
alias
2322
0644
edit
dl
rm
autoload
4609
0644
edit
dl
rm
bg
123
0644
edit
dl
rm
bindkey
60
0644
edit
dl
rm
break
184
0644
edit
dl
rm
builtin
81
0644
edit
dl
rm
bye
531
0644
edit
dl
rm
cap
62
0644
edit
dl
rm
cd
2719
0644
edit
dl
rm
chdir
2719
0644
edit
dl
rm
clone
64
0644
edit
dl
rm
colon
190
0644
edit
dl
rm
command
566
0644
edit
dl
rm
comparguments
81
0644
edit
dl
rm
compcall
75
0644
edit
dl
rm
compctl
74
0644
edit
dl
rm
compdescribe
80
0644
edit
dl
rm
compfiles
77
0644
edit
dl
rm
compgroups
78
0644
edit
dl
rm
compquote
77
0644
edit
dl
rm
comptags
76
0644
edit
dl
rm
comptry
75
0644
edit
dl
rm
compvalues
78
0644
edit
dl
rm
continue
244
0644
edit
dl
rm
declare
21412
0644
edit
dl
rm
dirs
729
0644
edit
dl
rm
disable
3767
0644
edit
dl
rm
disown
682
0644
edit
dl
rm
dot
1144
0644
edit
dl
rm
echo
1470
0644
edit
dl
rm
echotc
66
0644
edit
dl
rm
echoti
67
0644
edit
dl
rm
emulate
6562
0644
edit
dl
rm
enable
1262
0644
edit
dl
rm
eval
374
0644
edit
dl
rm
exec
997
0644
edit
dl
rm
exit
531
0644
edit
dl
rm
export
280
0644
edit
dl
rm
false
68
0644
edit
dl
rm
fc
6219
0644
edit
dl
rm
fg
140
0644
edit
dl
rm
float
21412
0644
edit
dl
rm
functions
3768
0644
edit
dl
rm
getcap
62
0644
edit
dl
rm
getln
147
0644
edit
dl
rm
getopts
1840
0644
edit
dl
rm
hash
2443
0644
edit
dl
rm
history
6219
0644
edit
dl
rm
integer
21412
0644
edit
dl
rm
jobs
791
0644
edit
dl
rm
kill
1480
0644
edit
dl
rm
let
323
0644
edit
dl
rm
limit
3598
0644
edit
dl
rm
local
21412
0644
edit
dl
rm
log
116
0644
edit
dl
rm
logout
531
0644
edit
dl
rm
noglob
83
0644
edit
dl
rm
popd
820
0644
edit
dl
rm
print
5415
0644
edit
dl
rm
printf
2153
0644
edit
dl
rm
pushd
1626
0644
edit
dl
rm
pushln
5415
0644
edit
dl
rm
pwd
260
0644
edit
dl
rm
r
6219
0644
edit
dl
rm
read
5814
0644
edit
dl
rm
readonly
21412
0644
edit
dl
rm
rehash
2443
0644
edit
dl
rm
return
928
0644
edit
dl
rm
sched
64
0644
edit
dl
rm
set
2466
0644
edit
dl
rm
setcap
62
0644
edit
dl
rm
setopt
1599
0644
edit
dl
rm
shift
422
0644
edit
dl
rm
source
182
0644
edit
dl
rm
stat
63
0644
edit
dl
rm
suspend
199
0644
edit
dl
rm
test
1212
0644
edit
dl
rm
times
113
0644
edit
dl
rm
trap
3704
0644
edit
dl
rm
true
67
0644
edit
dl
rm
ttyctl
1219
0644
edit
dl
rm
type
2393
0644
edit
dl
rm
typeset
21412
0644
edit
dl
rm
ulimit
3173
0644
edit
dl
rm
umask
485
0644
edit
dl
rm
unalias
1282
0644
edit
dl
rm
unfunction
1282
0644
edit
dl
rm
unhash
1282
0644
edit
dl
rm
unlimit
555
0644
edit
dl
rm
unset
933
0644
edit
dl
rm
unsetopt
506
0644
edit
dl
rm
vared
52
0644
edit
dl
rm
wait
1378
0644
edit
dl
rm
whence
2393
0644
edit
dl
rm
where
2393
0644
edit
dl
rm
which
2393
0644
edit
dl
rm
zcompile
6629
0644
edit
dl
rm
zformat
72
0644
edit
dl
rm
zftp
63
0644
edit
dl
rm
zle
52
0644
edit
dl
rm
zmodload
17337
0644
edit
dl
rm
zparseopts
75
0644
edit
dl
rm
zprof
64
0644
edit
dl
rm
zpty
63
0644
edit
dl
rm
zregexparse
76
0644
edit
dl
rm
zsocket
77
0644
edit
dl
rm
zstyle
64
0644
edit
dl
rm
ztcp
66
0644
edit
dl
rm
Edit:
/usr/share/zsh/5.5.1/help/trap
(3704B)
trap [ arg ] [ sig ... ] arg is a series of commands (usually quoted to protect it from immediate evaluation by the shell) to be read and executed when the shell receives any of the signals specified by one or more sig args. Each sig can be given as a number, or as the name of a signal either with or without the string SIG in front (e.g. 1, HUP, and SIGHUP are all the same signal). If arg is `-', then the specified signals are reset to their defaults, or, if no sig args are present, all traps are reset. If arg is an empty string, then the specified signals are ignored by the shell (and by the commands it invokes). If arg is omitted but one or more sig args are provided (i.e. the first argument is a valid signal number or name), the effect is the same as if arg had been specified as `-'. The trap command with no arguments prints a list of commands associated with each signal. If sig is ZERR then arg will be executed after each command with a nonzero exit status. ERR is an alias for ZERR on systems that have no SIGERR signal (this is the usual case). If sig is DEBUG then arg will be executed before each command if the option DEBUG_BEFORE_CMD is set (as it is by default), else after each command. Here, a `command' is what is described as a `sublist' in the shell grammar, see the section SIMPLE COMMANDS & PIPELINES in zshmisc(1). If DEBUG_BEFORE_CMD is set various additional features are available. First, it is possible to skip the next command by setting the option ERR_EXIT; see the description of the ERR_EXIT option in zshoptions(1). Also, the shell parameter ZSH_DEBUG_CMD is set to the string corresponding to the command to be executed following the trap. Note that this string is reconstructed from the internal format and may not be formatted the same way as the original text. The parame- ter is unset after the trap is executed. If sig is 0 or EXIT and the trap statement is executed inside the body of a function, then the command arg is executed after the function completes. The value of $? at the start of execu- tion is the exit status of the shell or the return status of the function exiting. If sig is 0 or EXIT and the trap statement is not executed inside the body of a function, then the command arg is executed when the shell terminates; the trap runs before any zshexit hook functions. ZERR, DEBUG, and EXIT traps are not executed inside other traps. ZERR and DEBUG traps are kept within subshells, while other traps are reset. Note that traps defined with the trap builtin are slightly dif- ferent from those defined as `TRAPNAL () { ... }', as the latter have their own function environment (line numbers, local vari- ables, etc.) while the former use the environment of the command in which they were called. For example, trap 'print $LINENO' DEBUG will print the line number of a command executed after it has run, while TRAPDEBUG() { print $LINENO; } will always print the number zero. Alternative signal names are allowed as described under kill above. Defining a trap under either name causes any trap under an alternative name to be removed. However, it is recommended that for consistency users stick exclusively to one name or another.
Save
cmd:
run