If I write ls bla.*
at the prompt and then I press = while the cursor is still on the bla.*
part of the command line, the list of files matching bla.*
is printed. If I press *, that word is substituted for that list.
Is something similar possible with reference to variables, rather than shell glob patterns?
In other words, I'm looking for something that would print the value of $THISVARIABLE
when I press some_key while the cursor is on $THISVARIABLE
in the command line, and/or substitute it when I press another_key.
Important detail, I use set editing-mode vi
in my ~/.inputrc
.