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.53k stars 81 forks source link

[zoxide >= 0.8.1] Interaction with zoxide #390

Closed 6801318d8d closed 7 months ago

6801318d8d commented 7 months ago

ble version: Bash version:

➜ ble/widget/display-shell-version
GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu) [Arch Linux]
ble.sh, version 0.4.0-devel4+9641c3b8 (noarch) [git 2.43.0, GNU Make 4.4.1, GNU Awk 5.3.0, API 4.0, PMA Avon 8-g1, (GNU MPFR 4.2.1, GNU MP 6.3.0)]
starship, version 1.17.1 (rustc 1.75.0 (82e1608df 2023-12-21) (Arch Linux rust 1:1.75.0-1), 2024-01-03 07:54:53 +00:00)
zoxide, version 0.9.2 (/usr/bin/zoxide)
locale: LANG=en_US.UTF-8 LC_TIME=en_DK.UTF-8
terminal: TERM=xterm-kitty wcwidth=15.0-west/15.1-2+ri, kitty:0 (1;4000;31)

I have Arch Linux.

I installed blesh-git from the AUR.

At the top of my `~/.bashrc', I have:

source /usr/share/blesh/ble.sh --noattach

At the bottom I have:

[[ ${BLE_VERSION-} ]] && ble-attach

I use zoxide to change folders.

If I run

cd /
z Doc <TAB>

It calls fzf with some alternatives. I press Enter to choose the first one, /home/USERNAME/Documents.

At this point, without ble.sh, the shell shows:

➜ z Doc z#/home/USERNAME/Documents/ 

With ble.sh, the line shows nothing at all. The cursor gets positioned at the beginning of the line, and the line is empty.

In both cases, pressing Enter will cd into /home/USERNAME/Documents.

akinomyoga commented 7 months ago

Is the problem fixed by running the following command?

$ ble-import -f integration/zoxide
6801318d8d commented 7 months ago

Is the problem fixed by running the following command?

$ ble-import -f integration/zoxide

Yes it is.

Was it written in the README and I lost it?

akinomyoga commented 7 months ago

Thanks for the check.

No, it's not written, and it's not a command that the user needs to run. That command is supposed to be automatically run by ble.sh when ble.sh detects the zoxide completion, but the detection seems to have been broken since zoxide 0.8.1. I just asked you to run that command to confirm the problem. I'll fix the detection in the next push.

6801318d8d commented 7 months ago

I run eval "$(zoxide init bash)" after source /usr/share/blesh/ble.sh --noattach but before [[ ${BLE_VERSION-} ]] && ble-attach

akinomyoga commented 7 months ago

I wrote that I'll fix it in the next push.

I run eval "$(zoxide init bash)" after source /usr/share/blesh/ble.sh --noattach but before [[ ${BLE_VERSION-} ]] && ble-attach

So... what is the matter?

6801318d8d commented 7 months ago

Whether I was initializing it correctly

akinomyoga commented 7 months ago

I assure you that that setup is correct.

akinomyoga commented 7 months ago

I fixed it in commit 29cd8f101e66706f9bbd6ca49edba3d5f59ff74d. Could you update ble.sh by running ble-update (or by your AUR helper) and see if the problem is fixed?

6801318d8d commented 7 months ago

Yes it is fixed.

Thank you very much 😄

akinomyoga commented 7 months ago

Thank you for confirmation!