clink

Bash's powerful command line editing in cmd.exe

GPL-3.0 License

Stars
3.5K
clink - v1.2.12

Published by chrisant996 over 3 years ago

  • Improved diagnostic output for coroutines (Ctrl-X,Ctrl+Z), plus more diagnostic info when the lua.debug setting is enabled.
  • Fixed potential for a script error when a coroutine gets skipped due to a new prompt starting.
clink - v1.2.11

Published by chrisant996 over 3 years ago

  • Added clink.print() function which behaves like print() but with support for ANSI escape codes (and terminal emulation), and also a NONL special argument that suppresses the usual newline at the end of the output.
  • Expanded the sample code for async prompt filtering to clarify some things.
  • Fixed #126; allow Esc to input literal escape character.
    • The new terminal.raw_esc setting controls how Esc input works.
    • Added migration for the old esc_clears_line setting.
clink - v1.2.10

Published by chrisant996 over 3 years ago

  • Added asynchronous prompt filtering -- scripts can use this to do work in the background (e.g. git status) and refresh the prompt when finished.
    • Added clink.promptcoroutine() function to allow a prompt filter to do some work in the background.
    • Added io.popenyield() function to allow a coroutine to yield until the command's complete output is ready.
    • Added prompt.async setting that can disable asynchronous prompt filtering if preferred.
  • Log error codes for failures during clink inject.
  • Clarified help text for clink autorun (per #122).
  • Documentation clarifications and reorganization.
  • Fixed clink and history aliases getting lost after exiting a nested Clink instance.
  • Fixed some input keys accidentally handled by the OS after certain Lua code is run.
  • Fixed #124; onfiltermatches() receives one fewer matches than it should.
  • Fixed #123; Failed to inject (Host validation failed).
  • Fixed #117; Setup causes "System Error".
clink - v1.2.9

Published by chrisant996 over 3 years ago

  • Added detection for possible antivirus interference when injecting Clink.
  • Ignore duplicate scripts paths when loading scripts.
  • Fixed #118; inputrc is not read from state directory (regression introduced in v1.0.0).
clink - v1.2.8

Published by chrisant996 over 3 years ago

  • Fixed ...\ or .../ to change directories (path separator after several dots).
  • Fixed /dirname/ to change directories (forward slashes when a directory is the only thing in the input line).
  • Fixed #114; "Clink already loaded in process" error when autorun is installed for both Current User and All Users.
  • Fixed #113; forward slash translation didn't work with the cd command.
clink - v1.2.7

Published by chrisant996 over 3 years ago

  • Fixed #113; clink.slash_translation() had been removed (regression introduced in v1.0.0).
    • The new match.translate_slashes setting controls the default behavior for slash translation for completion matches.
    • The new clink.translateslashes() API can override slash translation for completion matches (and clink.slash_translation() is supported for backward compatibility).
clink - v1.2.6

Published by chrisant996 over 3 years ago

  • Fixed tilde expansion for directory by itself; now ~\ can change the working directory to the ~ directory.
  • Fixed pagination when displaying completions that take more than 1 line to display.
  • Fixed inserting directory match completions when a Lua script didn't include a trailing path separator in the directory match.
  • Fixed #111; .. completion is different from bash.
clink - v1.2.5

Published by chrisant996 over 3 years ago

  • Added os.expandenv() function to expand environment variables in a string.
  • Added console.cellcount() function to count the cells a string will use when displayed.
  • Added console.plaintext() function to remove ANSI escape codes from a string.
  • Clink now sets %=clink.bin% that points to the Clink binaries directory. This can be particularly useful for a portable installation of Clink so that scripts can find the Clink binaries directory and construct relative paths to other nearby files.
  • Clean up column alignment in --help texts.
  • Fixed history.sticky_search with anchored history search.
  • Fixed clink inject --profile to use correct log file name while initially injecting.
  • Fixed Clink autorun to be more compatible with Cmder (Cmder #2536).
clink - v1.2.4

Published by chrisant996 over 3 years ago

  • Added support for Shift+Arrows to select text and typing to replace selected text.
  • Added optional argument to word_classifications:classifyword() and word_classifications:applycolor() to allow only applying color where another color hasn't yet been applied.
  • Fixed first Up after reusing a history line so that it gets the reused history line, rather than getting the previous history line.
  • Fixed add-history command to not add blank lines to history.
  • Fixed rl.setmatches() (regression introduced in v1.1.26).
  • Fixed input coloring for clink set and any color setting name (regression introduced in v1.2).
  • Fixed potential crash with clink history --session.
  • Fixed Ctrl+D when cmd.ctrld_exits is disabled; it didn't exit, but it did still discard the input line and start a new prompt.
  • Fixed #107; autorun reports inject failures (regression introduced in v1.2.3).
  • Fixed #106; history missing --bare option (regression introduced in v1.2.3).
clink - v1.2.3

Published by chrisant996 over 3 years ago

  • Added history.sticky_search setting: when enabled, reusing a history line does not add the reused line to the end of the history, and it leaves the history search position on the reused line so next/prev history can continue from there (e.g. replaying commands via Up several times then Enter, Down, Enter, etc).
  • Added failure reporting and logging when clink inject fails.
  • Added --unique flag for use with clink history compact --unique to remove duplicate entries from the history list.
  • The clink-popup-complete command now matches wildcards.
  • Restored the Ctrl+Alt+U key binding from v0.4.9 (moves the current working directory up one level).
  • Fixed searching for inputrc files to also search in the profile directory (regression introduced in v1.0.0).
  • Fixed incremental search in the History popup list to search in reverse order (bottom to top).
  • Fixed clink-popup-history to set the history search position like other history search commands do, so that it plays well with the history.sticky_search setting.
clink - v1.2.2

Published by chrisant996 over 3 years ago

v1.2.2

  • Added %CLINK_HISTORY_LABEL% environment variable to use a different master history file (fixes #99).
clink - v1.2.1

Published by chrisant996 over 3 years ago

v1.2.1

  • Added Troubleshooting Tips section in the documentation.
  • Added backward compatibility for clink set with v0.4.9. Old setting names and values are not documented, but are automatically mapped to the appropriate new setting(s). This was done so that suggestions in old web sites and posts can usually continue to work, to reduce confusion and support burden.
  • Fixed #97; VS2017 error C2039: 'min': is not a member of 'std'.
  • Fixed #96; wrong setting string (the name of a setting was accidentally truncated).
  • Fixed some slightly inaccurate/incomplete migration from old settings to new settings.
clink - v1.2

Published by chrisant996 over 3 years ago

This is the first official release from the chrisant996/fork of Clink.

clink - v1.1.48

Published by chrisant996 over 3 years ago

This is a release candidate build.

This release candidate build seems to be working very well for me, even when copied into an existing Cmder\vendor\clink directory. Be sure to make a backup copy of your Cmder installation before copying Clink into an existing Cmder installation!

If this release candidate survives until April 2 without needing to be updated, the version number will be updated and it will become an official release version.

v1.1.48

  • Added clink.getansihost() function to get Clink's best guess who will process ANSI escape codes (can be useful for avoiding 256 bit and 24 bit color codes, for example).
  • Added detection for being hosted in ConsoleZ.
  • Fixed #20; set /p VAR="" shows the normal command prompt text instead of empty prompt text.
clink - v1.1.47

Published by chrisant996 over 3 years ago

This is a release candidate build.

This release candidate build seems to be working very well for me, even when copied into an existing Cmder\vendor\clink directory. Be sure to make a backup copy of your Cmder installation before copying Clink into an existing Cmder installation!

If this release candidate survives until April 2 without needing to be updated, the version number will be updated and it will become an official release version.

v1.1.47

  • Added default key binding for Ctrl+Space to invoke old-menu-complete, which is the most similar to CMD's standard Tab behavior.
  • Fixed search-ignore-case config variable to be on by default.
clink - v1.1.46

Published by chrisant996 over 3 years ago

This is a release candidate build.

This release candidate build seems to be working very well for me, even when copied into an existing Cmder\vendor\clink directory. Be sure to make a backup copy of your Cmder installation before copying Clink into an existing Cmder installation!

If this release candidate survives for 1 week without needing to be updated, the version number will be updated and it will become an official release version.

v1.1.46

  • Added rl.setvariable() to temporarily override the value of a Readline config variable.
  • The completion commands now also expand tilde by itself (~), in addition to tilde followed by a path separator (~\etc).
  • Fixed #94; setting history.save to False also disables interactive history in subsequent sessions.
clink - v1.1.45

Published by chrisant996 over 3 years ago

This is a release candidate build.

This release candidate build seems to be working very well for me, even when copied into an existing Cmder\vendor\clink directory. Be sure to make a backup copy of your Cmder installation before copying Clink into an existing Cmder installation!

If this release candidate survives for 1 week without needing to be updated, the version number will be updated and it will become an official release version.

v1.1.45

  • Fixed #93; stdout is sometimes broken by Cmder init.bat.
clink - v1.1.44

Published by chrisant996 over 3 years ago

This is a release candidate build.

This release candidate build seems to be working very well for me, even when copied into an existing Cmder\vendor\clink directory. Be sure to make a backup copy of your Cmder installation before copying Clink into an existing Cmder installation!

If this release candidate survives for 1 week without needing to be updated, the version number will be updated and it will become an official release version.

v1.1.44

  • Added clink.getsession().
  • Added %CLINK_NOAUTORUN% which overrides automatic inject when Clink is installed for autorun.
  • Fixed #92; clink-popup-history and similar commands not working with ConEmu and Cmder (regression introduced in v1.1.25).
clink - v1.1.43

Published by chrisant996 over 3 years ago

This is a release candidate build.

This release candidate build seems to be working very well for me, even when copied into an existing Cmder\vendor\clink directory. Be sure to make a backup copy of your Cmder installation before copying Clink into an existing Cmder installation!

If this release candidate survives for 1 week without needing to be updated, the version number will be updated and it will become an official release version.

v1.1.43

  • Added clink history --diag flag that prints diagnostic information while performing history operations.
  • Minor optimization in clink history when printing the full list of history items.
  • Fixed clink history compact so it actually performs compaction.
clink - v1.1.42

Published by chrisant996 over 3 years ago

This is a release candidate build.

This release candidate build seems to be working very well for me, even when copied into an existing Cmder\vendor\clink directory. Be sure to make a backup copy of your Cmder installation before copying Clink into an existing Cmder installation!

If this release candidate survives for 1 week without needing to be updated, the version number will be updated and it will become an official release version.

v1.1.42

  • Added clink history --bare flag to omit history item numbers.
  • Added several Lua functions:
    • io.popenrw() is like io.popen(), but returns both a read file handle and a write file handle (see documentation for important usage warning).
    • os.createtmpfile() creates a unique named temporary file, with control over the prefix and suffix and path.
    • os.getfullpathname() to get the full path name for a file.
    • os.getlongpathname() to get the long path name for a file.
    • os.getshortpathname() to get the 8.3 short path name (if available) for a file.
  • Improved argument validation for Clink's Lua APIs. This could expose bugs in existing scripts, so there is also a lua.strict setting that can be disabled to revert back to loose argument validation.
  • Updated documentation.
  • Fixed clink history compact so that it forces compaction as intended.
  • Fixed completion for clink set so that filename completion works in string settings.
  • Fixed backwards return value from rl.invokecommand().
  • Fixed console input/output modes across luafunc: key bindings, in case the Lua functions spawn a process that alters the console mode without restoring it.