Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Functions can't be defined inside ${ ... }
- X-seq: zsh-workers 54287
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Functions can't be defined inside ${ ... }
- Date: Sun, 5 Apr 2026 10:51:19 -0700
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=4pZBk+5sjl9d/oiFRujYuzA3ZJJX9zJRP/NMG28aOag=; fh=BgAYDYpL6Ne/A5nWEMVJiHiBtrz8Imz3uf26RDwgQX4=; b=GjApenRD5tAOOMCM6xL93SSfOr/SKwyXy8F/+crT/gPOlLRvZ17Q5lPaCsCf63Yhde fBotKB7XYRXIlzInYKLW7sONH13jakKcJvHm89d7fPmId0+B/4fi69eiZ1asASg+vkTl rLMTtzL/QMKATWn8DFrC+vJZfMhrnJEkwML1/VMOjDs3aMYj3aaKnlIyORu2wl3I8CdN VRD+6pwL67ZvEmDHzjCusKuwOW9nOqyLzXBpP64SM0Ku1R6pTv7khtR4LMNM0Qb+eLfk /ndWWQX7hc08Bg/EZULeS5dg856UhKaZhUKSIqKymxhDgnfbQmSSea6tr9RzjJQNp9+S 4d/g==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1775411491; cv=none; d=google.com; s=arc-20240605; b=A2jyYlGiel/bXaBbqvCP8V7lY08BfXMqcGswK9W/lBo8VYkeWDFzXOZbxIPGY9gfid qYTlI3suYKVNLA4hIWmxgf1c7WchgMsiBb1gxLILJ6QI04vXOK4l/7kIb/uELG+sqkyw cVEpqtNrGZNy431H4umJO1Q9gzSa+BE+ar4ePWrr8U3szNlfAO51D7LSD3vLIfXn0VF2 W9iFRMkGvIUDGzlJWcxrNMe+gFrz8Sxgjosd4bJ2MCu3F1x0xbcq9j8I0GxVkT/xlbqw TqTEZzvm42mz86xpCi3+AAV7aznaEeFJ0Yk1Y2Ii+F4i/89TP/Yt1C1jPbWVe2VYgM3s u07Q==
- Archived-at: <https://zsh.org/workers/54287>
- List-id: <zsh-workers.zsh.org>
No patch for this yet (and it may be pretty ugly to make one) but
noting for future reference that none of
: ${ function foo { ... } }
: ${ foo() { ... } }
: ${ function { ... } }
: ${ () { ... } }
are successfully parsed, regardless of what appears in the { ... }.
On the other hand, `always` expressions, short-loops, etc., work fine
(unless they include a function definition).
Messages sorted by:
Reverse Date,
Date,
Thread,
Author