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.72k stars 86 forks source link

ble ignores/tramples inSHELLisense bindings #464

Open NireBryce opened 4 months ago

NireBryce commented 4 months ago
❯ ble/widget/display-shell-version
  GNU bash, version 5.2.26(1)-release (x86_64-pc-linux-gnu) [NixOS 24.11 (Vicuna)]
  ble.sh, version 0.4.0-devel3+1a5c451c (noarch) [git 2.39.0, GNU Make 4.3, GNU Awk 5.1.1, API: 3.1 (GNU MPFR 4.1.0-p13, GNU MP 6.2.1)]
  bash-preexec, (hash:9dc354041923535a313d3a2bc9af15a2cc37a65a, 14255 bytes) (noarch)
  starship, version 1.19.0 (rustc 1.78.0 (9b00956e5 2024-04-29) (built from a source tarball), 1980-01-01 00:00:00 +00:00)
  locale: LANG=en_US.UTF-8
  terminal: TERM=xterm-256color wcwidth=15.0-west/15.0-2+ri, kitty:0 (1;4000;35)

ble intercepts the bindings for inshellisense, another completion engine that uses it's own gui menu widget.

in non-ble bash the behavior is tab/up/down/escape interacts with the completion menu when active, otherwise normal shell bindings.

I fully understand if this isn't a high priority, I know I'm probably an edge case (and you're mainly a completion engine), but putting the issue out there in case this is larger than just inshellisense.

akinomyoga commented 4 months ago

Cross-Reference: https://github.com/microsoft/inshellisense/issues/262

akinomyoga commented 4 months ago

In my understanding, Inshellisense is working at the terminal level. Since ble.sh just processes the byte sequence it receives from the terminal, ble.sh doesn't have a way to interfere with Inshellisence, which works inside the terminal. If anything can affect the behavior of Inshellisence, maybe Inshellisence only works in a specific mode of the terminal. For example, ble.sh turns on the modifyOtherKeys mode of the terminal. @NireBryce Could you check if the behavior of Inshellisence changes with the following setting?

# ~/.blerc

bleopt term_modifyOtherKeys_external=
NireBryce commented 4 months ago

The config line doesn't make it work for kitty but it does seem to be terminal-specific, kitty breaks but it works on konsole. I'll try to poke around tomorrow

akinomyoga commented 3 months ago

@NireBryce Thank you for the information.

I'll try to poke around tomorrow

Do you have any updates on this?

akinomyoga commented 2 weeks ago

@NireBryce The upstream inshellisense seems to have added a fix. Could you test if the problem is fixed?