clink

Bash's powerful command line editing in cmd.exe

GPL-3.0 License

Stars
3.5K
clink - v1.5.0

Published by chrisant996 over 1 year ago

  • Added code-signing.
  • Added note after successful clink update to clarify that the update will take effect in new Clink windows.
  • Fixed order of running the autostart script (from the clink.autostart setting) vs loading Lua; the autostart script should run before Lua so that Lua scripts can query environment variables set by it. Otherwise Lua scripts may behave differently on initial load versus after invoking the clink-reload command (e.g. Ctrl-X,Ctrl-R).
  • Fixed precedence of match colors; readonly should be lower precedence than executable.
  • Fixed #469; incorrect usage of memset().
clink - v1.4.28

Published by chrisant996 over 1 year ago

  • Added console.getcursorpos() to get the cursor position.
  • Updated os.getscreeninfo() to include the cursor position.
  • Changed character width measurements in Windows Terminal to accommodate certain fully qualified color emoji variants such as "✔️" vs "✔". The former is U+2714 U+FE0F and Windows Terminal draws a double-width color emoji; the latter is U+2714 and Windows Terminal draws a single-width character in the current font. Note that Windows Terminal draws the characters; Clink just tries to make the best prediction it can about how Windows Terminal will draw the characters.
  • Fixed display glitch where auto-suggest caused the display to scroll up an extra line at the bottom of the screen.
  • Fixed display glitch where cursor position was wrong when the input line ends with a history expansion directive that ends exactly at the right edge of the terminal.
  • Fixed cmd.ctrld_exits so Ctrl-D always exits with return code 0, so that terminal programs allow the shell window to close gracefully.
  • Fixed mouse input when the horizontal-scroll-mode inputrc variable is on.
  • Fixed missing prompt text when a prompt filter encounters an unhandled Lua error; now a placeholder prompt string is used so it's clear where the prompt is.
  • Fixed #467; On-Screen Keyboard in Swedish keyboard layout can't type \.
  • Internal improvements.
clink - v1.4.27

Published by chrisant996 over 1 year ago

  • Fixed when the terminal.emulate setting is auto on Windows 8.1 and earlier (regression introduced in v1.4.26).
clink - v1.4.26

Published by chrisant996 over 1 year ago

  • Added built-in support for shell integration with Windows Terminal v1.18 and higher. Note: Windows Terminal gets confused about the command line text when the transient prompt is enabled.
  • Changed clink.getansihost() to return two strings; the first string is the mode in use, and the new second string is what Clink detected (and will use when the terminal.emulation setting is auto).
  • Fixed to use terminal emulation when the terminal.emulate setting is auto and ANSICON is present. Clink's output is no longer able to be intercepted by ANSICON, so bypass it and use Clink's own terminal emulation.
  • Fixed #461; crash due to invalid RVA in ANSI32.DLL or ANSI64.DLL (ANSICON).
clink - v1.4.25

Published by chrisant996 over 1 year ago

  • Now os.issignaled() works during onendedit and onfilterinput events.
  • Improve emulation for F7 history popup (the win-history-popup command); Left or Right replace the input text with the selected line.
  • Transient prompt filters can suppress the transient prompt on a case by case basis by returning nil, false.
  • Fixed typo in clink set --help text.
  • Fixed where the prompt prefix (from v1.4.24) is inserted in the prompt string, so that shell integration escape codes can work properly.
  • Fixed #457; unrecognized OSC escape codes accidentally stripped from prompt string.
clink - v1.4.24

