-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
Suggestion:
It would be great to have a customizable binding for bashhub-i-search.
Motivation:
The current binding collides with the default backward-char binding.
Ideas:
This could be controlled with an env variable, I think this could be the easiest implementation and it's backwards-compatible.
Naive example:
# in .bashrc
# rebind bashub to C-x C-b
export BH_BIND_PREFIX="\"\C-x\C-b\""
# in bashhub.sh
__bh_hook_bashhub() {
if [ -t 1 ]; then
# Alias to bind Ctrl + B
if [ -z "${BH_BIND_PREFIX+x}" ]; then
bind '"\C-b":"\C-ubh -i\n"'
else
bind "$BH_BIND_PREFIX"':"\C-ubh -i\n"'
fi
fi
# ...The amount of quotes can be reduced most probably, but I think the example is good enough. What do you think? :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels