Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
some_very_long_command_line --arg1 --arg2=555 --arg4 ... ... ... && <now Tab pressed>
(Now it works. I want to cancel before the following message)
Display all 6936 possibilities? (y or n)

How to about longish search for Tab completion, but not lose the command?

If just press Ctrl+C it will abort, but also not save the command to history.

share|improve this question

Just press backspace. The y/n request goes away and returns your cursor to the command line you were typing.

share|improve this answer
    
It also works from within the --More-- listing of results. – Majenko Feb 28 '11 at 18:47
    
No. I want to cancel before it shows "Display all possibilities" message. – Vi. Feb 28 '11 at 19:30
1  
I understand now. You want to cancel it while it's actually searching the filesystem to compile the list of possible completions. Hmmm... I can't see that being possible. – Majenko Feb 28 '11 at 20:25
    
It is possible (Ctrl+C). But the incomplete command is lost (unless use mouse). – Vi. Feb 28 '11 at 23:06

Just press n.

That should cancel it.

share|improve this answer
1  
No, it does not listen for "n" or "backspace" until it walked the filesystem and build the list. – Vi. Feb 28 '11 at 20:01
    
@Vi: If I press tab, the prompt "Display all x possibilities? (y or n)" appears almost instantly for me even when x is a few thousand. – Dennis Williamson Mar 1 '11 at 0:12
1  
@Denis: If you press Tab. Some aren't as lucky :( – grawity Mar 1 '11 at 13:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.