Discussion:
[Help-bash] bash4-3 ,in configure file. help!
Ta
2016-11-08 14:00:30 UTC
Permalink
for bash4-3 ,in configure file:
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST




what ${ZSH_VERSION+set} will do?
what command the emulate is ?why i cannot find the shell?
what setopt NO_GLOB
Greg Wooledge
2016-11-08 14:50:58 UTC
Permalink
Post by Ta
emulate sh
# is contrary to our usage. Disable this feature.
setopt NO_GLOB_SUBST
what ${ZSH_VERSION+set} will do?
It is testing whether the variable ZSH_VERSION is set.
See http://mywiki.wooledge.org/BashFAQ/083

... which I see has been hacked apart by the optimizers, who don't
understand that the page is intended to be *read by humans*, not
to be a platform for showing how cleverly they can code. An older
version is simpler and has more explanation:

http://mywiki.wooledge.org/BashFAQ/083?action=recall&rev=11
Post by Ta
what command the emulate is ?why i cannot find the shell?
I'm guessing it's a zsh command. As you can see, it's only run when
we have detected that we're being executed by zsh (as indicated by
the test for the ZSH_VERSION variable being set).
Post by Ta
what setopt NO_GLOB_SUBST means?
It could be another zsh command. All I know is that it's not a bash
command.

Loading...