GNU bug report logs - #65604
[PATCH] Display the exit code if the last command failed in Eshell

Previous Next

Package: emacs;

Reported by: Davide Masserut <dm <at> mssdvd.com>

Date: Tue, 29 Aug 2023 22:45:01 UTC

Severity: normal

Tags: patch

Fixed in version 30.1

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

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Davide Masserut <dm <at> mssdvd.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Display the exit code if the last command failed in Eshell
Date: Wed, 30 Aug 2023 00:24:28 +0200
[Message part 1 (text/plain, inline)]
Tags: patch

There are commands that fail without printing any messages, but 
set specific error codes.

This patch extends the default prompt function to show the exit 
code of the previous failed command.

Before:

~ $ false
~ $

After:

~ $ false
~ [1] $

I believe this is a good default, since it is displayed only when 
a error occurs and hopefully makes debugging easier by showing the 
error code without further input.


In GNU Emacs 30.0.50 (build 10, x86_64-pc-linux-gnu, GTK+ Version
3.24.38, cairo version 1.17.8) of 2023-08-29 built on T480s
Repository revision: ed77dc17f657d99ccf23778c14f06f7226f478f0
Repository branch: master
System Description: Arch Linux

Configured using:
'configure -C --prefix /home/davide/.local --with-pgtk
--with-native-compilation --enable-link-time-optimization
--enable-locallisppath=/usr/share/emacs/site-lisp/
'CFLAGS=-march=native -O2''
[0001-Display-the-exit-code-if-the-last-command-failed-in-.patch (text/patch, attachment)]

This bug report was last modified 1 year and 256 days ago.

Previous Next


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