clink

Bash's powerful command line editing in cmd.exe

GPL-3.0 License

Stars
3.5K
clink - v1.4.9

Published by chrisant996 almost 2 years ago

  • Improved the problematic character reporting in the clink-diagnostics command.
  • Fixed measurements for the East Asian ambiguous width characters (this should solve the Cmder problems with lambda in the CMD.exe prompt text, including the space after the lambda).
clink - v1.4.8

Published by chrisant996 almost 2 years ago

  • Added rl.needquotes() function to check whether text needs quotes in a command line.
  • Changed the terminal.color_emoji setting auto mode to more broadly support accurate width measurements for color emoji (regardless whether the terminal program is capable of actually drawing the color emoji).
  • Now clink-diagnostics Ctrl-X,Ctrl-Z automatically analyzes the prompt text for problematic characters, reports them, and offers suggestions for how to solve problems they might be causing.
  • Fixed the completion autosuggest strategy so it doesn't provide a suggestion that requires quoting if the command line input is not currently quoted.
  • Fixed overly aggressive detection of color emoji (regression introduced in v1.4.7).
clink - v1.4.7

Published by chrisant996 almost 2 years ago

  • 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).
clink - v1.4.6

Published by chrisant996 almost 2 years ago

  • 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 - v1.4.5

Published by chrisant996 almost 2 years ago

  • 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).
clink - v1.4.4

Published by chrisant996 almost 2 years ago

  • 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).
clink - v1.4.3

Published by chrisant996 almost 2 years ago

  • 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.
clink - v1.4.2

Published by chrisant996 almost 2 years ago

  • Fixed path abbreviation in some cases.
clink - v1.4.1

Published by chrisant996 almost 2 years ago

  • 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\.
clink - v1.4.0

Published by chrisant996 almost 2 years ago

  • 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.
clink - v1.3.51

Published by chrisant996 almost 2 years ago

  • 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.
clink - v1.3.50

Published by chrisant996 almost 2 years ago

  • Fixed the prefix highlighting when displaying matches.
clink - v1.3.49

Published by chrisant996 about 2 years ago

  • 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.
clink - v1.3.48

Published by chrisant996 about 2 years ago

  • Fixed another #356 case; trailing spaces at end of display were sometimes optimized away by mistake (regression introduced in v1.3.43).
clink - v1.3.47

Published by chrisant996 about 2 years ago

  • 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).
clink - v1.3.46

Published by chrisant996 about 2 years ago

  • 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.
clink - v1.3.45

Published by chrisant996 about 2 years ago

  • 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).
clink - v1.3.44

Published by chrisant996 about 2 years ago

  • Fixed #348; pasting in ConEmu or Windows Terminal duplicates the 2nd character (regression introduced in v1.3.43).
clink - v1.3.43

Published by chrisant996 about 2 years ago

  • 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.
clink - v1.3.42

Published by chrisant996 about 2 years ago

  • 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).