1

Sometimes its very useful to bind a key to insert a string. Bash uses readline, so I have these two bindings in my ~/.inputrc that I find very useful:

"\C-xp": "/usr/lib/python2.7/site-packages/" "\C-xf": "find /src -maxdepth 5 -type f -name '*.py' | xargs grep -En " 

I've been messing around with zsh lately, but I can't figure out how to get this behavior. Is there some magic form of bindkey that does this?

1 Answer 1

3

ZSH manual: 4.5.4: Binding strings instead of commands says:

It's possible to assign an arbitrary string of characters to a key sequence instead of an editor command by giving bindkey the option -s.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.