Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

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

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:

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. – zubinmehta 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .