emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/bash-completion 2010d8bf9e 210/313: Fix history unclutteri


From: ELPA Syncer
Subject: [nongnu] elpa/bash-completion 2010d8bf9e 210/313: Fix history uncluttering
Date: Sat, 3 Dec 2022 10:59:31 -0500 (EST)

branch: elpa/bash-completion
commit 2010d8bf9eb1d34b3b92151930b9791498264fd4
Author: montag451 <montag451@laposte.net>
Commit: montag451 <montag451@laposte.net>

    Fix history uncluttering
    
    The use of negative offsets with "history -d" is only available in
    Bash 5 and newer. The new way of removing the completion command from
    the history works with almost all versions of Bash.
---
 bash-completion.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bash-completion.el b/bash-completion.el
index 99603530cd..098ef3995f 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -1365,7 +1365,7 @@ Return the status code of the command, as a number."
                (concat
                 commandline
                 (when (not bash-completion-use-separate-processes)
-                  "; echo -e \"\v$?\"; history -d -1")
+                  "; echo -e \"\v$?\"; history -d $((HISTCMD - 1))")
                 "\n"))
       (unless (bash-completion--wait-for-prompt process prompt-regexp timeout)
         (error (concat



reply via email to

[Prev in Thread] Current Thread [Next in Thread]