Closed chrisant996 closed 9 months ago
When I run the script in a cmd with clink injected, Tab doesn't even do completion; it just inserts raw TAB characters.
I'll debug and fix both issues.
P.S. This used to work as of v1.4.0, so something has regressed since then.
v1.4.0
- Fixed #370; Tab inside
set /p var=
mistakenly discards any previous input.
When I run the script in a cmd with clink injected, Tab doesn't even do completion; it just inserts raw TAB characters.
The reason Tab completion isn't working for me is because the control
parameter is NULL
in the intercepted ReadConsoleW
call.
https://github.com/chrisant996/clink/blob/864f246de34b16236fa2de6bd10ea6631efc3c50/clink/app/src/host/host_cmd.cpp#L548
Oh, and that's because I have my CMD shortcuts configured to explicitly pass /f:off
which turns off completion. There was a reason I did that, but I forget why. 🤷♂️
@boka-boka What version of Clink are you using?
Can you share the full output from clink info
?
When I run the test bat script in CMD with Clink v1.6.1 injected, I get the expected results:
This is the output from clink info. Clearly an old version... I'll install the latest one to check my scenario.
clink info
version : 1.3.15.6e6e45
session : 25644
binaries : C:\Program Files\ConEmu\ConEmu\clink
state : C:\Users\evb\AppData\Local\clink
log : C:\Users\evb\AppData\Local\clink\clink.log
settings : C:\Users\evb\AppData\Local\clink\clink_settings
history : C:\Users\evb\AppData\Local\clink\clink_history
scripts : C:\Program Files\ConEmu\ConEmu\clink ; C:\Users\evb\AppData\Local\clink
inputrc : %clink_inputrc%
(unset)
: state directory
C:\Users\evb\AppData\Local\clink\.inputrc
C:\Users\evb\AppData\Local\clink\_inputrc
: %userprofile%
C:\Users\evb\.inputrc
C:\Users\evb\_inputrc
: %localappdata%
C:\Users\evb\AppData\Local\.inputrc
C:\Users\evb\AppData\Local\_inputrc
: %appdata%
C:\Users\evb\AppData\Roaming\.inputrc
C:\Users\evb\AppData\Roaming\_inputrc
: %home%
C:\Users\evb\.inputrc
C:\Users\evb\_inputrc
After installing latest version (version : 1.6.1.c7c448), it works very well.
Really sorry for this false alarm, and thanks a lot for your work on this great tool.
Oh yeah, that explains it. It was fixed in 1.4.0 a while back.
Thanks for reporting it, and I'm glad it's working now after the update.
Discussed in https://github.com/chrisant996/clink/discussions/552