Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
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: <ef2c2e74-8f03-bfcb-1dd9-bfb1594c8b40@culture-libre.org>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <ecebd27c-08ad-7cb3-50a9-d6ba56e288ef@epopia.com> <ef2c2e74-8f03-bfcb-1dd9-bfb1594c8b40@culture-libre.org>
On Thu, Dec 28, 2017 at 7:19 AM, mathieu stumpf guntz
<psychoslave@xxxxxxxxxxxxxxxxx> wrote:
>
> ▶ 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:
Reverse Date,
Date,
Thread,
Author