In either Windows command prompt cmd.exe or the PowerShell, I can do tab completion for many things, such as cycling through commands, filenames, or directories. The problem is, it deletes everything after the cursor. So, if for example, I have two files I want to process, namely bojot.mp4 and donat.mp4, which both reside in the same directory, let's say I start with the first one:

ffmpeg -i c:\tmp\vid\bojot.mp4 -an -sameq -s 640x480 bangang.mpg

So far so good. Now I just need to change the input file right? Press once, retrace to bojot.mp4 and delete it, type d then TAB, just like in bash. But what I got is:

ffmpeg -i c:\tmp\vid\donat.mp4

What? Now I have to retype all the params and args! Can't I fix this?

Don't tell me Cygwin/MSys is the only way…

  • This has been driving me crazy for the last weeks where I really started using Windows. – slhck Mar 21 '11 at 18:34

I don't think this is possible with CMD, but you can with TCC/LE, which is a free alternative command shell with a superset of features.

I have it as a tab within Console2, where I have defined standard keyboard shortcuts for Copy and Paste as well, to make life easier.

  • Hooray! A lightweight (it really starts up fast!) command console with just what I need! Except that you were a bit too late; I already installed Cygwin :( But thanks for pointing to Console2! (I wonder why it defaults to insert mode at first) (Note to self: preinstall TCC/LE on the next Windows box) – syockit Mar 22 '11 at 9:11
  • @syockit: You can also wrap Cygwin bash within Console2, in case you hadn't realised. – paradroid Mar 22 '11 at 17:03

If you want something lightweight that works within cmd, just install Clink. Makes path completion work as if it wasn't implemented by a drunkard. Also completes executables and environment variables. Fixes some of cmd's other shortcomings as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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