github chrisant996/clink v1.7.4

14 hours ago

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

Don't miss a new clink release

NewReleases is sending notifications on new releases.