Skip to content

Commit e2a0d8d

Browse files
committed
update clink
1 parent d895cd7 commit e2a0d8d

12 files changed

+197
-39
lines changed

tools/ConEmu/ConEmu/clink/CHANGES

+69
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,75 @@
22

33
### Releases from [chrisant996/clink](https://github.com/chrisant996/clink) fork
44

5+
#### v1.6.12
6+
7+
- Fixed [#597](https://github.com/chrisant996/clink/issues/597); prompt shows leftover text sometimes (regression introduced in v1.6.10).
8+
- Fixed [#596](https://github.com/chrisant996/clink/issues/596); it's easy to forget whether <kbd>Enter</kbd> in history list executes or inserts.
9+
10+
#### v1.6.11
11+
12+
- Added `os.setalias()` for setting a doskey alias without needing to invoke the doskey.exe program.
13+
- Fixed a case where match descriptions could be displayed with incorrect padding and truncation.
14+
- Lua debugging enhancements:
15+
- Changed the built-in embedded scripts to include debug info, which allows some Lua error messages to be more useful for troubleshooting.
16+
- Added `srcmap` command in the Lua debugger to override where to find source files.
17+
18+
#### v1.6.10
19+
20+
- Added an optimization to further reduce flicker when re-drawing the prompt.
21+
- Added a `user_data.shared_user_data` table to allow linked argmatchers to share data with each other while an input line is being parsed (see [Responding to Arguments in Argmatchers](https://chrisant996.github.io/clink/clink.html#responsive-argmatchers) for details).
22+
- Fixed [#579](https://github.com/chrisant996/clink/issues/579); popup lists could accidentally truncate text in the first column when there's only one column.
23+
- Fixed [#576](https://github.com/chrisant996/clink/issues/576); setup exe doesn't remove old uninstall exe files.
24+
- Fixed [#575](https://github.com/chrisant996/clink/issues/575); error when `color.executable` is set and `color.unrecognized` is not (regression introduced in v1.6.2).
25+
26+
#### v1.6.9
27+
28+
- Fixed [#574](https://github.com/chrisant996/clink/issues/574); `prompt.spacing` "eats" lines containing Unicode Surrogate Pairs such as for some [nerdfont](https://nerdfonts.com) icons (Windows Terminal accidentally returns that such lines are empty).
29+
- Fixed [#573](https://github.com/chrisant996/clink/issues/573); C# was unable to read Clink's version resource.
30+
- Fixed [#555](https://github.com/chrisant996/clink/issues/555); security advisory [CVE-2020-24370](https://github.com/advisories/GHSA-gfr4-c37g-mm3v) for a Lua bug.
31+
32+
#### v1.6.8
33+
34+
- Fixed [#571](https://github.com/chrisant996/clink/issues/571); error in clink.bat under some circumstances (regression introduced in v1.6.7).
35+
36+
#### v1.6.7
37+
38+
- Recognize the little-known `cmd /r` as a synonym for `cmd /c` so that Clink can optimize and skip injecting into a `cmd /r` process.
39+
- Fixed displaying descriptions when they're left-justified (regression introduced in v1.6.6).
40+
- Fixed `argmatcher:chaincommand("run")` to not find argmatchers for builtin CMD command names (since CMD doesn't get invoked in that case, so it won't get interpreted as a CMD command).
41+
- Fixed `argmatcher:chaincommand()` to find an argmatcher for a builtin CMD command even if a directory exists with the same name (since CMD interprets that case as a CMD command).
42+
- Fixed `argmatcher:chaincommand("cmd")` so when `exec.aliases` is enabled it can include aliases as completions.
43+
- Fixed `argmatcher:addarg({loopchars="+", etcetc})` so that `-Q:+x` still gets parsed into two input words `-Q:` and `+x`.
44+
- Fixed to parse `foo^ bar` as two words "foo" and "bar".
45+
- Fixed to recognize `^echo` (etc) as a builtin CMD command name despite embedded `^` characters.
46+
- Fixed [#570](https://github.com/chrisant996/clink/issues/570); fixed #569 more thoroughly, and `cd /d` cannot be used anywhere because it also requires command extensions.
47+
48+
#### v1.6.6
49+
50+
- Added `clink history --no-show-time` to allow omitting history timestamps even when the `history.time_stamp` setting is `show`.
51+
- Fixed match display to not right justify descriptions when the screen isn't wide enough or when descriptions contain aligned columns (like `clink set` completions do since v1.6.3).
52+
- Fixed `clink history` when output is redirected; strip any escape codes that might be embedded in the time format.
53+
- Fixed [#569](https://github.com/chrisant996/clink/issues/569); `cmd /e:off` causes syntax error in clink.bat script.
54+
- Fixed [#567](https://github.com/chrisant996/clink/issues/567); `clink history compact` accidentally deletes all timestamps.
55+
- Fixed documentation error in Lua API Reference about `"w"` mode in `io.open()` and `io.sopen()` (the behavior was correct, but the documentation was inaccurate/unclear).
56+
57+
#### v1.6.5
58+
59+
- Added all match fields in the table of matches passed to the `clink.onfiltermatches()` callback function.
60+
- Fixed stripping colors from strings (e.g. when displaying in popup lists); it didn't strip 8-bit and 24-bit colors correctly.
61+
62+
#### v1.6.4
63+
64+
- Added `rl_buffer:hassuggestion()` and `rl_buffer:insertsuggestion()` for direct access to inserting suggestions without invoking Readline commands.
65+
- Added `clink.dirmatchesexact()` and `clink.filematchesexact()` which are the same as the non-`exact` variants, except these don't append a `*` to the search pattern. For example, `clink.filematchesexact("*.zip")` can collect exactly "\*.zip" file matches instead of "\*.zip\*".
66+
- Added OS version info to `clink info`.
67+
- Added UNC share name completion when using Executable Completion (the `exec.enable` setting).
68+
- Fixed completing input `.` or `..` when the `exec.enable` setting is enabled.
69+
- Fixed applying `colored-completion-prefix` when match display filtering is active or a match has a custom `display` field.
70+
- Fixed the `exec.path` setting so it doesn't accidentally include directories if their names end with an executable extension such as `.exe`.
71+
- Fixed finding an argmatcher registered with a full path (e.g. `c:\foo\bar.exe`) when a full path is entered without a drive letter (e.g. enter `\foo\bar.exe`).
72+
- Fixed [#562](https://github.com/chrisant996/clink/issues/562); `clink autorun install` strips quotes by mistake.
73+
574
#### v1.6.3
675

776
- **Breaking Change:** For the four <kbd>Ctrl</kbd>-<kbd>-</kbd> key combinations, Clink got the <kbd>Shift</kbd> key backwards and generated inaccurate input codes. And that broke the Readline/bash default key binding for `undo` (the Windows default key binding of <kbd>Ctrl</kbd>-<kbd>z</kbd> works fine). If your .inputrc file has bindings for any of the <kbd>Ctrl</kbd>-<kbd>-</kbd> key combinations then you can keep the keys working the same by updating the key bindings. You can even use the [`$if clink_version >= 1.6.3`](#if_clink_version) syntax in your .inputrc file to make it define the key bindings differently in different versions of Clink.

tools/ConEmu/ConEmu/clink/clink.bat

+18-17
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,64 @@
1-
:: Copyright (c) 2012 Martin Ridgers
2-
:: License: http://opensource.org/licenses/MIT
3-
41
@echo off
2+
rem -- Copyright (c) 2012 Martin Ridgers
3+
rem -- Portions Copyright (c) 2020-2024 Christopher Antos
4+
rem -- License: http://opensource.org/licenses/MIT
5+
56
setlocal enableextensions
67
set clink_profile_arg=
78
set clink_quiet_arg=
89

9-
:: Mimic cmd.exe's behaviour when starting from the start menu.
10+
rem -- Mimic cmd.exe's behaviour when starting from the start menu.
1011
if /i "%~1"=="startmenu" (
1112
cd /d "%userprofile%"
1213
shift
1314
)
1415

15-
:: Check for the --profile option.
16+
rem -- Check for the --profile option.
1617
if /i "%~1"=="--profile" (
1718
set clink_profile_arg=--profile "%~2"
1819
shift
1920
shift
2021
)
2122

22-
:: Check for the --quiet option.
23+
rem -- Check for the --quiet option.
2324
if /i "%~1"=="--quiet" (
2425
set clink_quiet_arg= --quiet
2526
shift
2627
)
2728

28-
:: If the .bat is run without any arguments, then start a cmd.exe instance.
29+
rem -- If the .bat is run without any arguments, then start a cmd.exe instance.
2930
if _%1==_ (
3031
call :launch
3132
goto :end
3233
)
3334

34-
:: Test for autorun.
35+
rem -- Test for autorun.
3536
if defined CLINK_NOAUTORUN if /i "%~1"=="inject" if /i "%~2"=="--autorun" goto :end
3637

37-
:: Endlocal before inject tags the prompt.
38-
endlocal
39-
40-
:: Pass through to appropriate loader.
38+
rem -- Forward to appropriate loader, and endlocal before inject tags the prompt.
4139
if /i "%processor_architecture%"=="x86" (
40+
endlocal
4241
"%~dp0\clink_x86.exe" %*
4342
) else if /i "%processor_architecture%"=="arm64" (
43+
endlocal
4444
"%~dp0\clink_arm64.exe" %*
4545
) else if /i "%processor_architecture%"=="amd64" (
4646
if defined processor_architew6432 (
47+
endlocal
4748
"%~dp0\clink_x86.exe" %*
4849
) else (
50+
endlocal
4951
"%~dp0\clink_x64.exe" %*
5052
)
5153
)
5254

53-
:end
54-
goto :eof
55+
goto :end
5556

56-
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
5757
:launch
58-
setlocal
58+
setlocal enableextensions
5959
set WT_PROFILE_ID=
6060
set WT_SESSION=
6161
start "Clink" cmd.exe /s /k ""%~dpnx0" inject %clink_profile_arg%%clink_quiet_arg%"
6262
endlocal
63-
exit /b 0
63+
64+
:end

0 commit comments

Comments
 (0)