Skip to content

Latest commit

 

History

History
349 lines (307 loc) · 20.1 KB

CHANGES

File metadata and controls

349 lines (307 loc) · 20.1 KB

Changes

Releases from chrisant996/clink fork

v1.1.1-alpha

  • Exclusively use Readline's completion implementation. This (with fixes and enhancements in Readline itself) makes the completion experience much nicer and more sophisticated.
  • Exclusively use Readline's key binding implementation. This makes it possible to have a single consistent way to set key bindings (inputrc) and for clink-show-help to list all key bindings.
  • Converted all of clink's internal key behaviors to be implemented as commands that can be bound in the inputrc file.
  • Rewrote and refactored the pagination routine to be used in multiple places.
  • Fixed prompt filtering to correctly use the specified priority order.
  • Readline library:
    • Updated the Readline library from v6.2 to v8.0. This picked up lots of bug fixes and new capabilities (for example colored completions).
    • Changed Readline to support backslash as a path separator.
    • The pager prompt in Readline is optionally colored, controlled by the colour.interact clink setting.
    • Added completion-auto-query-items config variable (on by default) which asks whether to list possible matches when the number of lines listed will fill one screen page.
    • Added history-point-at-end-of-anchored-search config variable in inputrc to make the cursor point behave like 4Dos/4NT/TakeCommand when searching forward and backward through command history.
    • Fixed prev history at top of history.
    • Fixed to get the current values of environment variables when needed, rather than always getting the value from whenever clink was started.
    • Fixed coloring directory completions.
    • Fixed menu-complete for \dir and . and ...
    • Fixed slow performance when displaying matches. Readline was calling stat() at least once per match (!!). A new match type field enables faster performance, coloring readonly and hidden file matches, applying filename completion rules only to filenames (vs branch names or other text strings), correct match de-duplication, and more. The lua match APIs can supply the new match type.
    • Fixed inserting a completion to happen as a single undo group.
    • Fixed tilde to map to %USERPROFILE% instead of %APPDATA% on Windows.
  • Typing a directory by itself uses cd /d to change to the directory:
    • Typing a directory with a trailing path separator changes to the directory.
    • Typing ..\ changes to the parent directory.
    • Typing ... or .... etc moves up an extra parent directory level for each extra dot (2 dots move up one parent, 3 dots moves up two parents, etc). A trailing path separator is optional when there are more than 2 dots.
    • Typing - or cd - or chdir - changes to the previous directory.
  • Commands that are new, enhanced, or fixed:
    • Added add-history and remove-history commands (similar to 4Dos/4NT/TakeCommand).
    • Got the menu-complete, menu-complete-backward, and old-menu-complete commands working (they never worked properly before in clink).
      • Also added a corresponding old-menu-complete-backward command for reverse order.
      • All of the *-menu-complete-* commands support wildcards (* and ?).
    • Added clink-show-help command (Alt+H). The help now lists all key bindings, and it shows user-friendly key names (like A-Up or C-x,C-r or C-S-PgUp or A-C-S-F3).
    • Added clink-popup-completions command that shows a popup window listing possible completions. Enter inserts the highlighted completion.
    • Added clink-popup-directories command that shows a popup window listing recent directories. Enter changes to the highlighted directory, or Shift+Enter inserts the highlighted directory in the editing line (or Ctrl+Enter).
    • Added clink-popup-history command that shows a popup window listing command history. Enter executes the highlighted command, or Shift+Enter jumps to the highlighted command in the history (or Ctrl+Enter).
    • Added clink-scroll-lineup, clink-scroll-linedown, clink-scroll-page-up, clink-scroll-page-down, clink-scroll-top, and clink-scroll-bottom commands that do what it looks like they'd do and are bound to the keys it looks like they'd be.
    • Added clink-expand-doskey command (Ctrl+Alt+f) that expands the current line according to the current doskey aliases.
    • Added clink-expand-env-var command (Ctrl+Alt+e) that expands the environment variable at the cursor point.
    • Added clink-exit command (Alt+F4) that exits CMD.
  • Fixed keyboard input issues:
    • Esc is a bindable key now (\e[27;27~).
    • Added more bindable key combinations (run clink echo then press keys to see the key sequence to use in the inputrc file).
    • Ctrl+@ (NUL) didn't work.
    • Ins toggles insert/overwrite mode.
    • Unbound keys are ignored now, instead of inserting gibberish characters (part of the terminal internal key sequence).
    • Fixed input handling so the quoted-insert command can work properly.
    • Fixed Esc while searching.
    • Fixed vi mode (was working in v0.4.9, but not in v1.0.x).
  • Fixed command history issues:
    • The dont_add_to_history_cmds clink setting is a space-delimited list of commands to not add to history.
    • Fixed bleeding between history banks.
    • Fixed uninitialized variable that made history updates intermittently do nothing or corrupt the other history bank.
    • Fixed output from clink history to convert to UTF16 when writing to the console (but write UTF8 when output is redirected).
  • Fixed terminal output issues:
    • Added terminal.emulate clink setting that controls whether clink does VT emulation or passes all ANSI escape codes directly to the console host. For example, this lets the prompt and completion coloring take advantage of more sophisticated ANSI escape codes such as XTerm 256 color and 16 bit color support.
    • Added back support for the prefer-visible-bell config variable.
    • Fixed underline support.
    • Fixed handling for UTF8 output from Readline.
    • Fixed invisible cursor point in lua debugger.
  • Completions:
    • Added match.sort_dirs clink setting that specifies where to sort directories in the list of possible completions: before files, mixed in with files, or after files.
    • Don't attempt completing incomplete UNC paths: at least the \\server\share\ path components are required (for anything shorter the OS APIs are guaranteed to fail, but will fail slowly).
    • Fixed sorting to use Unicode aware locale based sorting (like Windows does) instead of dumb UTF8 byte comparisons.
    • Fixed arbitrary limit on completions (had been limited to 64KB worth of completions).
    • Fixed quoting spaces in completions.
    • Fixed to use the same list as CMD for characters that require quoting.
    • Fixed normalizing UNC paths.
    • Fixed volume relative completions (e.g. x:foo).
  • Fixed UTF8 encoding in various lua functions.
  • Fixed printing stderr output from Readline, lua, and clink.
  • Fixed crashes and other failures when starting clink in 32 bit CMD.
  • Fixed some memory leaks that accumulated with each new line of input.
  • Fixed prompt filtering API to be backward compatible with v0.4.9 scripts.
  • Fixed lua errors from clink set (it neglected to fully initialize clink's lua integration before loading lua scripts).
  • Fixed UTF8 conversion bug that could truncate a string without fully converting it.
  • Fixed serious rampant memory corruption bug in v1.0.x (not present in v0.4.9), which had been causing intermittent malfunctions and data corruption and crashes.
  • Fixed multi-line doskey macros to show the prompt in between lines, like CMD does.
  • Removed the 4096 byte limit on input.
  • Renamed the clink DLL back to what it was in v0.4.x, to fix compile time problems.
  • Other fixed issues:
  • Fixed many other bugs.

Releases from mridgers/clink original repo

v1.0.0a1 (alpha test release)

  • Fixed use after free in Doskey emulation.
  • Use clink/terminal's wcwidth implementation.
  • screen_buffer::set_cursor() should be relative to the visible area.
  • Some internal lua functions needed the unquoted clink exe path.
  • Search ancestors for a compatible target process (for when cmd.exe starts another process that subsequently starts clink; especially useful during development).
  • The origin path now affects the hash in the dll cache, to guard against directory moves.
  • Improve terminal integration with the Readline library.
  • Internal improvements to the built-in ecma48 terminal emulator.
  • Try to adjust the cursor position better when resizing the terminal.
  • Fixed dash-dash flag completion.
  • More code reorganization.

v1.0.0a0 (alpha test release)

TODO: Yikes, so much to document...

  • Extensive changes.
  • Extensive code reorganization.

v0.4.9

  • Fixed broken Doskey on Win10 (#438, #451)

v0.4.8

  • Environment variable 'clink_profile' overrides Clink's profile path (#390).
  • Load a clink_inputrc file from Clink's profile directory (fixes #406).
  • Bug fixes;
    • Redraw issues when prompts end in OSC ANSI codes (#387, #384).
    • Fixed 'clink autorun --help' crash.

v0.4.7

  • Bug fixes;
    • Sometimes autorun tries to run clink.exe (#374).
    • Autorun would cause cmd.exe to return an error if it wasn't interactive (#373).

v0.4.6

  • HOME is only set if it is currently unset.
  • Readline can be initialised with .inputrc and _inputrc files too (#258).
  • Bug fixes;
    • Executable completion;
      • Paths from PATH were checked twice.
      • Incorrect results were returned for words ending in '.' or '-'.
      • Directories . and .. were incorrectly displayed.
    • Fixed a crash if .bat script's stdout is redirected (#366).
    • Occasional crash when injecting Clink (#351).
    • Display errors;
      • When editing near the window's right-hand edge (#347).
      • Double display of multi-line prompts when resizing the terminal (#352).
      • Very rare wrap artefacts when making the terminal window larger.
    • Doskey emulation (#344).
    • Improved 'clink autorun' help (#348).
    • Fixed launching Clink when clink.bat is renamed (#357).

v0.4.5

  • Improved 'clink autorun'. It now defaults to the Current User registry hive.
  • 'clink set' gives more details for enumeration-type settings.
  • Tab completion for p4vc.
  • New settings 'history_expand_mode' to control history expansion in quotes (#317).
  • Bug fixes;
    • Use full width of the terminal (#337).
    • Fixed MinGW compile error (#335).
    • Autorun now defaults to the current user's hive (#332).
    • Creating clink.html no longer needs Pandoc, plus it looks a bit better (#331).
    • Added settings to control history expansion (#326).
    • Correct fallback when 'use_altgr_substitute' is off (#325).
    • Load history prior to saving it on shutdown (#318).
    • Added Shift-Tab documentation and menu completion example (#190).
    • Added shim for backwards menu completion (#190).
    • Input handling now outputs '\e`Z' for Shift-Tab (#190).
    • Updated Readme with current Premake info (#310).
    • Guard against there being no buffer to read from (#304).
    • Fixed artefacts when resizing conhost's buffer (#139).
    • Clear remaining characters if scroll window was too small (#301)
    • Escape % characters when expanding aliases (#280).
    • Fixed leaking exception filters.
    • Clearing the screen doesn't leave artefacts behind.

v0.4.4

  • Completing .. behaves more like Bash (#277).
  • Escape from yes/no question when Ctrl+C is pressed.
  • Valid XP executables (#278, #289).
  • Fixed n-th argument yank not working as expected (#254).
  • Fixed prompt colours sometimes not working (#279, #286).
  • Fixed '!0' causing Clink to crash.
  • Save/restore cursor position in case Readline moves it.

v0.4.3

  • Localised Y/N when auto-answering 'terminate?' prompt.
  • $* would early out if there was no arguments.
  • Disable ANSI code support if third party provides it.
  • Installer can now set %CLINK_DIR% to install location.
  • Improved output from 'clink set'.
  • Support for Windows 10 Technical Preview.
  • Ctrl-L now scrolls last line to the top of the window rather than clearing.
  • New option to control how newline characters are pasted to the line.
  • New options to control history;
    • 'history_file_lines' - maximum lines saved to disk.
    • 'history_ignore_space' - ignore lines prefixed with whitespace.
    • 'history_dupe_mode' - how duplicate entries are handled.
    • 'history_io' - load/save history from disk every line.
  • Fixed nonfunctional numpad keys.
  • Fixed missing WINCH signals if other processes resize the buffer.
  • Support Alt codes sent from Conhost.

v0.4.2

  • Prompt colouring no longer requires third party ANSI code utility.
  • Override settings with environment variables prefixed with 'clink'.
  • Ctrl-PgUp goes up a directory.
  • Updated Go completions (by matrixik).
  • Arguments to clink.arg.new_parser() now initialise parser's flags/args (from vladimir-kotikov).
  • New clink.arg.add_flags() and clink.arg.add_arguments() functions.
  • Removed footer and Alt-H tip for more succinct stdout output.
  • Bug fixes;
    • Windows XP works again.
    • Fixed race condition in lua_execute().

v0.4.1

  • Bug fixes;
    • Various Unicode fixes causing corrupt environment variables.
    • Fixed thread resume/suspend causing rare system-wide deadlock.
    • Fixed incorrect translation of suffixed slash when completing flags.
  • Add --nolog argument to disable file logging. Fix #187 Fix #154
  • Added missing escape sequences from doskey emulation.
  • Reinstated unix-kill-line key binding.
  • Mapped PgUp/Down to search history using line typed so far.
  • Added documentation covering escape codes for special keys.
  • Added support for Windows' AltGr substitute Ctrl-Alt.
  • Support for Readline's 'menu' style completion (see docs).

v0.4

  • New features;
    • Better 'clink.arg' API. Easier, more intuitive, and more powerful.
    • Whitespace prefix skips exec matching.
    • Added a 'set' verb to easily change settings from the command line.
    • Basic support for a shells other than cmd.exe.
    • Completion for Go (contributed by Dobroslaw Zybort).
    • Setting 'exec_match_style' to -1 disables it entirely.
    • Make history persistence optional.
    • Alias/doskey completion.
    • Very basic support for Powershell.
    • View cmd.exe's autorun entry without needing admin rights.
  • New key bindings;
    • Ctrl-Alt-C : Copy command line to the clipboard.
    • Ctrl-Alt-E : Expand environment variable under cursor.
    • Ctrl-Alt-U : 'up directory' (formerly Shift-Up).
    • Ctrl-U : Adds '..' to the command line.
    • Alt-H : Shows active keymap's key bindings.
  • New Lua functions;
    • clink.execute().
    • clink.get_host_process().
    • clink.match_files().
    • clink.match_words().
    • clink.get_console_aliases().
  • Lots of bug fixes, including;
    • Better command extraction.
    • Fixed cmd.exe command paging and Ctrl-C/Ctrl-Break handling.
    • Multiple locale fixes.
    • Use localised text for 'Terminate batch job?' prompt.

v0.3

  • Automatic answering of cmd.exe's 'Terminate batch script?' prompt.
  • Coloured prompts (requires ANSICON or ConEmu).
  • Added Shift-Up keyboard shortcut to automatically execute 'cd ..'
  • Mapped Ctrl-Z to undo, Microsoft style.
  • Improved integration of Readline;
    • New input handling code (Ctrl-Alt combos now work).
    • An implementation of the Termcap library.
    • Fully functional Vi-mode support.
    • Support for resizable consoles.
    • Line wrapping now works correctly (issue 50).
  • Adjustable executable match style (issue 65).
  • Improved environment variable completion.
  • Added settings file to customise Clink.
  • New Lua features and functions;
    • Matches can now be filtered in Lua before they are display.
    • clink.quote_split().
    • clink.arg.node_merge().
    • clink.get_screen_info() (issue 71).
    • clink.split() (for splitting strings).
    • clink.chdir().
    • clink.get_cwd().
    • Functions to query Clink's settings.
  • New command line options;
    • '--profile ' to override default profile directory.
    • '--nohostcheck' disables verification that host is cmd.exe.
    • '--pid' specifies the process to inject into.
  • Update Mercurial completion (issue 73).
  • Start menu shortcut starts in USERPROFILE, like cmd.exe
  • Zip distribution is now portable.

v0.2.1

  • The .history file now merges multiple sessions together.
  • Fixed missing y/n, pause, and other prompts.
  • Fixed segfault in loader executable.
  • Better ConEmu compatibility.

v0.2

  • Basic argument completion for 'git', 'hg', 'svn', and 'p4'.
  • Traditional Bash clear screen ('Ctrl-L') and exit shortcuts ('Ctrl-D').
  • Scrollable command window using 'PgUp'/'PgDown' keys.
  • Doskey support.
  • Automatic quoting of file names with spaces.
  • Scriptable custom prompts.
  • New argument framework to ease writing context-sensitive match generators.
  • History and log file is now saved per-user rather than globally.
  • Improved Clink's command line interface ('clink --help').
  • More reliable handling of cmd.exe's autorun entry.
  • General improvements to executable and directory-command completion.
  • Symbolic link support.
  • Documentation.
  • Windows 8 support.
  • Improved hooking so Clink can be shared with other thirdparty utilities that also hook cmd.exe (ConEmu, ANSICon, etc.).

v0.1.1

  • Fixed AltGr+ on international keyboards.
  • Fixed broken completion when directories have a '-' in their name (Mark Hammond)
  • The check for single match scenarios now correctly handles case-insensitivity.

v0.1

  • Initial release.