Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Portable zsh scripts



Thorsten Kampe wrote:
> Okay, but is there a gain in specifying "emulate -R zsh" instead of 
> "emulate zsh".

That really depends on the options you need.  If /etc/zshenv sets one of
about 92 options to the non-default state and you need it in the default
state, then yes, there's a gain.  I've appended the list, excluding
aliases: as you'll see most of them really are only useful
interactively, but some might make a difference: pushdsilent, for
example.

You should probably look at it the other way.  There is no loss in
specifying -R, since it reduces any lingering uncertainty, and as
Vincent points out the same goes for -L.  So if you want the maximum
protection, "emulate -LR zsh" is fine.

> > If /etc/zshenv isn't doing anything nasty, however, it shouldn't be
> > needed together with the -f flag.
> 
> Sorry, but as far as I understood "-f" makes the shell skip everything 
> /except/ /etc/zshenv.

I meant the other way round:  if you have "-f", and /etc/zshenv doesn't
change options (which it shouldn't, ideally), then the "emulate" doesn't
get you anything.

alwayslastprompt
alwaystoend
appendhistory
autocontinue
autolist
automenu
autonamedirs
autoparamkeys
autoparamslash
autopushd
autoremoveslash
autoresume
banghist
bashautolist
bashrematch
beep
caseglob
casematch
cbases
completealiases
completeinword
correct
correctall
emacs
exec
extendedhistory
flowcontrol
globalrcs
globcomplete
hashcmds
hashdirs
hashlistall
histallowclobber
histbeep
histexpiredupsfirst
histfindnodups
histignorealldups
histignoredups
histignorespace
histnofunctions
histnostore
histreduceblanks
histsavebycopy
histsavenodups
histverify
ignoreeof
incappendhistory
interactive
interactivecomments
kshzerosubscript
listambiguous
listbeep
listpacked
listrowsfirst
listtypes
login
longlistjobs
mailwarning
markdirs
menucomplete
monitor
multibyte
notify
overstrike
printeightbit
printexitvalue
privileged
promptbang
promptcr
promptpercent
promptsp
promptsubst
pushdsilent
rcs
recexact
rematchpcre
restricted
rmstarsilent
rmstarwait
sharehistory
shinstdin
singlecommand
singlelinezle
sunkeyboardhack
transientrprompt
trapsasync
verbose
vi
warncreateglobal
xtrace
zle
dvorak

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author