Skip to content

Commit 5f4ce34

Browse files
wangqinglinmysterywolf
authored andcommitted
【更新】更新clink 工具,修复win11上方向键历史命令无效的问题
1 parent 8d98ada commit 5f4ce34

24 files changed

+11008
-4240
lines changed

tools/ConEmu/ConEmu/clink/CHANGES

Lines changed: 1972 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# When this file is named "default_inputrc" and is in the binaries
2+
# directory or profile directory, it provides enhanced default settings.
3+
4+
# Override the built-in Readline defaults with ones that provide a more
5+
# enhanced Clink experience.
6+
7+
colored-completion-prefix on
8+
colored-stats on
9+
mark-symlinked-directories on
10+
completion-auto-query-items on
11+
history-point-at-end-of-anchored-search on
12+
search-ignore-case on
13+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# When this file is named "default_settings" and is in the binaries
2+
# directory or profile directory, it provides enhanced default settings.
3+
4+
# Override built-in default settings with ones that provide a more
5+
# enhanced Clink experience.
6+
7+
autosuggest.enable = True
8+
clink.default_bindings = windows
9+
cmd.ctrld_exits = False
10+
color.arginfo = sgr 38;5;172
11+
color.argmatcher = sgr 1;38;5;40
12+
color.cmd = bold
13+
color.cmdredir = sgr 38;5;172
14+
color.cmdsep = sgr 38;5;214
15+
color.comment_row = sgr 38;5;87;48;5;18
16+
color.description = sgr 38;5;39
17+
color.doskey = sgr 1;38;5;75
18+
color.executable = sgr 1;38;5;33
19+
color.filtered = bold
20+
color.flag = sgr 38;5;117
21+
color.hidden = sgr 38;5;160
22+
color.histexpand = sgr 97;48;5;55
23+
color.horizscroll = sgr 38;5;16;48;5;30
24+
color.input = sgr 38;5;222
25+
color.readonly = sgr 38;5;28
26+
color.selected_completion = sgr 7
27+
color.selection = sgr 38;5;16;48;5;179
28+
color.suggestion = sgr 38;5;239
29+
color.unrecognized = sgr 38;5;203
30+
history.max_lines = 25000
31+
history.time_stamp = show
32+
match.expand_envvars = True
33+
match.substring = True
34+
Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
:: Copyright (c) 2012 Martin Ridgers
2-
::
3-
:: Permission is hereby granted, free of charge, to any person obtaining a copy
4-
:: of this software and associated documentation files (the "Software"), to deal
5-
:: in the Software without restriction, including without limitation the rights
6-
:: to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7-
:: copies of the Software, and to permit persons to whom the Software is
8-
:: furnished to do so, subject to the following conditions:
9-
::
10-
:: The above copyright notice and this permission notice shall be included in
11-
:: all copies or substantial portions of the Software.
12-
::
13-
:: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14-
:: IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15-
:: FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16-
:: AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17-
:: LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18-
:: OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19-
:: SOFTWARE.
2+
:: License: http://opensource.org/licenses/MIT
203

214
@echo off
5+
setlocal enableextensions
6+
set clink_profile_arg=
7+
set clink_quiet_arg=
228

239
:: Mimic cmd.exe's behaviour when starting from the start menu.
24-
if /i "%1"=="startmenu" (
10+
if /i "%~1"=="startmenu" (
2511
cd /d "%userprofile%"
26-
shift /1
12+
shift
2713
)
2814

2915
:: Check for the --profile option.
30-
if /i "%1"=="--profile" (
16+
if /i "%~1"=="--profile" (
3117
set clink_profile_arg=--profile "%~2"
32-
shift /1
33-
shift /1
18+
shift
19+
shift
20+
)
21+
22+
:: Check for the --quiet option.
23+
if /i "%~1"=="--quiet" (
24+
set clink_quiet_arg= --quiet
25+
shift
3426
)
3527

3628
:: If the .bat is run without any arguments, then start a cmd.exe instance.
37-
if "%1"=="" (
29+
if _%1==_ (
3830
call :launch
3931
goto :end
4032
)
4133

34+
:: Test for autorun.
35+
if defined CLINK_NOAUTORUN if /i "%~1"=="inject" if /i "%~2"=="--autorun" goto :end
36+
37+
:: Endlocal before inject tags the prompt.
38+
endlocal
39+
4240
:: Pass through to appropriate loader.
4341
if /i "%processor_architecture%"=="x86" (
4442
"%~dp0\clink_x86.exe" %*
43+
) else if /i "%processor_architecture%"=="arm64" (
44+
"%~dp0\clink_arm64.exe" %*
4545
) else if /i "%processor_architecture%"=="amd64" (
4646
if defined processor_architew6432 (
4747
"%~dp0\clink_x86.exe" %*
@@ -51,10 +51,13 @@ if /i "%processor_architecture%"=="x86" (
5151
)
5252

5353
:end
54-
set clink_profile_arg=
5554
goto :eof
5655

5756
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
5857
:launch
59-
start "Clink" cmd.exe /s /k ""%~dpnx0" inject %clink_profile_arg%"
58+
setlocal
59+
set WT_PROFILE_ID=
60+
set WT_SESSION=
61+
start "Clink" cmd.exe /s /k ""%~dpnx0" inject %clink_profile_arg%%clink_quiet_arg%"
62+
endlocal
6063
exit /b 0

tools/ConEmu/ConEmu/clink/clink.html

Lines changed: 8956 additions & 723 deletions
Large diffs are not rendered by default.
118 KB
Binary file not shown.

0 commit comments

Comments
 (0)