github chrisant996/clink v1.6.1

latest releases: v1.7.5, v1.7.4, v1.7.3...
10 months ago

Features:

  • Improved input line parsing and coloring:
    • Commands starting with @ are supported, and completion correctly ignores the @.
    • Each of the following CMD syntax errors are recognized: lines starting with & or @2>, and lines containing & & or 2>&file.
    • The whole redirections 2>file or >file or 2>&1 are colored instead of only the > or >&.
  • Completions for clink set color settings include a color sample in the description field (e.g. type clink set colorAlt-= to see the color settings and their current color samples).
  • The clink-reload bindable command now reverts key bindings and config variables before reloading the inputrc file, so that old bindings and values don't linger in the current session if they've been removed from the inputrc file.
  • Added clink-dump-functions and clink-dump-macros bindable commands. These behave similar to dump-functions and dump-macros, but they show user-friendly key names and luafunc: macros are listed as functions instead of as macros.
  • Added some new "bigword" cursor movement commands for moving to the next or previous space delimited word; clink-backward-bigword, clink-forward-bigword, cua-backward-bigword, cua-forward-bigword.
  • Added a new conditional directive $if clink_version in the inputrc file (e.g. $if clink_version >= 1.6.1).
  • Added a new prompt.spacing setting which can control blank lines before the prompt (it was a clink-flex-prompt feature which has now been incorporated into Clink itself).
  • Added a new match.coloring_rules setting and %CLINK_MATCH_COLORS% environment variable, both of which supersede Readline's %LS_COLORS% definitions when displaying match completions.
  • Internal changes.

Lua:

  • Added line_state:getrangeoffset() and line_state:getrangelength() to get the beginning offset and length of the range in the input line described by the line_state.
  • Added console.explodeansi() to split a string into substrings on ANSI escape code boundaries.
  • Added rl.getinputrcfilename() to get the loaded inputrc file name.
  • Added rl.translatekey() to translate between key sequence formats (input key, key binding, and friendly key name).
  • Added rl.bracketpromptcodes() to apply \1 and \2 codes as needed by Readline in certain inputrc config variables.
  • Document the CLINK_EXE global variable which has existed since v1.0.0 but was accidentally undocumented.

Fixes:

  • Removed superfluous ;39 and/or ;49 from color setting escape codes in some cases.
  • Fixed console.readinput() repeatedly returning nil after console.checkinput() returns true (regression introduced in v1.5.12).
  • Fixed loading the default_inputrc file if it exists (introduced in v1.3.5, and it never worked properly until now).
  • Fixed the history-size config variable to be completely ignored (it interfered with Clink's history database and settings, which were meant to supersede it).
  • Fixed the clink-popup-show-help command when including unbound commands (numeric argument of 4) so it doesn't double-list the bound luafunc: macros.
  • Fixed updating column text in clink.popuplist() when Del is pressed (e.g. history timestamps in the clink-popup-history command).
  • Fixed the width of clink.popuplist() to take the title into account.
  • Fixed Lua argument errors for some objects (the argument # in the error message was one lower than it should have been in some messages).
  • Fixed the return value from rl_buffer:setcursor().
  • Fixed console:getnumlines() between onendedit and onbeginedit.
  • Fixed erasing the "History expansion for" preview when the transient prompt is enabled.
  • Fixed the transient prompt sometimes not erasing properly (regression introduced in v1.5.17).
  • Fixed the color of flags for clink set (e.g. --help).
  • Fixed the clink-reload command so any inputrc file parse errors are printed on new lines.
  • Fixed the lua.break_on_error setting so it works properly in released builds of Clink.

Don't miss a new clink release

NewReleases is sending notifications on new releases.