{"id":20688783,"url":"https://github.com/71/scoop-better-shimexe","last_synced_at":"2026-03-14T19:44:02.945Z","repository":{"id":43475034,"uuid":"178835989","full_name":"71/scoop-better-shimexe","owner":"71","description":"A better shim.exe file for Scoop.","archived":false,"fork":false,"pushed_at":"2023-06-19T21:04:56.000Z","size":14,"stargazers_count":78,"open_issues_count":6,"forks_count":34,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-07-13T19:46:08.859Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/71.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-04-01T10:03:59.000Z","updated_at":"2025-06-07T23:58:35.000Z","dependencies_parsed_at":"2025-04-22T15:53:22.190Z","dependency_job_id":null,"html_url":"https://github.com/71/scoop-better-shimexe","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/71/scoop-better-shimexe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/71%2Fscoop-better-shimexe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/71%2Fscoop-better-shimexe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/71%2Fscoop-better-shimexe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/71%2Fscoop-better-shimexe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/71","download_url":"https://codeload.github.com/71/scoop-better-shimexe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/71%2Fscoop-better-shimexe/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265314500,"owners_count":23745281,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T23:06:59.550Z","updated_at":"2026-03-14T19:44:02.899Z","avatar_url":"https://github.com/71.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `shim.c`\n\n[`shim.c`](./shim.c) is a simple Windows program that, when started:\n1. Looks for a file with the exact same name as the running program, but with\n   the extension `shim` (e.g. `C:\\bin\\foo.exe` will read the file `C:\\bin\\foo.shim`).\n2. Reads and [parses](#shim-format) the files into a\n   [Scoop](https://github.com/lukesampson/scoop) shim format.\n3. Executes the target executable with the given arguments.\n\n`shim.c` was originally made to replace [Scoop](https://github.com/lukesampson/scoop)'s\n[`shim.cs`](https://github.com/lukesampson/scoop/blob/96de9c14bb483f9278e4b0a9e22b1923ee752901/supporting/shimexe/shim.cs)\nsince it had several important flaws:\n1. [It was made in C#](https://github.com/lukesampson/scoop/tree/96de9c14bb483f9278e4b0a9e22b1923ee752901/supporting/shimexe),\n   and thus required an instantiation of a .NET command line app everytime it was started,\n   which can make a command run much slower than if it had been ran directly;\n2. [It](https://github.com/lukesampson/scoop/issues/2339) [did](https://github.com/lukesampson/scoop/issues/1896)\n   [not](https://github.com/felixse/FluentTerminal/issues/221) handle Ctrl+C and other\n   signals correctly, which could be quite infuriating (and essentially killing REPLs and long-running apps).\n\n[`shim.c`](./shim.c) is:\n- **Faster**, because it does not use the .NET Framework, and parses the `.shim` file in a simpler way.\n- **More efficient**, because by the time the target of the shim is started, all allocated memory will have been freed.\n- And more importantly, it **works better**:\n  - Signals originating from pressing `Ctrl+C` are ignored, and therefore handled directly by the spawned child.\n    Your processes and REPLs will no longer close when pressing `Ctrl+C`.\n  - Children are automatically killed when the shim process is killed. No more orphaned processes and weird behaviors.\n\n\u003e **Note**: This project is not affiliated with [Scoop](https://github.com/lukesampson/scoop).\n\n\n## Installation for Scoop\n\n- In a Visual Studio command prompt, run `cl /O1 shim.c`.\n- Replace any `.exe` in `scoop\\shims` by `shim.exe`.\n\nAn additional script, `repshims.bat`, is provided. It will replace all `.exe`s in the user's Scoop directory\nby `shim.exe`.\n\n\n## Example\n\nGiven the following shim `gs.shim`:\n```\npath = C:\\Program Files\\Git\\git.exe\nargs = status -u\n```\n\nIn this directory, where `gs.exe` is the compiled `shim.c`:\n```\nC:\\Bin\\\n   gs.exe\n   gs.shim\n```\n\nThen calling `gs -s` will run the program `C:\\Program Files\\Git\\git.exe status -u -s`.\n\n\n## Shim format\n\nShims follow the same format as Scoop's shims: line-separated `key = value` pairs.\n```\npath = C:\\Program Files\\Git\\git.exe\nargs = status -uno\n```\n\n`path` is a required value, but `args` can be omitted. Also, do note that lines **must** end with a line feed.\n\n\n## License\n\n`SPDX-License-Identifier: MIT OR Unlicense`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F71%2Fscoop-better-shimexe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F71%2Fscoop-better-shimexe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F71%2Fscoop-better-shimexe/lists"}