Re: why not promote the plague ? (brace|rc|alternative|modern) syntax
Lawrence Velázquez <[email protected]>
| Newsgroups | gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Dec 16, 2024, at 5:15 AM, Lawrence Velázquez wrote: > That's right; the Bourne-style function definition syntax only > permits the body to be a command, not any sort of list (except > within a compound command). That leads to this fun comparison: > > % setopt SHORT_LOOPS > % f() print abc && print xyz; f > xyz > abc > % function g; print abc && print xyz; g > abc > xyz Of course, as soon as I hit Send I realized I'd overlooked the strongest form of this comparison: % setopt SHORT_LOOPS % f() print abc && print xyz; f xyz abc % function g() print abc && print xyz; g abc xyz This could bite someone who's absentmindedly refactoring code. -- vq