Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In linux prompt,we can type !mysql and so on to match a history command to save time.

Is there a utility for windows(XP to be exact) that enables this feature?

share|improve this question
    
The Windows Console actually has a "history", accessible with Up/Down and F7, and usable in most command-line programs (not just cmd.exe). Unfortunately it doesn't have ! and other advanced features. –  grawity May 21 '10 at 14:18
    
have you tried powershell? –  Robert S Ciaccio Oct 20 '10 at 1:38

2 Answers 2

I suggest you should install GIt-bash on windows and you can do everything you would want to do without tweaking the bad-daemon. Link to git-bash download: http://code.google.com/p/msysgit/downloads/list

share|improve this answer
    
I'm almost certain git-bash will be using Cygwin, which would be what the question'er is after (rather than something primarily intended just for git) –  dbr May 21 '10 at 11:20
    
Yes, I want to do it in the windows command prompt, so it's not this one. –  ApacheNoSkype Jun 1 '10 at 9:09
    
Even though it's primarily intended just for git, it has this bash features which can be installed (and you can skip installing the git engine). But anyway, sure no point if it doesn't fit your exact criteria. –  zm1 Jun 7 '10 at 7:20

Try typing mysql then press F8.

It searches history backwards for anything starting with mysql. Multiple presses keep searching backwards, like Alt+P or Ctrl+R in bash.

It uses a feature called DOSKey, that used to be an optional extra in the DOS days, but it's been standard in cmd since Windows XP (and maybe NT).

DOSKey reference.

share|improve this answer

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.