Question

I'm trying to configure my Terminal and I would like to insert @{} at one key-stroke. This works with the following code

# .inputrc
"\e\"": "@{}"

But I also want the cursor to end up inside the braces. How can I do this? The following doesn't work.

# .inputrc
"\e\"": "@{}": backward-char
Was it helpful?

Solution

Try:

"\e\"": "@{}\e[D"

OTHER TIPS

My immediate way to fix your overall goal (not really answering your question, but hopefully helping you anyway): write a bash alias or function for it. grev() perhaps, or something similar - at least, this is what I would do were I in your situation.

I am interested to see if what you originally asked is possible, however, so voting up your question in hopes that you can get a 'real answer'!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top