Skip to content

Commit

Permalink
inlined ps1 hook for a easier setup
Browse files Browse the repository at this point in the history
  • Loading branch information
shilangyu committed Jul 24, 2020
1 parent f785cc8 commit 6052e95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Instead of using `scoop-search.exe <term>` you can setup a hook that will run `s
Add this to your Powershell profile (usually located at `$PROFILE`)

```ps1
Invoke-Expression (& { (scoop-search --hook) -join "`n" })
Invoke-Expression (&scoop-search --hook)
```

## Features
Expand Down
11 changes: 1 addition & 10 deletions args.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,4 @@ func parseArgs() parsedArgs {
return parsedArgs{query, hook, all}
}

const poshHook = `
function scoop {
if ($args[0] -eq "search") {
scoop-search.exe @($args | Select-Object -Skip 1)
}
else {
scoop.ps1 @args
}
}
`
const poshHook = `function scoop { if ($args[0] -eq "search") { scoop-search.exe @($args | Select-Object -Skip 1) } else { scoop.ps1 @args } }`

0 comments on commit 6052e95

Please sign in to comment.