-
-
Notifications
You must be signed in to change notification settings - Fork 837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for blesh hooks #1572
Conversation
I played a bit around with it and jumping from prompt to prompt works like a charm. |
Thanks! |
__wezterm_install_bash_prexec | ||
# blesh provides it's own preexec mechanism which is recommended over bash-preexec | ||
# See https://github.com/akinomyoga/ble.sh/wiki/Manual-%C2%A71-Introduction#user-content-fn-blehook for more details | ||
if [[ ! -v BLE_VERSION ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[[ -v var ]]
is Bash 4.2 feature. Unfortunately, this will produce error messages in lower versions of Bash such as Bash 3.2 in macOS. [[ ! ${BLE_VERSION-} ]]
is the way that works in all the versions of Bash 3.0+.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed 78ea214 which uses the same -n "$foo"
test that we use for testing for zsh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I usually don't give a damn about the ancient versions of Darwin.
blesh provides its own hooks which are better integrated into it. No need to duplicate the functionality and slow down the shell unnecessarily. See https://github.com/akinomyoga/ble.sh/wiki/Manual-%C2%A71-Introduction#user-content-fn-blehook