Skip to content
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

Merged
merged 2 commits into from
Jan 21, 2022
Merged

Add support for blesh hooks #1572

merged 2 commits into from
Jan 21, 2022

Conversation

SuperSandro2000
Copy link
Contributor

@SuperSandro2000 SuperSandro2000 commented Jan 21, 2022

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

@SuperSandro2000 SuperSandro2000 marked this pull request as ready for review January 21, 2022 14:51
@SuperSandro2000
Copy link
Contributor Author

I played a bit around with it and jumping from prompt to prompt works like a charm.

@wez wez merged commit 56e9a9a into wez:main Jan 21, 2022
@wez
Copy link
Owner

wez commented Jan 21, 2022

Thanks!

@SuperSandro2000 SuperSandro2000 deleted the blesh branch January 21, 2022 17:43
__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

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+.

Copy link
Owner

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

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants