branch: elpa/bash-completion
commit 2010d8bf9eb1d34b3b92151930b9791498264fd4
Author: montag451 <[email protected]>
Commit: montag451 <[email protected]>
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