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.
Screenshot
Features
Here are some highlights of what Clink provides:
- The same line editing as Bash (from the GNU Readline library version 8.1).
- History persistence between sessions.
- Context sensitive completion;
- Executables (and aliases).
- Directory commands.
- Environment variables.
- Context sensitive colored input text.
- Automatic suggestions from history and completions.
- New keyboard shortcuts;
- Interactive completion list (Ctrl+Space).
- Incremental history search (Ctrl+R and Ctrl+S).
- Powerful completion (Tab).
- Undo (Ctrl+Z).
- Environment variable expansion (Ctrl+Alt+E).
- Doskey alias expansion (Ctrl+Alt+F).
- Scroll the screen buffer (Alt+Up, etc).
- Shift+Arrow keys to select text, typing replaces selected text, etc.
- (press Alt+H for many more…)
- Directory shortcuts;
- Typing a directory name followed by a path separator is a shortcut for
cd /d
to that directory. - Typing
..
or...
is a shortcut forcd ..
orcd ..\..
(each additional.
adds another\..
). - Typing
-
orcd -
changes to the previous current working directory.
- Typing a directory name followed by a path separator is a shortcut for
- Scriptable autosuggest with Lua.
- Scriptable completion with Lua.
- Scriptable key bindings with Lua.
- Colored and scriptable prompt.
- Auto-answering of the “Terminate batch job?” prompt.
By default Clink binds Alt+H to display the current key bindings. More features can also be found in GNU’s Readline.
Usage
There are several ways to start Clink.
- If you installed the auto-run, just start
cmd.exe
. Runclink autorun --help
for more info. - To manually start, run the Clink shortcut from the Start menu (or the clink.bat located in the install directory).
- To establish Clink to an existing
cmd.exe
process, use<install_dir>\clink.exe inject
.
You can use Clink right away without configuring anything:
- Searchable command history will be saved between sessions.
- Tab and Ctrl+Space will do match completion two different ways.
- Press Alt+H to see a list of the current key bindings.
- Press Alt+Shift+/ followed by another key to see what command is bound to the key.
See Getting Started for information on getting started with Clink.
Upgrading from Clink v0.4.9
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.
Extending Clink
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.