Skip to content

Commit

Permalink
removed all from parsed args, not being used
Browse files Browse the repository at this point in the history
  • Loading branch information
shilangyu committed Jul 26, 2020
1 parent 40c2c41 commit 6922849
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions args.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@ import "os"
type parsedArgs struct {
query string
hook bool
all bool
}

func parseArgs() parsedArgs {
var all, hook bool
var hook bool
var query string

if len(os.Args) == 1 {
all = true
// pass
} else if os.Args[1] == "--hook" {
hook = true
} else {
query = os.Args[1]
}

return parsedArgs{query, hook, all}
return parsedArgs{query, hook}
}

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 6922849

Please sign in to comment.