Skip to content

Releases: chrisant996/clink

v1.7.7

26 Dec 18:55
Compare
Choose a tag to compare
  • Fixed #713; character width measurements are wrong for some Chinese characters in terminals other than Windows Terminal (regression introduced in v1.7.6).

v1.7.6

16 Dec 09:41
Compare
Choose a tag to compare
  • Update Win8.1 character width measurements from wcwidth-verifier.
  • Fixed a case where other popup list colors could interfere with the colors.border color in clink.popuplist().
  • Fixed #709; TAB expansion doesn't work for cd ~ (regression introduced in v1.3.36).

v1.7.5

11 Nov 10:21
Compare
Choose a tag to compare

Tip

The first update that crosses past v1.7.0 will report an error.
Just run clink update again to finish the update successfully.

  • Added new Lua API console.ellipsify() to truncate an input string in various ways.
  • Added new rl_buffer:setcommentrow() to let "luafunc:" commands immediately show text in the comment row.
  • Adjusted some character width measurements based on analysis from wcwidth-verifier on Win8.1, Win10 with conhost, Win10 with Windows Terminal 1.22, Win11 with conhost, and Win11 with Windows Terminal 1.22.
  • The Headline, Pure, and Bureau clinkprompt files now consider unpublished branches as being "ahead", even in cases where git doesn't report a specific "ahead by" count.
  • Internal changes to the right side prompt implementation, to disentangle unnecessary internal dependencies.

v1.7.4

02 Nov 02:49
Compare
Choose a tag to compare

Tip

The first update that crosses past v1.7.0 will report an error.
Just run clink update again to finish the update successfully.

  • Changed searching for color themes and custom prompts to always include themes\ directories under the Clink program directory and Clink profile directory, even when the clink.path setting has been used to remove them from the list of script directories.
  • Improved emoji width measurements.
    • Unqualified emojis are counted as a single cell now. Windows Terminal intentionally renders these as a single cell for compatibility with the behavior of the first terminal programs on Linux that began to support emoji characters (an important compatibility detail for the Windows Subsystem for Linux, for example).
    • Country flag emoji character pairs are recognized.
    • Skin tone variant selectors are recognized.
    • The zero width joiner is recognized when it joins two emoji characters, or an emoji and a male or female symbol.
    • NOTE: A given OS version and terminal program version will only recognize certain combinations of joined emojis as valid sequences. And Windows Terminal is one of the only terminal programs on Windows that can draw color emoji characters. Clink has no way to know how a given terminal will actually render sequences of Unicode emoji characters. If a terminal program renders a particular emoji sequence differently than Clink predicts, then the display may become garbled. If that happens, don't use that emoji sequence. But if a terminal program renders an emoji sequence as a single glyph and Clink predicts the width incorrectly, then please open an issue with details about the emoji.
  • The pure.clinkprompt now also supports virtualenv's VIRTUAL_ENV_DISABLE_PROMPT and VIRTUAL_ENV_PROMPT environment variables.
  • Added console.cellcountiter() so scripts can iterate over Unicode character sequences in a string. Using unicode.iter() returns one codepoint at a time, but emojis can have multiple codepoints and console.cellcountiter() groups them together for easy processing and accurate overall width measures (measuring the width of each codepoint in an emoji sequence is not the same as measuring the width of the emoji sequence as a whole).
  • Fixed the right side transient prompt so it shows up even when identical to the right side normal prompt.
  • Fixed the demo callback in .clinkprompt files.
  • Fixed potential for incomplete input of Unicode surrogate pairs. An easy way to encounter the problem was using the Windows emoji picker to input an emoji that's a sequence of other emojis joined together -- for example, the pride flag emoji is a flag emoji joined with a rainbow emoji, and the rainbow emoji uses a surrogate pair.
  • Fixed an edge case where if a .clinkprompt file calls require() to load a module, and later on a different script also calls require() for the same module, then any event handlers or prompt filters registered by the required module accidentally only worked inside the .clinkprompt that originally required it. Now required modules behave the same regardless whether they are first required by a .clinkprompt file or by some other script file.
  • Fixed #685; CTRL-L while input text is present redraws the input line wrong.
  • Fixed #686; clink config -h shows inaccurate info.
  • Fixed #696; console width length off-by-one on certain characters (in particular U+26A1).
  • Fixed #698; script error when using clink config prompt show pure.
  • Fixed #701; issues in Antares prompt (missing tag and error when truncation is needed).

