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

Feature request: Visible bell (vbell) after command line #456

Open bb010g opened 1 month ago

bb010g commented 1 month ago

Currently, the visible bell can overwrite potentially important parts of my terminal's scrollback. However, I would like to not completely disable the visible bell. Could an option be added to allow the visible bell to render under the current command line, similar to how completions are rendered, such that terminal scrollback can be preserved?

akinomyoga commented 3 weeks ago

Sorry for the delay. I thought I could implement it soon, but I was working on other parts. I'll add the feature.

BTW, the reason that the messages of the visible bell is shown outside the drawing area of the line editor was that I initially wanted to make the visible bell available also from subshell processes. Since the drawing area of the line editor is under the control of the main shell, if a subshell changes its content, the layout and the rendering of the drawing area would be broken. However, the visible bell turned out to be only used by the main shell after ble.sh is matured, so we can safely render the visible bell within the drawing area of the line editor.

akinomyoga commented 1 week ago

I implemented it in commit fe85e0dd02ad0873c0e50cfd1bd8d2c05319b400. The location of the visible bell can be configured using bleopt vbell_align.

You can show the visible-bell messages below the command line by using the following setting:

# blerc

bleopt vbell_align=panel

Since this is a new feature, there are still some parts unstable. @bb010g Could you update ble.sh by running ble-update in a ble.sh session and check the behavior under the setting bleopt vbell_align=panel?

akinomyoga commented 3 days ago

@bb010g Could you check the behavior? If not, can I close the issue?