ogerardin / scoop-better-shimexe

A better shim.exe file for Scoop.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  1. 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;
  2. 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.

Installation

  • In a Visual Studio command prompt, run cl /O1 shim.c.
  • Replace any .exe in scoop\shims by shim.exe.

An additional script, repshims.bat, is provided. It will replace all .exes in the user's Scoop directory by shim.exe.

About

A better shim.exe file for Scoop.


Languages

Language:C 97.3%Language:Batchfile 2.7%