GNU bug report logs - #73650
31.0.50; [PATCH] Improve correctness of Eshell conditional forms and allow if/else chaining

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Sun, 6 Oct 2024 01:35:01 UTC

Severity: normal

Tags: patch

Found in version 31.0.50

Done: Jim Porter <jporterbugs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Porter <jporterbugs <at> gmail.com>
To: 73650 <at> debbugs.gnu.org
Subject: bug#73650: 31.0.50; [PATCH] Improve correctness of Eshell conditional forms and allow if/else chaining
Date: Sat, 5 Oct 2024 18:34:24 -0700
[Message part 1 (text/plain, inline)]
These patches improve a few inconsistencies in how Eshell conditionals 
work, especially when using Lisp forms inside of the command-form of 
"if". For example, before this patch, the following command outputs 
nothing at all:

  if (zerop 0) (identity \"yes\") (identity \"no\")

With the patches, it now correctly outputs "yes".

I also added the ability to use the "else" keyword so that you can chain 
together if/else blocks like so:

  if {[ -f file.txt ]} {
    echo found file
  } else if {[ -f alternate.txt ]} {
    echo found alternate
  } else {
    echo not found!
  }
[0001-Simplify-creation-of-Eshell-command-forms.patch (text/plain, attachment)]
[0002-Improve-correctness-of-Eshell-sub-forms.patch (text/plain, attachment)]
[0003-Add-support-for-chaining-conditionals-in-Eshell.patch (text/plain, attachment)]

This bug report was last modified 219 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.