akinomyoga / ble.sh

Bash Line Editor―a line editor written in pure Bash with syntax highlighting, auto suggestions, vim modes, etc. for Bash interactive sessions.
BSD 3-Clause "New" or "Revised" License
2.33k stars 77 forks source link

Incorrect behaviour with C-w #446

Closed 3ximus closed 1 month ago

3ximus commented 1 month ago
GNU bash, version 5.2.15(1)-release (x86_64-pc-linux-gnu) [Ubuntu 23.10]
ble.sh, version 0.4.0-devel4+59787ee5 (noarch) [git 2.40.1, GNU Make 4.3, GNU Awk 5.2.1, API 3.2, PMA Avon 8-g1, (GNU MPFR 4.2.1, GNU MP 6.3.0)]
bash-completion, version 2.11 (hash:9abb523dbcb688e7fae4b87f5fc9d155b658d9ba, 76898 bytes) (noarch)
fzf key-bindings, (hash:ac1266f574a0a38b575b3ddcbd7bab9d3ab01ce0, 3014 bytes) (noarch) (integration: on)
fzf completion, (hash:9474ea03117b565f340ee8dacb438260b29e0021, 10334 bytes) (noarch) (integration: on)
locale: LANG=en_CA.UTF-8
terminal: TERM=screen-256color wcwidth=15.0-west/15.1-2+ri, tmux:0 (84;0;0)

Hi there! I've been noticing that lately C-w has been incorrectly just storing the deleted work on the shell's clipboard, so when I hit C-y it pastes the last word "cut". The behavior in default bash is that the C-w keeps appending to this internal clipboard so that if you hit C-w in succession and C-y after it pastes everything you cut. I find this feature really useful when cutting and pasting segments of a command around. It used to work like that on blesh but idk since when it's not been working the same. Did this became a configurable behavior that I'm not aware ?

3ximus commented 1 month ago

For added context I have these :

$ bind -p | grep 'C-w'
"\C-w": unix-word-rubout
$ ble-bind | grep -i 'c-w'
ble-bind -m 'emacs' -f 'C-w' 'kill-region-or kill-backward-uword'

They are both default settings

akinomyoga commented 1 month ago

Thanks for the report. This was a regression caused by aa92b42. I fixed it in commit 1313390b8971ff9c6888689fc938bc8e575fbff3. Could you check the latest master? Thank you!

3ximus commented 1 month ago

Yup perfect :+1: It's working now! Thank you once again!

akinomyoga commented 1 month ago

Thank you for checking!