From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5168 invoked by alias); 30 Dec 2017 22:07:08 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23036 Received: (qmail 6621 invoked by uid 1010); 30 Dec 2017 22:07:08 -0000 X-Qmail-Scanner-Diagnostics: from mail-qk0-f176.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.220.176):SA:0(-1.9/5.0):. Processed in 11.25113 secs); 30 Dec 2017 22:07:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | 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; bh=/EfMLtygO9aM3iLIvpOnjDUI1AOI+5exYQyvealH1yI=; b=sRvkn5+ZBNL7BFD8XbEKOR3X6EpSkgbuptc01vBA0/nx5xDhQb8QOvA6ab6EPIxiCL CjbyCgvLOp7NpHe1SMajY9k/SriIVW9UY9em5xrF4y4znh0UKvDCzGfObOxK6EbgC/bt ZX33+02wS4OyTRparCt8SsP/8GSyIhR9DNWAOQ7emqWj5h8V8DVfxbigS4e+hybsV4/f iDO4fk5ZlVarsHmEQfg9beuF7B3HcFoWTU8tLm+Iipnffv4f0wrV02CZdLobUXf2/yCP 9OXyYrknZFfgaM8qFyIrUZIkTlCwjQikG2kuUM9ZRSbmi0Em1wDdiO+bHlcW7T9GOgAh AUQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=/EfMLtygO9aM3iLIvpOnjDUI1AOI+5exYQyvealH1yI=; b=Xdex8V0+m/0AEsWneQu8/7qPlzn+d9sEsE/dZ9Ds4npK39W/ifm+ZNaidx0cyZ7rOm hdVf45/ixjHTg+Zwe2qUib7I25ihezm7fmP0jz39nnHyVxfs58urESf0gmnZf0XCxccC BL38H68sPC8iOCLEa8SIiqfRbOSEiOAZ9pUy9FeFnMf3XIxzYoWyQmdL5Tji7i7uZe4f LuPGlj9+IX2Jrp0OIy7vBtPyrbjThJgNI+aitwP77Vp7BWcgLfqhNm88R32qZUVfnqHL pej/HK//J2dOrfEmipzbOtfMG3qiHtgdmdm+duDRjpS3es9nMP/nwqR5EHv1KDIss6O0 hxlw== X-Gm-Message-State: AKGB3mJoN01JneIfAhSjh6obCd/ZGtVwUUWsju6x1QaW3fmMsuKdLhQa GoCRgqxjHsfttcWm8ZOTqOBQ7IJUWZy5DSHt7usBsg== X-Google-Smtp-Source: ACJfBotwrkGjlk58nVx5V4yg7nmrqxL4iZbZsVq51I3v1W4YZfWEls9azg+Ka9/dFp0/KK9LZXtSeGzFRcQ/6R17RvM= X-Received: by 10.55.74.83 with SMTP id x80mr10119684qka.239.1514671613554; Sat, 30 Dec 2017 14:06:53 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <71ef7896-39f8-66fe-f8f8-c7c81b11e2ce@culture-libre.org> <918acbfa-b637-1d13-816b-c6edee0afa5c@culture-libre.org> <81beaeae-6507-c961-b6fd-5831ba58e045@eastlink.ca> From: Bart Schaefer Date: Sat, 30 Dec 2017 14:06:52 -0800 Message-ID: Subject: Re: Can zsh `else` reserved keyword command be aliased and the lexem itself be repurposed as `fi` keyword command? To: Zsh Users Content-Type: text/plain; charset="UTF-8" On Sat, Dec 30, 2017 at 9:22 AM, Ray Andrews wrote: > Cool! These insights from history are so very illuminating. Mind ... that > would seem to make it all the more possible/acceptable to do what Mathieu > wants, it'd be a compatibility feature not some sort of abominable novelty > the way my suggestions are abominable novelties. It would still be pretty abominable. Every loop structure would need two implementations, the current one and the "csh" one, because if you execute as you parse you can't keep the parse around for re-use -- you have to store all the original text and re-parse it again the next time. Some csh implementations put the text in a hidden file and use lseek() to move back and forth in the file for looping. For scripts they just use the original source file! (I've written self-modifying csh scripts by taking advantage of this.) You really don't want to go there. If you're desperate to experience something like this, you can get close in an interactive shell by having accept-line call "eval" on the buffer and then deciding what to do next based on the results. It'd be a bit tricky to retain what's already been processed once so you know whether/when to eval it again, but something could probably be worked out. I'm not going to try.