v1.7.3

16 Oct 02:59
Compare
Choose a tag to compare

Tip

The first update that crosses past v1.7.0 will report an error.
Just run clink update again to finish the update successfully.

v1.7.3

  • Added the Tomorrow* color themes which were accidentally missing from v1.7.0.
  • Fixed #682; the clink config theme use and clink config prompt use commands had no effect if there is no clink_settings file yet.

v1.7.0

Clink now supports color theme files and custom prompt files. These enable packaging Clink color settings or Clink custom prompts into shareable files. This finally makes it easy to download and apply themes or prompts shared by other people, or copy them and modify them. The new clink-themes repo is a site where .clinktheme and .clinkprompt files can be shared (see Contributing for details on how to contribute your own themes and prompts).

  • Added support for *.clinktheme color theme files; see Color Themes for more information.
    • Added several clink config theme commands for color themes (run clink config theme --help).
    • The famous Dracula, Solarized (light and dark), and Tomorrow (1 light, 4 dark) themes are included.
    • Use clink config theme use name to apply a color theme, or set the CLINK_COLORTHEME environment variable to the color theme name.
  • Added support for *.clinkprompt custom prompt files; see Custom Prompts for more information. This makes it easy to share custom prompts, and to have a library of many different custom prompts and switch between them quickly and easily. One .clinkprompt can be active at a time; activating one deactivates any others.
    • Added several clink config prompt commands for custom prompts (run clink config prompt --help).
    • Oh-My-Posh support is included.
    • Also included are ports of Agnoster, Pure, Headline, Antares, and a few others (all ported from zsh to Clink).
    • Use clink config prompt use name to activate a custom prompt module, or set the CLINK_CUSTOMPROMPT environment variable to the custom prompt name.
  • Added the ability to show input hints in the comment row (below the input line).
    • Input hints are off by default, and can be enabled with clink set comment_row.show_hints true.
    • Argmatchers can provide input hints; see Show a Usage Hint for more information.
    • Lua scripts can create custom hinters; see Showing Input Hints for more information.
  • Enhanced the syntax for setting colors; added italic and reverse, and added #XXXXXX and #XXX shortcuts for specifying 24-bit color values.
  • Added more popup list colors: color.popup_border, color.popup_header, color.popup_footer, color.popup_select, and color.popup_selectdesc.
  • Changed phrasing from "Accept Suggestion" to "Insert Suggestion" in the documentation and in the auto-suggestions usage hint text.
  • Changed the Lua print() function to support UTF8 output and terminal escape codes. Now the only reasons for a script to use clink.print() instead of print() are (1) background compatibility or (2) using NONL to suppress printing a line ending.
  • Improved terminal output logging when the debug.log_terminal setting is enabled (the setting is only for diagnostic use).
    • Now it captures all WriteConsoleW and WriteFile output sent to stdout or stderr (instead of only capturing output from the Readline library).
    • Added a debug.log_output_callstacks setting which includes callstacks for each output reported by the debug.log_terminal setting.
  • Added a workaround for Unicode limitations in legacy console windows and legacy terminals (improves cursor position accuracy when Unicode surrogate pairs are present).
  • Added several new Lua APIs for color themes and custom prompts: clink.getprompts(), clink.applyprompt(), clink.getclinkprompt(), clink.getthemes(), clink.readtheme(), clink.applytheme(), settings.clear(), settings.parsecolor(), settings.formatcolor(), os.createguid().
  • Added git Lua APIs for use by custom prompts.
  • Added optional cookie argument to clink.promptcoroutine() to make it simple for *.clinkprompt files to allow customization that makes use of asynchronous prompt filtering without needing modifications to the main *.clinkprompt file.
  • Fixed detecting file associations (some file extensions weren't detected as having file associations, causing executable completion to omit them, and causing input line coloring to be inaccurate).
  • Fixed a case where updating the right side prompt could leave stray characters behind.
  • Fixed a case where the match.coloring_rules setting could have no effect.
  • Fixed delay when typing X: and it's a remote drive.
  • Fixed coloring 2>&1; the 1 wasn't colored.
  • Fixed color of leading blank lines in a prompt string (use the terminal's default color, not the color.prompt color).
  • Fixed rl.collapsetilde() which just didn't do its job.
  • Fixed %clink_dummy_capture_env% to stop accidentally leaking into the environment variables collection.
  • Fixed an infinite loop when prompt.async was false.
  • Fixed F9 to stop jumping one past the actual entered history number.
  • Fixed various edge case bugs in the input line display, which were uncovered while adding the ability to show input hints.

v1.7.2

14 Oct 09:52
Compare
Choose a tag to compare

v1.7.2

This maintenance patch should address the issue where the v1.7.0 update fails to install the new themes\ directory.

Important

Known Issues

  1. The first update will report an error. Start a new session of Clink after the error, and it will finish the update successfully.
  2. The clink config theme use and clink config prompt use commands have no effect if there is no clink_settings file yet. To get them working, you can set any setting. For example, an easy workaround is to run clink set clink.logo clear and then the commands will start working. (This will be fixed in another update, so that a workaround won't be needed.)

Sorry for the inconvenience and confusion!

v1.7.0

Clink now supports color theme files and custom prompt files. These enable packaging Clink color settings or Clink custom prompts into shareable files. This finally makes it easy to download and apply themes or prompts shared by other people, or copy them and modify them. The new clink-themes repo is a site where .clinktheme and .clinkprompt files can be shared (see Contributing for details on how to contribute your own themes and prompts).

  • Added support for *.clinktheme color theme files; see Color Themes for more information.
    • Added several clink config theme commands for color themes (run clink config theme --help).
    • The famous Dracula, Solarized (light and dark), and Tomorrow (1 light, 4 dark) themes are included.
    • Use clink config theme use name to apply a color theme, or set the CLINK_COLORTHEME environment variable to the color theme name.
  • Added support for *.clinkprompt custom prompt files; see Custom Prompts for more information. This makes it easy to share custom prompts, and to have a library of many different custom prompts and switch between them quickly and easily. One .clinkprompt can be active at a time; activating one deactivates any others.
    • Added several clink config prompt commands for custom prompts (run clink config prompt --help).
    • Oh-My-Posh support is included.
    • Also included are ports of Agnoster, Pure, Headline, Antares, and a few others (all ported from zsh to Clink).
    • Use clink config prompt use name to activate a custom prompt module, or set the CLINK_CUSTOMPROMPT environment variable to the custom prompt name.
  • Added the ability to show input hints in the comment row (below the input line).
    • Input hints are off by default, and can be enabled with clink set comment_row.show_hints true.
    • Argmatchers can provide input hints; see Show a Usage Hint for more information.
    • Lua scripts can create custom hinters; see Showing Input Hints for more information.
  • Enhanced the syntax for setting colors; added italic and reverse, and added #XXXXXX and #XXX shortcuts for specifying 24-bit color values.
  • Added more popup list colors: color.popup_border, color.popup_header, color.popup_footer, color.popup_select, and color.popup_selectdesc.
  • Changed phrasing from "Accept Suggestion" to "Insert Suggestion" in the documentation and in the auto-suggestions usage hint text.
  • Changed the Lua print() function to support UTF8 output and terminal escape codes. Now the only reasons for a script to use clink.print() instead of print() are (1) background compatibility or (2) using NONL to suppress printing a line ending.
  • Improved terminal output logging when the debug.log_terminal setting is enabled (the setting is only for diagnostic use).
    • Now it captures all WriteConsoleW and WriteFile output sent to stdout or stderr (instead of only capturing output from the Readline library).
    • Added a debug.log_output_callstacks setting which includes callstacks for each output reported by the debug.log_terminal setting.
  • Added a workaround for Unicode limitations in legacy console windows and legacy terminals (improves cursor position accuracy when Unicode surrogate pairs are present).
  • Added several new Lua APIs for color themes and custom prompts: clink.getprompts(), clink.applyprompt(), clink.getclinkprompt(), clink.getthemes(), clink.readtheme(), clink.applytheme(), settings.clear(), settings.parsecolor(), settings.formatcolor(), os.createguid().
  • Added git Lua APIs for use by custom prompts.
  • Added optional cookie argument to clink.promptcoroutine() to make it simple for *.clinkprompt files to allow customization that makes use of asynchronous prompt filtering without needing modifications to the main *.clinkprompt file.
  • Fixed detecting file associations (some file extensions weren't detected as having file associations, causing executable completion to omit them, and causing input line coloring to be inaccurate).
  • Fixed a case where updating the right side prompt could leave stray characters behind.
  • Fixed a case where the match.coloring_rules setting could have no effect.
  • Fixed delay when typing X: and it's a remote drive.
  • Fixed coloring 2>&1; the 1 wasn't colored.
  • Fixed color of leading blank lines in a prompt string (use the terminal's default color, not the color.prompt color).
  • Fixed rl.collapsetilde() which just didn't do its job.
  • Fixed %clink_dummy_capture_env% to stop accidentally leaking into the environment variables collection.
  • Fixed an infinite loop when prompt.async was false.
  • Fixed F9 to stop jumping one past the actual entered history number.
  • Fixed various edge case bugs in the input line display, which were uncovered while adding the ability to show input hints.

v1.7.0

13 Oct 19:45
Compare
Choose a tag to compare

Clink now supports color theme files and custom prompt files. These enable packaging Clink color settings or Clink custom prompts into shareable files. This finally makes it easy to download and apply themes or prompts shared by other people, or copy them and modify them. The new clink-themes repo is a site where .clinktheme and .clinkprompt files can be shared (see Contributing for details on how to contribute your own themes and prompts).

  • Added support for *.clinktheme color theme files; see Color Themes for more information.
    • Added several clink config theme commands for color themes (run clink config theme --help).
    • The famous Dracula, Solarized (light and dark), and Tomorrow (1 light, 4 dark) themes are included.
    • Use clink config theme use name to apply a color theme, or set the CLINK_COLORTHEME environment variable to the color theme name.
  • Added support for *.clinkprompt custom prompt files; see Custom Prompts for more information. This makes it easy to share custom prompts, and to have a library of many different custom prompts and switch between them quickly and easily. One .clinkprompt can be active at a time; activating one deactivates any others.
    • Added several clink config prompt commands for custom prompts (run clink config prompt --help).
    • Oh-My-Posh support is included.
    • Also included are ports of Agnoster, Pure, Headline, Antares, and a few others (all ported from zsh to Clink).
    • Use clink config prompt use name to activate a custom prompt module, or set the CLINK_CUSTOMPROMPT environment variable to the custom prompt name.
  • Added the ability to show input hints in the comment row (below the input line).
    • Input hints are off by default, and can be enabled with clink set comment_row.show_hints true.
    • Argmatchers can provide input hints; see Show a Usage Hint for more information.
    • Lua scripts can create custom hinters; see Showing Input Hints for more information.
  • Enhanced the syntax for setting colors; added italic and reverse, and added #XXXXXX and #XXX shortcuts for specifying 24-bit color values.
  • Added more popup list colors: color.popup_border, color.popup_header, color.popup_footer, color.popup_select, and color.popup_selectdesc.
  • Changed phrasing from "Accept Suggestion" to "Insert Suggestion" in the documentation and in the auto-suggestions usage hint text.
  • Changed the Lua print() function to support UTF8 output and terminal escape codes. Now the only reasons for a script to use clink.print() instead of print() are (1) background compatibility or (2) using NONL to suppress printing a line ending.
  • Improved terminal output logging when the debug.log_terminal setting is enabled (the setting is only for diagnostic use).
    • Now it captures all WriteConsoleW and WriteFile output sent to stdout or stderr (instead of only capturing output from the Readline library).
    • Added a debug.log_output_callstacks setting which includes callstacks for each output reported by the debug.log_terminal setting.
  • Added a workaround for Unicode limitations in legacy console windows and legacy terminals (improves cursor position accuracy when Unicode surrogate pairs are present).
  • Added several new Lua APIs for color themes and custom prompts: clink.getprompts(), clink.applyprompt(), clink.getclinkprompt(), clink.getthemes(), clink.readtheme(), clink.applytheme(), settings.clear(), settings.parsecolor(), settings.formatcolor(), os.createguid().
  • Added git Lua APIs for use by custom prompts.
  • Added optional cookie argument to clink.promptcoroutine() to make it simple for *.clinkprompt files to allow customization that makes use of asynchronous prompt filtering without needing modifications to the main *.clinkprompt file.
  • Fixed detecting file associations (some file extensions weren't detected as having file associations, causing executable completion to omit them, and causing input line coloring to be inaccurate).
  • Fixed a case where updating the right side prompt could leave stray characters behind.
  • Fixed a case where the match.coloring_rules setting could have no effect.
  • Fixed delay when typing X: and it's a remote drive.
  • Fixed coloring 2>&1; the 1 wasn't colored.
  • Fixed color of leading blank lines in a prompt string (use the terminal's default color, not the color.prompt color).
  • Fixed rl.collapsetilde() which just didn't do its job.
  • Fixed %clink_dummy_capture_env% to stop accidentally leaking into the environment variables collection.
  • Fixed an infinite loop when prompt.async was false.
  • Fixed F9 to stop jumping one past the actual entered history number.
  • Fixed various edge case bugs in the input line display, which were uncovered while adding the ability to show input hints.

v1.6.21

13 Aug 22:22
Compare
Choose a tag to compare
  • Reduced the performance overhead of hooked APIs from about 20 microseconds to about 2 microseconds.
  • Enhanced the executable recognition to avoid flickering red (or color.unrecognized) for an executable name that was already recognized in a recent previous input line.
  • Enhanced the srcmap command in the Lua debugger so that srcmap dir automatically sets up source mappings for Clink's built in scripts using dir as the repo root.
  • Fixed when history.expand_mode is off; it didn't fully turn off all of the history expansion syntax forms (for example the ^ syntax).
  • Fixed input line coloring when the first word is a device name (e.g. nul or com1:); it should use color.unrecognized for the color.
  • Fixed #651; completion doesn't work for ./ and ../ anymore in the first word of a command line. Now when the match.translate_slashes setting is system or backslash then completing ./ and ../ can complete the word as a path, even though CMD does not consider it to be a path.
  • Fixed #653; clink_start.cmd gets run twice if the binaries directory is the same as the profile directory.
  • Fixed #654; input line coloring doesn't treat ^ correctly inside quotes (and related quirks).

v1.6.20

08 Aug 17:13
Compare
Choose a tag to compare

v1.6.19 has been deleted because it accidentally broke the updater -- if you already updated to v1.6.19, then a one-time manual update to v1.6.20 or newer is necessary to restore the updater.

  • Fixed truncated descriptions with clink set exec. and then clink-select-complete (Ctrl-Space) (regression introduced in v1.6.11).
  • Fixed fully qualified paths from a different local drive accidentally being colored with color.unrecognized.
  • Fixed #648; on Windows 8.1 the title bar can get changed to "Windows PowerShell" for the rest of the CMD session.
  • Fixed #652; error when trying to update again after updating to v1.6.20 (regression introduced in v1.6.19).

v1.6.18

28 Jul 22:47
Compare
Choose a tag to compare
  • Added a new callback function that can be assigned to an argument position in the table given to :addarg() via onalias= (see Responding to Arguments in Argmatchers for more information). The git argmatcher in the clink-completions repo uses this to support git aliases.
  • When a doskey alias doesn't include any $ tokens then CMD is guaranteed to ignore the rest of the command line after the alias, so now argmatcher parsing also ignores the rest of the command line and colors it using color.unexpected.
  • Suppress the ANSICON warning in the log file and diagnostics output on Windows 8.1. The performance problem in ANSICON exists, but apparently there isn't a better alternative before Windows 10.