Make Windows cmd more useful: command line editing and auto completion with clink

Like every other admin, I sometimes have to use the command line in Windows. The feature I missed the most (from using macOS) in cmd.exe is the automatic completion of commands and filenames with tab.

After some digging I found the perfect tool: clink.

Clink is free software, licensed under the GNU General Public License v3.0.

Clink has some other useful features, too:

  • The same line editing as Bash (from GNU’s Readline library).
  • History persistence between sessions.
  • Context sensitive completion
    • Executables (and aliases).
    • Directory commands.
    • Environment variables
    • Thirdparty tools; Git, Mercurial, SVN, Go, and P4.
  • New keyboard shortcuts
    • Paste from clipboard (Ctrl-V).
    • Incremental history search (Ctrl-R/Ctrl-S).
    • Powerful completion (TAB).
    • Undo (Ctrl-Z).
    • Automatic “cd ..” (Ctrl-PgUp).
    • Environment variable expansion (Ctrl-Alt-E).
    • (press Alt-H for many more…)
  • Scriptable completion with Lua.
  • Coloured and scriptable prompt.
  • Auto-answering of the “Terminate batch job?” prompt.

Now go check it out. In my opinion, clink should run on every Windows install. It certainly will on mine.