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

Get rid of "resolving multiline history ..." message #495

Closed digitalguy99 closed 2 months ago

digitalguy99 commented 2 months ago

Every single time when I load bash with ble.sh there's this message popping up:

resolving multiline history ...

I've looked throughout the manuals and couldn't find a way to remove it. So I had to comment out line 18048 from ~/.local/share/blesh/ble.sh manually which I believe is not best practice. Did I miss something in the manuals or could you tell me a better way to do this? Like maybe some setting I could put on my ~/.blerc?

akinomyoga commented 2 months ago

Every single time when I load bash with ble.sh there's this message popping up:

resolving multiline history ...

This message is shown while the shell is blocked from loading the command history for ble.sh in Bash 3.1 and 3.2, and it should usually disappear immediately. It is typically only shown for unnoticeably short moments. If you see the message every time, maybe something unexpected is happening. I have several questions to confirm the current situation:

Did I miss something in the manuals

No, the way to remove it is described nowhere because the message is intentional and I didn't expect to remove it so far.

or could you tell me a better way to do this? Like maybe some setting I could put on my ~/.blerc?

You can have the following line in ~/.blerc to suppress messages from time-consuming history processing:

# blerc

blehook history_message=
digitalguy99 commented 2 months ago

Ah yes, it does disappear really quickly. It's just a bit annoying to see such a message every time. But yeah, I can confirm that the solution you provided works. And to answer your other questions:

Q1: Which version of Bash do you use? If you use bash < 4.0 as a daily driver on that machine, if possible, I recommend switching to the latest version of Bash. Bash versions of bash < 4.0 lack many built-in features that ble.sh wants to use to implement its processing efficiently.

I'm using GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin23)

Q2: Is that message shown in the startup phase? Or is it shown after you start to input something?

It shows in the startup phase.

Thank you for your quick response and help. Feel free to close the issue 😊👍

akinomyoga commented 2 months ago

Thank you!

I'm using GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin23)

This means it is Bash 3.2 on macOS. I'd really recommend using the latest version of Bash. The feature set of ble.sh available in Bash 3.2 is small. In addition, ble.sh becomes very slow in Bash 3.2. You can install the latest version of Bash in macOS by using e.g. brew. If Bash is your default interactive shell, you can add the installed version to /etc/shells and set it as the default shell of the user by using chsh -s (You can search the internet for details).

digitalguy99 commented 2 months ago

Okay, thanks for the tip.