Q:

Bash - bind key to a string (not a function)

How do I get a key binding to result in inserting arbitrary text at the command line? In zsh I do this:
bindkey -s "^[m" 'myspecialscript '

In bash, is there an equivalent? None of the built-in functions will do what I want.

A:

bind '"\e[[E": "/home/yourscript.sh\n"' binds to f5 replace the first part with your key pref

