Clink enhances your productivity in Microsoft Windows' "cmd.exe".
If you're familiar with Bash then you will be familiar with the changes that Clink brings to "cmd.exe" (it uses the same 'Readline' library that Bash uses). It is a small utility to enhance "cmd.exe", adding more powerful command line completion, editing, and history.
Features
The same line editing as Bash (from GNU's Readline library).
History persistence between sessions.
Scriptable completion with Lua.
New keyboard shortcuts;
Paste from clipboard (Ctrl-V).
Incremental history search (Ctrl-R/Ctrl-S).
Powerful completion (TAB).
Undo (Ctrl-Z).
Automatic "cd .." (Ctrl-Alt-U).
Environment variable expansion (Ctrl-Alt-E).
Coloured and scriptable prompt.
Context sensitive completion;
Executables (and aliases).
Directory commands.
Environment variables
Thirdparty tools; Git, Mercurial, SVN, Go, and P4.
Auto-answering of the "Terminate batch job?" prompt.
Clink erweitert die Kommandozeile von Windows um Features, die Linux-Nutzer von bash kennen: Autocomplete, Verlaufsuche, Undo usw. Selbst ein simples ctrl-v ist nun endlich möglich.
"Als neutrale künstliche Intelligenz vermeide ich bewusst das Gendern in meinen Texten, um alle Nutzer gleichermaßen ansprechen zu können." (ChatGPT auf die Frage, ob die KI gendert)
"Als neutrale künstliche Intelligenz vermeide ich bewusst das Gendern in meinen Texten, um alle Nutzer gleichermaßen ansprechen zu können." (ChatGPT auf die Frage, ob die KI gendert)
- Environment variable 'clink_profile' overrides Clink's profile path (#390).
- Load a clink_inputrc file from Clink's profile directory (fixes #406).
- Bug fixes;
- Redraw issues when prompts end in OSC ANSI codes (#387, #384).
- Fixed 'clink autorun --help' crash.
"Als neutrale künstliche Intelligenz vermeide ich bewusst das Gendern in meinen Texten, um alle Nutzer gleichermaßen ansprechen zu können." (ChatGPT auf die Frage, ob die KI gendert)
"Als neutrale künstliche Intelligenz vermeide ich bewusst das Gendern in meinen Texten, um alle Nutzer gleichermaßen ansprechen zu können." (ChatGPT auf die Frage, ob die KI gendert)
Der ursprüngliche Entwickler von Clink hat anscheinend sämtliche Arbeiten eingestellt, auf GitHub ist er verschollen und das Repository im Wesentlichen verwaist.
Es wird seit spätestens 2020 von Chris Antos weiterentwickelt, die De-facto-Standardversion von Clink liegt seitdem hier: https://github.com/chrisant996/clink
Es kamen bisher 137 (!) Versionen heraus, aktuell ist die 1.3.38. Ein Upgrade von der mridgers-Version ist ohne Probleme möglich, allerdings hat sich die Konfiguration ein bisschen geändert. Besonders intensiv konfigurierte Installationen könnten daher angepasst werden müssen.
- Clink now has an icon, and also includes some colored icons for color-coding your shortcut files, terminal tabs, and etc.
- Avoid mis-coloring a directory name as though it is an argmatcher (uses a background thread to stay responsive).
- Fixed command word completion after :chaincommand(). Now cmd /c Tab works properly.
- Fixed :chaincommand() to work properly in a nested argmatcher; it should imply :nofiles() otherwise it can pop out to the previous argmatcher instead of chaining.
- Fixed cmd argmatcher to only chain after the /c and /k flags, to more accurately match actual cmd.exe syntax.
- Fixed backward compatibility for argmatchers using the old v0.4.9 APIs with functions as argument options (regression introduced in v1.2.7).
- Fixed the clink-select-complete command with match display filtering.
- Added console.checkinput() to check whether input is available.
- Changed console.readinput() to accept an optional no_cursor argument to avoid changing cursor visibility or position.
- Fixed #320; resizing the terminal can garble the prompt (bash has the same problem, so Clink now uses custom code to handle resizing the terminal).
- Added io.truncate() to truncate a file.
- Added string.comparematches() to compare two matches; this is normally not needed because Clink automatically sorts matches, but some match generators may prefer to disable the automatic sorting and perform custom sorting.
- Added rl.describemacro() to associate descriptions with luafunc: macros (or any macro), to be shown in the clink-show-help and clink-what-is commands.
- The clink.popuplist() function now accepts a callback function to be invoked when Del is pressed.
- The colored-completion-prefix configuration variable now works with match display filtering, provided the display strings only prepend or append to the match strings.
- Removed the obsolete clink.gui_popups setting.
- Fixed the completion-prefix-display-length configuration variable in various cases.
- Fixed timing condition that could potentially crash (regression introduced in v1.3.40).
- Added clink.max_input_rows setting that limits the number of screen rows to use for displaying the input line, scrolling as appropriate if the input line exceeds the limit.
- Added color.histexpand setting. When this is configured with a color, then Clink highlights history expansions in the input line and shows a preview of the expansion that will be applied near the current cursor position.
- Added history.auto_expand setting. When this is set to false, history expansions will not be performed automatically upon Enter, but they may still be performed by invoking expansion commands such as clink-expand-history Alt-^, or clink-expand-line Alt-Ctrl-E.
- When a coroutine error happens, write a Lua traceback to the log file.
- The clink-diagnostics command now reports costs for prompt filters and input line coloring classifiers when a numeric arg is given (e.g. Alt-1,Ctrl-x,Ctrl-z).
- Fixed the input line color when the command word is an alias and a directory and has an argmatcher (regression introduced in v1.3.40).
- Fixed how the inserted completion is highlighted while using clink-select-complete with the match.substring setting enabled.
- Fixed Readline bugs in the numeric arg input state;
- Numeric arg overflow check was missing in certain cases.
- Numeric arg input state could accidentally empty the prompt string.
- Numeric arg input state accidentally continued showing the arg input message after using Alt-- while already in numeric arg input state.
- Fixed some minor input line coloring and completion mistakes for clink set.
- Fixed quoted-insert followed by Esc, so that it inserts the raw ESC character.
- Fixed how Esc is handled in isearch mode (e.g. Ctrl-r); it should terminate isearch without reverting the input line.
- Fixed what-is to consistently reset the color afterward.
- Fixed vi insertion mode when terminal.raw_esc is enabled, so that Esc changes to vi command mode.
- Fixed clink.refilterprompt() to report an error upon invalid usage (it cannot be used inside a prompt filter, as that could cause infinite recursion and a crash).
- Fixed #344; history prints UTF8 text incorrectly.
- Fixed #342; typing foo.abc doesn't recognize foo.abc.cmd.
- Fixed #340; various display glitches in the Readline library (Clink now uses custom display routines instead of the Readline display routines).
- Fixed #339; %CD% doesn't expand.
- Fixed the history expansion preview when the input line grows or shrinks to use a different number of screen rows.
- Fixed "cd" so it doesn't match the cd argmatcher, because CMD commands cannot be quoted.
- Fixed #356; input line display garbled on Windows 8.1 (regression introduced in v1.3.43).
- More fixes for #356; input line display garbled on Windows 8.1 (regression introduced in v1.3.43). Also, right-side prompts have never worked correctly on Windows 8.1, and this finally fixes them as well.
Removed the message "Clink autorun is disabled by CLINK_NOAUTORUN".
Fixed #361; detect %CLINK_NOAUTORUN% faster.
Fixed another #356 case; end of display line not cleared sometimes (regression introduced in v1.3.43).
Fixed another #356 case; trailing spaces at end of display were sometimes optimized away by mistake (regression introduced in v1.3.43).
Autorun detects non-interactive CMD process earlier, before injecting the Clink DLL. This can improve performance somewhat, and may be able to reduce spurious problems with antivirus tools (such as described in #367).
Updater deletes zip file if it fails to unzip. This can help automatically recover from a damaged zip download.
Fixed :setendofflags(); it made -- work correctly for input line coloring, but it didn't work correctly when generating match completions.
Fixed obscure edge cases where matches returned by Lua scripts could display incorrectly in clink-select-complete, or could potentially even crash if Lua scripts returned invalid results from the ondisplaymatches or onfiltermatches events.
Added clink.getpopuplistcolors() to get the default popup list colors.
Added clink.refilterafterterminalresize() to enable automatic prompt refilter after terminal resize. Prompt filters should only enable this if they're designed to refilter very quickly, otherwise they may cause responsiveness problems. [clink-flex-prompt has been updated to make use of this.]
The clink.popuplist() function allows the items table to include fields to override the height, width, colors, and direction of the list.
The clink_settings file format has been relaxed slightly to accept trailing whitespace after a Boolean setting's value. Note that manually modifying the clink_settings file is not supported; always use clink set to query or change Clink settings.
Fixed an obscure crash in the Readline library inside the reverse-search-history command when pressing the first key of a multikey binding (e.g. Ctrl-X) and then pressing any key that does not follow the first key in any of the corresponding multikey bindings (e.g. Esc).
Fixed leaked file handle when history.save is False.
Fixed #370; Tab inside set /p var= mistakenly discards any previous input.
Added os.abbreviatepath() and os.expandabbreviatedpath().
Invoking completion expands abbreviated paths when the new match.expand_abbrev setting is enabled.
Fixed displayed matches for c: or c:dir\.
1.4.4 - Änderungen seit 1.4.2 (1.4.3 habe ich ganz übersehen):
Fixed the screen width in the Help commands and Completion commands (regression introduced in v1.3.43).
Fixed to not load the same Lua script more than once from a completions directory when the Lua script doesn't define an argmatcher.
Fixed architecture reported by clink-diagnostics Ctrl-X,Ctrl-Z (regression introduced in v1.3.49).
Added backward compatibility for obsolete clink.quote_split(), clink.split(), and clink.get_screen_info().
Fixed empty completion list when typing two letters in rapid succession when both the autosuggest.enable and autosuggest.async settings are enabled.
Improved debug Lua messages; Clink's built-in Lua scripts reported "?" as the filename, and now they report "{filename.lua}".
Fixed potential for a crash in clink-help when including unbound "luafunc:" macros for which custom descriptions have been provided (e.g. Alt-4 then Alt-H).
Added a more informative exit code from clink inject. It returns 0 if successful, 2 if a fatal error occurred, or 1 if a non-fatal error occurred (such as Clink was already present; related to cmderdev/cmder#2800).
Fixed #382; %CLINK_PROFILE% doesn't supersede --profile (regression introduced in v1.0.0).
Clink now supports ARM64.
Clink now recognizes when the terminal host is WezTerm.
Clink now supports color emoji in Windows Terminal and WezTerm, according to the Unicode v15.0 standard. The new terminal.color_emoji setting controls when Clink assumes the terminal supports color emoji (color emoji are rendered using double-width characters, which can interfere with cursor positioning math, so Clink needs to know whether the terminal supports color emoji).
Enabled Readline's support for non-incremental vi-mode search (N, n) to search for a shell pattern using fnmatch(), as Posix specifies.
Fixed obscure issue when a "luafunc:" macro modifies the input line and then invokes a completion command.
Fixed line_state:getword() and line_state:getendword() to not strip quotes during generator:getwordbreakinfo() functions (regression introduced in v1.1.24).
Fixed #393; backward compatibility issue when clink.arg.register_parser() is passed something that is not a parser at all.
Fixed #111 again; cd ..Tab didn't complete to ..\ (regression introduced in v1.3.1).