szermatt / emacs-bash-completion

Add programmable bash completion to Emacs shell-mode
GNU General Public License v2.0
281 stars 33 forks source link

Fix history uncluttering when Bash version is >= 5.1 #57

Closed montag451 closed 1 year ago

montag451 commented 1 year ago

Since Bash version 5.1, the behaviour of HISTCMD has been changed and it breaks history uncluttering. This commit solves this problem by checking the Bash major version and by using the appropriate command to unclutter the history.

montag451 commented 1 year ago

I have no clue why the CI tests are failing. On my machine I tested my changes against Bash 4.4, Bash 5.0, Bash 5.1 and Bash 5.2 and it works fine (the current version of emacs-bash-completion fails with Bash 5.1 and 5.2)

szermatt commented 1 year ago

Thank you for the patch! I'll try it out!

The CI tests failing have nothing to do with the patch. It looks like the CI is broken. I'm having a look.

szermatt commented 1 year ago

I tested manually and everything looks fine. Again, thank you for the fix!

I'm going to merge this change and fix the Cl afterwards.

montag451 commented 1 year ago

Thx for your quick merge and for this wonderful package!