/
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/emulate
(6562B)
emulate [ -lLR ] [ {zsh|sh|ksh|csh} [ flags ... ] ] Without any argument print current emulation mode. With single argument set up zsh options to emulate the specified shell as much as possible. csh will never be fully emulated. If the argument is not one of the shells listed above, zsh 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 COMPATIBIL- ITY in zsh(1) . In addition to setting shell options, the com- mand also restores the pristine state of pattern enables, as if all patterns had been enabled using enable -p. If the emulate command occurs inside a function that has been marked for execution tracing with functions -t then the xtrace option will be turned on regardless of emulation mode or other options. Note that code executed inside the function by the ., source, or eval commands is not considered to be running directly from the function, hence does not provoke this behav- iour. If the -R switch is given, all settable 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 -L switch is given, the options LOCAL_OPTIONS, LOCAL_PAT- TERNS and LOCAL_TRAPS will be set as well, causing the effects of the emulate command and any setopt, disable -p or enable -p, and trap commands to be local to the immediately surrounding shell function, if any; normally these options are turned off in all emulation modes except ksh. The -L switch is mutually exclu- sive with the use of -c in flags. If there is a single argument and the -l switch is given, the options that would be set or unset (the latter indicated with the prefix `no') are listed. -l can be combined with -L or -R and the list will be modified in the appropriate way. Note the list does not depend on the current setting of options, i.e. it includes all options that may in principle change, not just those that would actually change. The flags may be any of the invocation-time flags described in the section INVOCATION in zsh(1), except that `-o EMACS' and `-o VI' may not be used. Flags such as `+r'/`+o RESTRICTED' may be prohibited in some circumstances. If -c arg appears in flags, arg is evaluated while the requested emulation is temporarily in effect. In this case the emulation mode and all options are restored to their previous values before emulate returns. The -R switch may precede the name of the shell to emulate; note this has a meaning distinct from including -R in flags. Use of -c enables `sticky' emulation mode for functions defined within the evaluated expression: the emulation mode is associ- ated thereafter with the function so that whenever the function is executed the emulation (respecting the -R switch, if present) and all options are set (and pattern disables cleared) before entry to the function, and the state is restored after exit. If the function is called when the sticky emulation is already in effect, either within an `emulate shell -c' expression or within another function with the same sticky emulation, entry and exit from the function do not cause options to be altered (except due to standard processing such as the LOCAL_OPTIONS option). This also applies to functions marked for autoload within the sticky emulation; the appropriate set of options will be applied at the point the function is loaded as well as when it is run. For example: emulate sh -c 'fni() { setopt cshnullglob; } fno() { fni; }' fno The two functions fni and fno are defined with sticky sh emula- tion. fno is then executed, causing options associated with emulations to be set to their values in sh. fno then calls fni; because fni is also marked for sticky sh emulation, no option changes take place on entry to or exit from it. Hence the option cshnullglob, turned off by sh emulation, will be turned on within fni and remain on return to fno. On exit from fno, the emulation mode and all options will be restored to the state they were in before entry to the temporary emulation. The documentation above is typically sufficient for the intended purpose of executing code designed for other shells in a suit- able environment. More detailed rules follow. 1. The sticky emulation environment provided by `emulate shell -c' is identical to that provided by entry to a function marked for sticky emulation as a consequence of being defined in such an environment. Hence, for exam- ple, the sticky emulation is inherited by subfunctions defined within functions with sticky emulation. 2. No change of options takes place on entry to or exit from functions that are not marked for sticky emulation, other than those that would normally take place, even if those functions are called within sticky emulation. 3. No special handling is provided for functions marked for autoload nor for functions present in wordcode created by the zcompile command. 4. The presence or absence of the -R switch to emulate cor- responds to different sticky emulation modes, so for example `emulate sh -c', `emulate -R sh -c' and `emulate csh -c' are treated as three distinct sticky emulations. 5. Difference in shell options supplied in addition to the basic emulation also mean the sticky emulations are dif- ferent, so for example `emulate zsh -c' and `emulate zsh -o cbases -c' are treated as distinct sticky emulations.
Save
cmd:
run