It seems like some people think it is a good idea to unset that option.
That is a very bad idea though.
Why? Well, because of this:
% unset foo
% echo "foo$foo"
zsh: foo: parameter not set
That is totally incompatible with every other bourne like shell out
there. And it breaks many shell idioms.
In fact, it will break at least 'vcs_info()' and 'accept_line()' for us.
Which is unacceptable.
I also added 'emulate -L zsh' to accept-line() and vcs_info(), which are
two functions, that will fail horribly with 'unset' unset. That will
leave the shell intact even if someone wants to 'setopt no_unset' in
his/her .zshrc.local
* zshrc: add openssl hash functions [Closes: issue741]
* zshrc: use history-incremental-pattern-search-* for incremental history
searches per default (via ^r and ^s).
+ * zshrc: actively do 'setopt unset'
- -- Frank Terbeck <ft@grml.org> Thu, 08 Oct 2009 11:29:38 +0200
+ -- Frank Terbeck <ft@grml.org> Mon, 12 Oct 2009 01:10:02 +0200
grml-etc-core (0.3.75) unstable; urgency=low
setopt pushd_ignore_dups # don't push the same dir twice.
setopt noglobdots # * shouldn't match dotfiles. ever.
setopt noshwordsplit # use zsh style word splitting
+setopt unset # don't error out when unset parameters are used
# }}}
zstyle ':acceptline:*' rehash true
function Accept-Line() {
- setopt localoptions noksharrays
+ emulate -L zsh
local -a subs
local -xi aldone
local sub
}
function Accept-Line-getdefault() {
+ emulate -L zsh
local default_action
zstyle -s ":acceptline:${alcontext}" default_action default_action
}
function accept-line() {
- setopt localoptions noksharrays
+ emulate -L zsh
local -a cmdline
local -x alcontext
local buf com fname format msg default_action
}
# }}}
vcs_info_lastmsg () { # {{{
+ emulate -L zsh
local -i i
VCS_INFO_maxexports
}
# }}}
vcs_info () { # {{{
+ emulate -L zsh
+ setopt extendedglob
local pat
local -i found
local -a VCSs disabled dps