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

Use ble.sh along with oh-my-bash #178

Closed tonycituk closed 2 years ago

tonycituk commented 2 years ago

Hello there, i find awesome the features of ble.sh. How can i use it along with oh-my-bash prompt?

I install ble.sh from the AUR. As the README says, I added [[ $- == *i* ]] && . /usr/share/blesh/ble.sh to bashrc. Before: jue 17 feb 2022 08:37:24 CST After: jue 17 feb 2022 08:38:53 CST Working as expected, but no more stylish prompt.

Note: I'm not a native english speaker, sorry for the grammatical errors.

SuperSandro2000 commented 2 years ago

You need to source ble.sh first then load oh-my-bash.


Edit by @akinomyoga (2022-10-03): When you source version 0.3 of ble.sh first, you need to follow README §1.3. If you want to source version 0.4+ of ble.sh first, just a naive source would still work, but the way described in README §1.3 would still be more reliable.

akinomyoga commented 2 years ago

Thanks! In my environment, it seems to work regardless of the loading order of oh-my-bash.sh and ble.sh for both ble-0.3 and master version.

akinomyoga commented 2 years ago

@tonycituk Have you solved the problem?

I have read your question again and thought that maybe you have removed the settings of oh-my-bash and added the line for ble.sh? In that case, you can actually put both settings in .bashrc to use both of ble.sh and oh-my-bash. In that case, I recommend putting the setting for ble.sh before the oh-my-bash settings.

akinomyoga commented 2 years ago

@tonycituk ping?

akinomyoga commented 2 years ago

@tonycituk Closing the issue.

snqzspg commented 1 year ago

Try adding the following line after source $OSH/oh-my-bash.sh but before ble-attach.

_omb_theme_PROMPT_COMMAND

This issue seems to only surface on SOME terminal emulators (like gnome-terminal)