Skip to content

Commit

Permalink
Merge pull request #42 from eggbean/cmd
Browse files Browse the repository at this point in the history
Add instructions for cmd.exe wrapper to README.md
  • Loading branch information
shilangyu authored Jan 13, 2024
2 parents 55a7861 + 0992ed8 commit 8b6b180
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Fast `scoop search` drop-in replacement 🚀
scoop install scoop-search
```

## Hook
## PowerShell hook

Instead of using `scoop-search.exe <term>` you can setup a hook that will run `scoop-search.exe` whenever you use native `scoop search`

Expand All @@ -21,6 +21,28 @@ Add this to your Powershell profile (usually located at `$PROFILE`)
Invoke-Expression (&scoop-search --hook)
```

## CMD.exe wrapper

If you use `cmd.exe` you can use a wrapper script to do the same. Name this `scoop.cmd` and add it to
a directory in your `%PATH%`

```
@echo off
if "%1" == "search" (
call :search_subroutine %*
) else (
powershell scoop.ps1 %*
)
goto :eof
:search_subroutine
set "args=%*"
set "newargs=%args:* =%"
scoop-search.exe %newargs%
goto :eof
```

## Features

Behaves just like `scoop search` and returns identical output. If any differences are found please open an issue.
Expand Down

0 comments on commit 8b6b180

Please sign in to comment.