Published by chrisant996 over 1 year ago

  • Added path.fnmatch() which behaves like the Linux fnmatch(3) function.
  • Added os.globmatch() which performs recursive file pattern globbing the same as git does.
  • Added support for %CLINK_PROMPT_PREFIX%, %CLINK_PROMPT_SUFFIX%, %CLINK_RPROMPT_PREFIX%, and %CLINK_RPROMPT_SUFFIX% to provide prefix/suffix strings to surround the prompt strings, and for prompt filters to define a :surround() function to add their own prefix/suffix strings if needed.
  • Fixed ~ by itself to change directories, the same as ~\.
  • Fixed horizontal scrolling in popup lists (is possible whenever the item doesn't fit and no items contain control codes).
  • Fixed #452; history delete # doesn't work (regression introduced in v1.1.43).
  • Fixed #448; completion malfunction with ..\does_not_exist (regression introduced in v1.4.1).
clink - v1.4.23

Published by chrisant996 over 1 year ago

  • Added help message in clink-select-complete: when descriptions are shown below the matches, this adds text to mention that F1 toggles showing descriptions inline with the matches.
  • Added clink update --check to only check for an update without installing it.
clink - v1.4.22

Published by chrisant996 over 1 year ago

  • Fixed clink-select-complete to use per-match appendchar when present.
  • Fixed repetitive unnecessary work in the background when the completion auto-suggest strategy encounters a fromhistory argument slot in an argmatcher.
  • Fixed the installer /S flag (silent install) so it returns exit code 0 on success.
clink - v1.4.21

Published by chrisant996 over 1 year ago

  • The clink-diagnostics command can report merged argmatchers. When a numeric arg of 2 or greater is given (e.g. Alt-2,Ctrl-x,Ctrl-z) then it includes a list of defined argmatchers. The list now also reports any merging of argmatchers that occurred.
  • Fixed clink update so winget doesn't get confused about whether an update is available for Clink. Once winget update clink performs an update, or once a Clink v1.4.21 or greater .exe installer is run, then winget should stop getting confused.
clink - v1.4.20

Published by chrisant996 over 1 year ago

  • Fixed os.isfile() and os.isdir() when the specified name contains < or > or ", which are special wildcard characters for MS-DOS compatibility. This caused an error when typing "<, which then mistakenly thought a completion script named <.lua existed.
  • Fixed rl.expandtilde() to omit a trailing backslash when expanding ~ by itself. This is to avoid running afoul of the \" parsing rules for argv[] for programs.
  • Fixed potential crash when the clink command line takes more bytes as UTF8 than it does as UTF16.
clink - v1.4.19

Published by chrisant996 over 1 year ago

  • Added builder:setforcequoting() to force quoting rules to be applied to matches even if they aren't filenames. This also reverts "quoting for non-filename completions" in v1.4.13; there isn't a safe and backward-compatible way to automatically deduce when non-filenames matches need quoting, so a match generator needs to turn it on explicitly when desired.
clink - v1.4.18

Published by chrisant996 over 1 year ago

  • Added clink.oninputlinechanged() to register a function to be called whenever the input line is changed.
clink - v1.4.17

Published by chrisant996 over 1 year ago

  • Added os.isuseradmin() to get whether CMD is running as an admin account.
  • Added os.getfileversion() to get a table with version information if the file contains a Windows version info resource.
  • The clink-diagnostics command now reports costs for Lua event callback functions when a numeric arg is given (e.g. Alt-1,Ctrl-x,Ctrl-z) or when the lua.debug setting is enabled.
clink - v1.4.16

Published by chrisant996 over 1 year ago

  • Added history.show_preview setting that controls whether to show a preview of history expansions (previously it was inferred by whether color.histexpand was set).
  • Added detection for problematic codes in the prompt string. The clink-diagnostics Ctrl-X,Ctrl-Z command reports problem codes in the prompt string. When certain problem codes exist in the prompt string, then Clink compensates by reprinting the entire input line after printing the prompt string. Ideally, the prompt string should be fixed by the user, but sometimes that's difficult if the prompt string was generated by a tool.
  • Potential Breaking Change: Fixed how hidden and system files are handled by os.globdirs() and os.globfiles() (it had never worked properly). It worked fine with the default modes of the files.hidden and files.system settings and match-hidden-files config variable. But if any of those were changed from the default values then malfunctions could occur. With the fix, in backward compatibility mode the files.hidden and files.system settings and match-hidden-files config variable control whether os.globdirs() and os.globfiles() find hidden or system files, as before, and things can potentially malfunction. When the optional extrainfo argument is non-zero or when a new optional flags table is passed to them, they now default to including hidden files and omitting system files, but the flags table can override that. This change was necessary because some scripts were unable to detect git repositories when the files.hidden setting was false. Excluding hidden files never worked properly in the past. Clink v1.4.16 does its best to be as backward-compatible and forward-compatible as possible, but in some cases scripts may need to be updated to work properly when the settings or config variable are changed from their default values.
  • Fixed the match-hidden-files config variable to work again (regression introduced in v1.0.0). Also, when off, now it hides files and directories whose names begin with ..
  • Fixed #421; clink.bat errors with quoted arguments (regression introduced in v1.3.47).
  • Updated documentation with more cross-referencing links for Clink settings, Readline commands, Readline config variables, and standard Lua APIs.
clink - v1.4.15

Published by chrisant996 over 1 year ago

  • Added log.getfile() to get the current log file path.
  • Fixed match display to better accommodate escape codes for italics and underline, if present and supported by the terminal.
  • Fixed #414; argument color doesn't reset for values in multi-column layout when colored-stats is off.
  • PR #418; Fix crash caused by destruction of non detached threads.
  • PR #417; Fix buffer overread caused by usage of strcmp on non null-terminated char arrays.
clink - v1.4.14

Published by chrisant996 over 1 year ago

  • Fixed autosuggest to update again if matches are marked as volatile and the input line changed while matches were generated in the background (related to clink-completions#164).
clink - v1.4.13

Published by chrisant996 over 1 year ago

  • Added more status information in clink-diagnostics Ctrl-X,Ctrl-Z.
  • Fixed quoting in the insert-completions Alt-* command.
  • Fixed quoting for non-filename completions.
  • Fixed a CPU busy-loop after match_builder:setvolatile() was called during an auto-suggest strategy.
  • Fixed #411; setting %CLINK_HISTORY_LABEL% after Clink started didn't take effect (regression introduced in v1.3.18).
clink - v1.4.12

Published by chrisant996 almost 2 years ago

  • Additional improvements and logging for East Asian ambiguous width characters.
  • Running clink inject no longer empties the log file, so that AutoRun doesn't result in the log file being cleared over and over, which interferes with diagnostic efforts.
  • Fixed #407; the complete command gets confused by . prefix on files.
clink - v1.4.11

Published by chrisant996 almost 2 years ago

  • Fixed #406; the "lambdagenerated.omp.json" theme for Oh-My-Posh has problems in CJK codepages. The East Asian Ambiguous support has been rewritten to solve multiple subtle issues; the fix in v1.4.9 exposed other inaccuracies.
clink - v1.4.10

Published by chrisant996 almost 2 years ago

  • Added optional level argument to log.info() to facilitate more accurate reporting about the calling code.
  • Fixed extra duplicate log entry when the updater finds that Clink is already up to date.
  • Fixed #405; vi search gives unexpected results (regression introduced in v1.4.7).
  • Fixed #402; for convenience, print the Clink Releases page URL after a successful update (takes effect on the next upgrade after v1.4.10).