Closed tessus closed 4 months ago
Hmm, OK. Could you update the function ble/widget/fzf-git
with the following definition?
function ble/widget/fzf-git {
ble/term/leave-for-widget
local insert=$(_fzf_git_$1)
ble/term/enter-for-widget
ble/widget/insert-string "$insert"
ble/textarea#invalidate
}
I'll also update contrib/integration/fzf-git.bash
later.
I think the reason that the problem didn't happen before was just because iTerm2 was not recognized. I think it was treated as a VTE-based terminal instead. In ble.sh, the VTE-based terminals are blacklisted for advanced keyboard protocols, so the advanced keyboard protocols were not enabled. I recently added da6e71db89e6f4a2be4f8c2c610ef4b418b9725a to detect iTerm2, so ble.sh now enables modifyOtherKeys
in iTerm2, and then fzf
was confused by modifyOtherKeys
. I forgot to adjust the terminal state when calling the command fzf
in ble/widget/fzf-git
.
This worked! Thank you.
In my case it is local insert=$(fzf_$1)
though... I think this issue can be closed. Please feel free to do so.
Thank you for checking the behavior! I applied fixes also to contrib/integration/fzf-git.bash
in commit https://github.com/akinomyoga/blesh-contrib/commit/3019780ed33a4bc352ed3ab05e9508a6e7386bc7.
Thank you for the quick reply.
Unfortunatelty after the last update to ble my arrow-up no longer works (it is supposed to invoke atuin) and when starting the shell, I can see the text "loading history...." (under the current prompt) for 500ms and then it disappears. It also seems sluggish and at one point an alias didn't work.
I have reverted back to fcbf1ed.
Hmm, OK. Thank you for the report. I could reproduce the problem. The problem seems to happen when Atuin is loaded before ble.sh. I'll check it.
I am not sure how this is possible. I source ble at the beginning of my .bashrc
, then there is a bunch of other stuff, and at the very end atuin is initialized.
I pushed a fix bb2dae6e6bdc15cb853e463021268087b45c54b9.
This was a serious regression caused by 51e762fe1c82e3ecb02940462164860f2765cb32, where I changed the initialization position of the variable for the Bash version detection (_ble_bash
). I put builtin unset -v _ble_bash
in a wrong place, which caused the missing Bash version information. Then, the entire ble.sh
started to work in the "Bash 3.0" mode and caused incompatibility with the behavior difference between the Bash versions.
[ Honestly, I was surprised that ble.sh
seemed to work mostly fine in Bash 5.3 (I'm currently testing ble.sh under the unreleased next Bash version 5.3) with its "Bash 3.0" mode, although I've never tried that until now. I thought it would be broken more terribly. ]
Thanks. The fix worked!
Thank you for the confirmation!
I am using my own fzf git integration and you gave me the solution to make it work with ble:
The full file is here: fzf_git.sh.txt
However, when I now press
C-g C-h
I can't use anyCtrl-key
key combinations in fzf anymore. Luckily I can still useEsc
to quit fzf.Here is a video:
(First I use
C-g C-h
to invoke fzf. Then I pressCtrl-S
. Nothing happens. Then I pressCtrl-S
again and 2 timesCtrl-C
.)https://github.com/user-attachments/assets/0284a08a-25a5-4449-9e9a-7d725e3571b4