Comments (5)
Clink has to know what process to inject into. If you don't specify one via --session
then it uses the parent process. When cmd.exe runs clink inject
, cmd.exe is the parent process, so Clink is able to automatically find the right cmd.exe process.
Since you're using an .exe shim, the shim is the parent process. But no process id was specified, and the Clink cannot inject into the shim process, so it fails. "Unknown host 'clink.exe'" means "clink.exe is not cmd.exe, so can't inject into clink.exe".
The reason it selects the clink_x86.exe
is because the alternative exe shim is x86, and so the OS has automatically been dropped into x86 mode, and so the clink.bat
file sees that the current OS mode is x86 and so it naturally accommodates that, since that's what the mode the user has selected externally.
Let's back up a few steps:
What was the motivation for trying to use scoop-better-shimexe?
What problem was encountered that is trying to be solved by making an exe shim?
Any attempt to use an exe shim for Clink will force the OS mode to use the same CPU emulation mode as the exe itself. E.g. on an ARM device, if the exe shim is x64, then the exe shim will force x64 mode even though the CPU is natively ARM64 and even if the original cmd.exe that invoked the shim was ARM64.
That's the whole reason Clink has its own clink.bat
shim -- it is functionally necessary to have a batch script shim.
If you can share what problem was encountered, maybe there's a better way to solve the problem than creating an exe shim (which will inherently cause other problems).
from clink.
What was the motivation for trying to use scoop-better-shimexe?
Having my profile path automatically included in the arguments without having to edit the batch file.
from clink.
If you want to always use a particular profile, have you considered setting %CLINK_PROFILE%
? See docs for more info.
from clink.
If you want to always use a particular profile, have you considered setting
%CLINK_PROFILE%
? See docs for more info.
I knew about it, but using a shim was more appealing to me. Oh well.
from clink.
@ImportTaste You can still use a shim. Just not an exe shim. Or if you want to use an exe shim, then you need to make the shim find its parent process and pass that via --session parent_process_id
.
Or you can simply make your own separate clink.bat
file in a separate directory, and put that directory earlier in the %PATH%
so that it gets used instead of Clink's own clink.bat
file. Your separate script can be as simple as:
@c:\clink\bin\clink.bat --profile c:\clink\usr %*
I think there are several easy ways to get exactly the behavior you want, without using %CLINK_PROFILE%
. But an exe shim isn't one of them. And also wouldn't be simple to write, because it takes extra coding to avoid interfering with the ability to actually inject. And also an exe shim can inherently interfere with the context and CPU type or emulation, which can in turn mess with registry access and file system access, because of how 64/32 virtualization works in Windows.
from clink.
Related Issues (20)
- Unexpected tab completion fills HOT 3
- How about adding an automatic update mechanism? HOT 7
- Alias?? HOT 3
- Documentation for `globpattern` missing HOT 2
- Does installscripts search subdirectories? HOT 2
- Completions not working HOT 4
- Prompt auto_answer display blank lines if prompt have new line for answering HOT 3
- Tab completion messes up ..\ in partial path when no matches found HOT 3
- Enable previous tab completion behaviour (wait on clarification instead of cycling through choices) HOT 1
- How can I cycle through matching command lines in the command history? HOT 4
- Documentation Clarification HOT 9
- history delete doesn't work HOT 11
- Newbie question about window background HOT 4
- Ctrl + D functionality missing HOT 3
- ERROR: Clink initilization has failed with error code: 0 HOT 4
- FinalTerm escape sequences are stripped from prompt filter HOT 5
- How to start clink quiet in new Windows Terminal? HOT 2
- Startup time significantly slower in 1.4.25.e0d48c HOT 4
- Double click on Clink.bat to flash back HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clink.