Zsh Mailing List Archive
Messages sorted by:
Re: Can zsh `else` reserved keyword command be aliased and the lexem itself be repurposed as `fi` keyword command?
- X-seq: zsh-users 23018
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Can zsh `else` reserved keyword command be aliased and the lexem itself be repurposed as `fi` keyword command?
- Date: Fri, 29 Dec 2017 00:47:50 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=U8U9OP5vG7KqYprPDrUM45CG29WEbN/zZDIjCMR6uz4=; b=kLSUtxYXXrMafz+1D7VbLPSuJVXINJ42OFwSIAjqxSq6IqXITqPSwKwhj8pFPd9Y8Q PKUvl1NHXt7iCPZA2ZIwYwZ7X1H8Ddd2vQgMfw8FdAE3vlixvLx1PvvTbiT5l6as8ZDt n6I6aI9Chgl9Zhp1WjqELs1F5zEPtW2ZSH55NhUelYrjPbyk/8PA27nTgYFemopva9+Y slORVZQBX1dD4Aqrp0hzsXcSmiO4NV9TqwMwQvQsStI2gI/Bhe0qrWqSrZKY9qd7kNd0 dwasa5RgBe4ofeTrqA8n6s4eLzuIZjvIVvbctCeN2O+XuCt8Cvjsx1BhNveXMH/SzPBv nnyw==
- In-reply-to: <firstname.lastname@example.org>
- List-help: <mailto:email@example.com>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- List-unsubscribe: <mailto:email@example.com>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <firstname.lastname@example.org> <email@example.com>
On Thu, Dec 28, 2017 at 7:19 AM, mathieu stumpf guntz
> ▶ export LANC=C enable -r else; if true; then else fi; disable -r else
You're missing a semicolon after the "C". That's the reason you get
> => export: not valid in this context: -r
> Is there a way to force execution at some point on a single line, as if
> there was performed on two lines?
If I understand your question, the answer is "no": you can't execute
the front part of an "if" until the "fi" has been read. See my
previous email "fully parsed before executed."
(Well, you could switch to csh, which does execute every line as it
goes along, even in complex structures. But no, not in zsh.)
Messages sorted by: