* [PATCH] Document the SHORT_LOOP 'function' syntax.
@ 2017-03-05 22:10 Daniel Shahaf
2017-03-05 22:58 ` Bart Schaefer
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Shahaf @ 2017-03-05 22:10 UTC (permalink / raw)
To: zsh-workers
It's already mentioned in passing in zshoptions(1).
---
Doc/Zsh/grammar.yo | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Doc/Zsh/grammar.yo b/Doc/Zsh/grammar.yo
index 2a76964..463ac88 100644
--- a/Doc/Zsh/grammar.yo
+++ b/Doc/Zsh/grammar.yo
@@ -461,6 +461,9 @@ item(tt(select) var(name) [ tt(in) var(word) ... var(term) ] var(sublist))(
where var(term) is at least one newline or tt(;).
A short form of tt(select).
)
+item(tt(function) var(word) ... [ tt(+LPAR()+RPAR()) ] [ var(term) ] var(sublist))(
+This is a short form of tt(function).
+)
enditem()
texinode(Reserved Words)(Errors)(Alternate Forms For Complex Commands)(Shell Grammar)
sect(Reserved Words)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Document the SHORT_LOOP 'function' syntax.
2017-03-05 22:10 [PATCH] Document the SHORT_LOOP 'function' syntax Daniel Shahaf
@ 2017-03-05 22:58 ` Bart Schaefer
2017-03-05 22:57 ` Daniel Shahaf
0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2017-03-05 22:58 UTC (permalink / raw)
To: zsh-workers
On Sun, Mar 5, 2017 at 2:10 PM, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> It's already mentioned in passing in zshoptions(1).
This doesn't really belong with SHORT_LOOPS forms, though, because
turning off the SHORT_LOOPS option doesn't change the behavior.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Document the SHORT_LOOP 'function' syntax.
2017-03-05 22:58 ` Bart Schaefer
@ 2017-03-05 22:57 ` Daniel Shahaf
2017-03-05 23:11 ` Bart Schaefer
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Shahaf @ 2017-03-05 22:57 UTC (permalink / raw)
To: zsh-workers
Bart Schaefer wrote on Sun, Mar 05, 2017 at 14:58:04 -0800:
> On Sun, Mar 5, 2017 at 2:10 PM, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> > It's already mentioned in passing in zshoptions(1).
>
> This doesn't really belong with SHORT_LOOPS forms, though, because
> turning off the SHORT_LOOPS option doesn't change the behavior.
It does:
% function ; echo hello world
hello world
% setopt noshortloops
% function ; echo hello world
zsh: parse error near `echo'
%
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Document the SHORT_LOOP 'function' syntax.
2017-03-05 22:57 ` Daniel Shahaf
@ 2017-03-05 23:11 ` Bart Schaefer
0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2017-03-05 23:11 UTC (permalink / raw)
To: zsh-workers
On Sun, Mar 5, 2017 at 2:57 PM, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> Bart Schaefer wrote on Sun, Mar 05, 2017 at 14:58:04 -0800
>> This doesn't really belong with SHORT_LOOPS forms, though, because
>> turning off the SHORT_LOOPS option doesn't change the behavior.
>
> It does
Ah, my apologies, saw the LPAR()RPAR() in there and misread the
description. Should have actually yodl'd it.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-05 23:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-05 22:10 [PATCH] Document the SHORT_LOOP 'function' syntax Daniel Shahaf
2017-03-05 22:58 ` Bart Schaefer
2017-03-05 22:57 ` Daniel Shahaf
2017-03-05 23:11 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).