【更新】更新clink 工具,修复win11上方向键历史命令无效的问题

This commit is contained in:
wangqinglin 2023-08-14 19:30:06 +08:00 committed by Meco Man
parent 8d98ada8f7
commit 5f4ce34502
24 changed files with 11086 additions and 4318 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,13 @@
# When this file is named "default_inputrc" and is in the binaries
# directory or profile directory, it provides enhanced default settings.
# Override the built-in Readline defaults with ones that provide a more
# enhanced Clink experience.
colored-completion-prefix on
colored-stats on
mark-symlinked-directories on
completion-auto-query-items on
history-point-at-end-of-anchored-search on
search-ignore-case on

View File

@ -0,0 +1,34 @@
# When this file is named "default_settings" and is in the binaries
# directory or profile directory, it provides enhanced default settings.
# Override built-in default settings with ones that provide a more
# enhanced Clink experience.
autosuggest.enable = True
clink.default_bindings = windows
cmd.ctrld_exits = False
color.arginfo = sgr 38;5;172
color.argmatcher = sgr 1;38;5;40
color.cmd = bold
color.cmdredir = sgr 38;5;172
color.cmdsep = sgr 38;5;214
color.comment_row = sgr 38;5;87;48;5;18
color.description = sgr 38;5;39
color.doskey = sgr 1;38;5;75
color.executable = sgr 1;38;5;33
color.filtered = bold
color.flag = sgr 38;5;117
color.hidden = sgr 38;5;160
color.histexpand = sgr 97;48;5;55
color.horizscroll = sgr 38;5;16;48;5;30
color.input = sgr 38;5;222
color.readonly = sgr 38;5;28
color.selected_completion = sgr 7
color.selection = sgr 38;5;16;48;5;179
color.suggestion = sgr 38;5;239
color.unrecognized = sgr 38;5;203
history.max_lines = 25000
history.time_stamp = show
match.expand_envvars = True
match.substring = True

View File

@ -1,47 +1,47 @@
:: Copyright (c) 2012 Martin Ridgers
::
:: Permission is hereby granted, free of charge, to any person obtaining a copy
:: of this software and associated documentation files (the "Software"), to deal
:: in the Software without restriction, including without limitation the rights
:: to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
:: copies of the Software, and to permit persons to whom the Software is
:: furnished to do so, subject to the following conditions:
::
:: The above copyright notice and this permission notice shall be included in
:: all copies or substantial portions of the Software.
::
:: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
:: IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
:: FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
:: AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
:: LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
:: OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
:: SOFTWARE.
:: License: http://opensource.org/licenses/MIT
@echo off
setlocal enableextensions
set clink_profile_arg=
set clink_quiet_arg=
:: Mimic cmd.exe's behaviour when starting from the start menu.
if /i "%1"=="startmenu" (
if /i "%~1"=="startmenu" (
cd /d "%userprofile%"
shift /1
shift
)
:: Check for the --profile option.
if /i "%1"=="--profile" (
if /i "%~1"=="--profile" (
set clink_profile_arg=--profile "%~2"
shift /1
shift /1
shift
shift
)
:: Check for the --quiet option.
if /i "%~1"=="--quiet" (
set clink_quiet_arg= --quiet
shift
)
:: If the .bat is run without any arguments, then start a cmd.exe instance.
if "%1"=="" (
if _%1==_ (
call :launch
goto :end
)
:: Test for autorun.
if defined CLINK_NOAUTORUN if /i "%~1"=="inject" if /i "%~2"=="--autorun" goto :end
:: Endlocal before inject tags the prompt.
endlocal
:: Pass through to appropriate loader.
if /i "%processor_architecture%"=="x86" (
"%~dp0\clink_x86.exe" %*
) else if /i "%processor_architecture%"=="arm64" (
"%~dp0\clink_arm64.exe" %*
) else if /i "%processor_architecture%"=="amd64" (
if defined processor_architew6432 (
"%~dp0\clink_x86.exe" %*
@ -51,10 +51,13 @@ if /i "%processor_architecture%"=="x86" (
)
:end
set clink_profile_arg=
goto :eof
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:launch
start "Clink" cmd.exe /s /k ""%~dpnx0" inject %clink_profile_arg%"
setlocal
set WT_PROFILE_ID=
set WT_SESSION=
start "Clink" cmd.exe /s /k ""%~dpnx0" inject %clink_profile_arg%%clink_quiet_arg%"
endlocal
exit /b 0

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -1,72 +0,0 @@
set bell-style visible
set completion-ignore-case on
set completion-map-case on
set completion-display-width 106
set output-meta on
set skip-completed-text on
set convert-meta on
"\e`s": backward-word # ctrl-left
"\e`t": forward-word # ctrl-right
"\e`O": end-of-line # end
"\e`G": beginning-of-line # home
"\e`S": delete-char # del
"\e`c": page-up # shift page-up
"\e`u": kill-line # ctrl+end
"\e`w": backward-kill-line # ctrl+home
"\e`I": history-search-backward # page-up
"\e`Q": history-search-forward # page-down
set keymap emacs
"\t": clink-completion-shim
C-v: paste-from-clipboard
C-q: reload-lua-state
C-z: undo
M-h: show-rl-help
M-C-c: copy-line-to-clipboard
C-c: ctrl-c
M-a: "..\\"
set keymap vi-insert
"\t": clink-completion-shim
C-v: paste-from-clipboard
C-z: undo
M-h: show-rl-help
M-C-c: copy-line-to-clipboard
C-c: ctrl-c
M-a: "..\\"
set keymap vi-move
C-v: paste-from-clipboard
C-z: undo
M-h: show-rl-help
M-C-c: copy-line-to-clipboard
C-c: ctrl-c
M-a: "..\\"
$if cmd.exe
set keymap emacs
"\e`U": up-directory
M-C-u: up-directory
M-C-e: expand-env-vars
set keymap vi-insert
"\e`U": up-directory
M-C-u: up-directory
M-C-e: expand-env-vars
set keymap vi-move
"\e`U": up-directory
M-C-u: up-directory
M-C-e: expand-env-vars
$endif
set keymap emacs
# Uncomment these two lines for vanilla cmd.exe style completion.
# "\t": clink-menu-completion-shim
# "\e`Z": clink-backward-menu-completion-shim
$include ~/clink_inputrc
$include ~/_inputrc
$include ~/.inputrc

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB