Overview

Clink combines the native Windows shell cmd.exe with the powerful command line editing features of the GNU Readline library, which provides rich completion, history, and line-editing capabilities. Readline is best known for its use in the Unix shell Bash, the standard shell for Mac OS X and many Linux distributions.

For details, refer to the Clink documentation.

Download

Downloads are available from the releases page.

See the issues page for known issues or to file new issues.

Feature Highlights

Auto-Suggestions

Clink offers suggestions as you type based on history, files, and completions.

C:\dir>findstr_/s needle haystack\*

Press Right or End to accept a suggestion (shown in a muted color).

Completions

Clink can complete words when you press Tab or Ctrl-Space.

Built-in completions are available for executables, aliases, command names, directory commands, and environment variables. You can use Lua scripts to add custom completions.

Persistent History

Clink stores persistent history between sessions.

  • Up and Down cycle through history entries.
  • PgUp and PgDn cycle through history entries matching the typed prefix.
  • F7 show a popup list of selectable history entries.
  • Ctrl-R and Ctrl-S search history incrementally.

Scriptable Prompt and Colored Input

You can customize the prompt dynamically with Lua scripts -- like in other shells -- but never before possible in cmd.exe!

C:\repos\clink git main->origin *3 !1
> git merge --help_

Your input is colored by context sensitive completion scripts.

Command Line Editing Improvements

Clink supercharges the command line with new input editing commands and configurable key bindings.

  • Alt-H to display all key bindings.
  • Tab for completion.
  • Ctrl-Space for an interactive completion list.
  • Ctrl-Z to undo input.
  • Shift-Arrows to select text, and type to replace selected text.

Convenience

Optional auto-answering of the "Terminate batch job?" prompt.

Directory shortcuts:

  • dirname\ is a shortcut for cd /d to that directory.
  • .. or ... are shortcuts for cd .. or cd ..\.. (etc).
  • - or cd - changes to the previous current working directory.

Usage

There are several ways to start Clink.

  1. If you installed the auto-run, just start cmd.exe. Run clink autorun --help for more info.
  2. To manually start, run the Clink shortcut from the Start menu (or the clink.bat located in the install directory).
  3. To establish Clink to an existing cmd.exe process, use <install_dir>\clink.exe inject.

You can use Clink right away without configuring anything:

See Getting Started for information on getting started with Clink.

The new Clink tries to be as backward compatible with Clink v0.4.9 as possible. However, in some cases upgrading may require a little bit of configuration work. More details can be found in the Clink documentation.

Clink can be extended through its Lua API which allows easy creation of context sensitive match generators, prompt filtering, and more. More details can be found in the Clink documentation.