Skip to content

Commit

Permalink
Add yay specific args, drop conflicting args
Browse files Browse the repository at this point in the history
Replace -P/--print with -P/--show
Replace --config with --currentconfig
  • Loading branch information
Morganamilo committed Aug 5, 2018
1 parent f62bd92 commit 2d6fe95
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func handleCmd() (err error) {
err = show(passToPacman(cmdArgs))
case "G", "getpkgbuild":
err = handleGetpkgbuild()
case "P", "print":
case "P", "show":
err = handlePrint()
case "Y", "--yay":
err = handleYay()
Expand Down Expand Up @@ -194,7 +194,7 @@ func handlePrint() (err error) {
var tmpConfig Configuration
defaultSettings(&tmpConfig)
fmt.Printf("%v", tmpConfig)
case cmdArgs.existsArg("g", "config"):
case cmdArgs.existsArg("g", "currentconfig"):
fmt.Printf("%v", config)
case cmdArgs.existsArg("n", "numberupgrades"):
err = printNumberOfUpdates()
Expand Down
9 changes: 7 additions & 2 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func isArg(arg string) bool {
case "V", "version":
case "h", "help":
case "Y", "yay":
case "P", "print":
case "P", "show":
case "G", "getpkgbuild":
case "b", "dbpath":
case "r", "root":
Expand Down Expand Up @@ -479,6 +479,11 @@ func isArg(arg string) bool {
case "removemake":
case "noremovemake":
case "askremovemake":
case "complete":
case "stats":
case "news":
case "gendb":
case "currentconfig":
default:
return false
}
Expand Down Expand Up @@ -647,7 +652,7 @@ func isOp(op string) bool {
case "U", "upgrade":
// yay specific
case "Y", "yay":
case "P", "print":
case "P", "show":
case "G", "getpkgbuild":
default:
return false
Expand Down

0 comments on commit 2d6fe95

Please sign in to comment.