Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Declined @@key alias at beginning of partial command line

May
12,995
174
I don't know how folks use the @@key automatic aliases, but it's hard to come up with a scenario where I'd want text added at the end of a partial command line and then the command line automatically executed. If others do that, I'd like to hear how.

So I wonder if it couldn't be made to insert the alias (plus a space) at the beginning of the command line. I thought of that because I have @@Ctrl-o=OPTION and I wanted to /uCtrl-o to check for updates.
 
The only one I've ever defined is @@Alt-F4=exit. I've tried to use insert-only aliases to do magic command line editing, but they never seem to do what I want.
 
That doesn't make sense. What do you expect to happen when you press X?

Trying to cancel the current command line? Pressing ESC erases it, and you can put an ESC in the definition with ^E.
Code:
alias @@alt-f4=^^eexit
 
The only one I've ever defined is @@Alt-F4=exit. I've tried to use insert-only aliases to do magic command line editing, but they never seem to do what I want.
I use a similar one.
Code:
alias @@Alt-F4 `^e@exit`
It clears a command line in progress and keeps "exit" out of the history.

I just noticed that Alt-F4 (without an alias) closes a console in Windows 10.
 
So I wonder if it couldn't be made to insert the alias (plus a space) at the beginning of the command line. I thought of that because I have @@Ctrl-o=OPTION and I wanted to /uCtrl-o to check for updates.

EKeys can do that:
Code:
ekey /c /e ctrl-o=option
 
What's ekey?

This'un here: EKeys Plugin

The original idea was just to use a hotkey to run the word at the cursor through a function, say @UPPER or @SEARCH or @EVAL. But it picked up a few other features, like prepending a word to the start of the command line.
 

Similar threads

Back
Top