diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2011-12-08 19:42:07 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2011-12-08 19:42:07 +0000 |
commit | e3182c18de8f84c2d7eb003f9c731ada5e9a591f (patch) | |
tree | 3ed57c8e61518c8ad98e93e4961b7b881237e0c6 /Doc | |
parent | 22aede45f67161c6332e52c42e04df45a3e62164 (diff) | |
download | zsh-e3182c18de8f84c2d7eb003f9c731ada5e9a591f.tar.gz zsh-e3182c18de8f84c2d7eb003f9c731ada5e9a591f.tar.xz zsh-e3182c18de8f84c2d7eb003f9c731ada5e9a591f.zip |
29955++: IGNORE_CLOSE_BRACES option
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/Zsh/grammar.yo | 4 | ||||
-rw-r--r-- | Doc/Zsh/options.yo | 27 |
2 files changed, 28 insertions, 3 deletions
diff --git a/Doc/Zsh/grammar.yo b/Doc/Zsh/grammar.yo index 5c803a681..30fec79c6 100644 --- a/Doc/Zsh/grammar.yo +++ b/Doc/Zsh/grammar.yo @@ -449,8 +449,8 @@ tt(do done esac then elif else fi for case if while function repeat time until select coproc nocorrect foreach end ! [[ { }) -Additionally, `tt(})' is recognized in any position if the tt(IGNORE_BRACES) option -is not set. +Additionally, `tt(})' is recognized in any position if neither the +tt(IGNORE_BRACES) option nor the tt(IGNORE_CLOSE_BRACES) option is set. texinode(Comments)(Aliasing)(Reserved Words)(Shell Grammar) sect(Comments) cindex(comments) diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo index 0e0176227..68247264f 100644 --- a/Doc/Zsh/options.yo +++ b/Doc/Zsh/options.yo @@ -548,7 +548,32 @@ cindex(disabling brace expansion) cindex(brace expansion, disabling) cindex(expansion, brace, disabling) item(tt(IGNORE_BRACES) (tt(-I)) <S>)( -Do not perform brace expansion. +Do not perform brace expansion. For historical reasons this +also includes the effect of the tt(IGNORE_CLOSE_BRACES) option. +) +pindex(IGNORE_CLOSE_BRACES) +pindex(NO_IGNORE_CLOSE_BRACES) +pindex(IGNORECLOSEBRACES) +pindex(NOIGNORECLOSEBRACES) +item(tt(IGNORE_CLOSE_BRACES))( +When neither this option nor tt(IGNORE_BRACES) is set, a sole +close brace character `tt(})' is syntactically significant at any +point on a command line. This has the effect that no semicolon +or newline is necessary before the brace terminating a function +or current shell construct. When either option is set, a closing brace +is syntactically significant only in command position. Unlike +tt(IGNORE_BRACES), this option does not disable brace expansion. + +For example, with both options unset a function may be defined +in the following fashion: + +example(args() { echo $# }) + +while if either option is set, this does not work and something +equivalent to the following is required: + +example(args() { echo $#; }) + ) pindex(KSH_GLOB) pindex(NO_KSH_GLOB) |