Scoop, although very useful and nice to use,
uses a (subjectively) terrible shim.exe
file to redirect commands from scoop\shims\app.exe
to scoop\apps\app\current\app.exe
, because:
- It's made in C#, and thus requires an instantiation of a .NET command line app everytime it is started, which can make a command run much slower than if it had been ran directly;
- It does not handle Ctrl+C and other signals correctly, which can be quite infuriating.
The last issue making interaction with REPLs and long-running apps practically impossible, and having never been fixed, I set out to improve them with this repository.
shim.c
is a C program which avoids unnecessary allocations and simply wraps a
call to CreateProcess
,
essentially doing the exact same thing as the existing shim.exe
, without the needless .NET framework.
Additionally, it ignores Ctrl+C and other signals, giving full control of these signals to the child process.
- In a Visual Studio command prompt, run
cl /O1 shim.c
. - Replace any
.exe
inscoop\shims
byshim.exe
.
An additional script, repshims.bat
, is provided. It will replace all .exe
s in the user's Scoop directory
by shim.exe
.