Welcome!

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

SignUp Now!

How to? return to completion mask after auto-completion

Feb
240
3
I love using TCC's auto-completion together with specific masks. For instance, in order to locate a file within a directory of several hundred files I'll type:
copy *avi*.doc
Then I'll hit TAB to quickly cycle through all those doc files that contain "avi" in the filename.
However, sometimes, after cycling through a few files, I'll realize that I erred slightly in specifying the mask. Is there any key that can return me to my original mask (*avi*.doc) so that I can edit it and try again?
(Hitting ESC clears the entire line - but perhaps there is some key like shift-ESC that can cancel just the auto-completion and bring back the mask)
 
Indeed, Scott. ;)

Nevertheless, maybe I'm being shortsighted but I fail to see how this could be significantly more efficient and/or useful than the current method of <Esc to clear the current line> <up arrow to recall the previous command> prior to editing. Any new keystroke that Rex might add to accomplish this would still probably require a minimum of two key presses (e.g., Shift-Esc) so where's the gain? Well, I suppose there's the argument that it could be done with one hand rather than two so maybe it could be slightly more efficient.
 
Indeed, Scott. ;)

Nevertheless, maybe I'm being shortsighted but I fail to see how this could be significantly more efficient and/or useful than the current method of <Esc to clear the current line> <up arrow to recall the previous command> prior to editing. Any new keystroke that Rex might add to accomplish this would still probably require a minimum of two key presses (e.g., Shift-Esc) so where's the gain? Well, I suppose there's the argument that it could be done with one hand rather than two so maybe it could be slightly more efficient.
Esc loses the entire command, and <up> will return the last command which may or may not have anything at all to do with the current command. Neither will get you close to returning to command you typed with the original mask.
 
Heh, I was thinking of commands that were already in the history. This is why you don't post to fora with only two hours of sleep under your belt.
 
You can use Ctrl_K before you hit TAB the first time to write the command with the original mask to the command history, and then use UP to recall it.
Code:
REN  Partial*{ctrl_K}
{UP}
 
Kudos to Avi. That is a situation that I find myself in regularly, and one that - especially when dealing with paths that contain spaces, and thus have to be quoted - takes a bit of fiddling to undo manually, but I've never thought to ask for a 'revert' key. Dave's Ctrl-K suggestion is a neat one but requires anticipating the problem, in which case I'd probably choose the correct mask in the first place.

@Rex, I know this sounds silly, but apropos of previous discussions about killer features that trigger an upgrade, this one on its own would save me enough time and aggravation to make it worth paying fifty bucks to upgrade (and to go through the hassle of persuading my employer to upgrade my work copy despite TC not being on their list of 'standard software')
 
You can move your votes from something else.

But, I wanna vote for those too! And I wanna have a cookie! And I wanna... Sorry, went to the store yesterday and apparently some of the screaming children affected me more than I originally thought.
 
You can move your votes from something else.

I know, but I didn't want to take votes away from other proposals I also like. :-( In Spanish, this is called "Desvestir a un santo para vestir a otro." (I believe the equivalent English phrase is "Robbing Peter to pay Paul.").

I'll have to have a look at all my votes tonight to see who gets the shaft.
 

Similar threads

Back
Top