mirror of
https://github.com/Jguer/yay
synced 2024-10-05 23:59:13 +00:00
Merge pull request #615 from Morganamilo/fixargs
Add yay specific args, drop conflicting args
This commit is contained in:
commit
a5ae757803
8
cmd.go
8
cmd.go
|
@ -29,7 +29,7 @@ operations:
|
|||
|
||||
New operations:
|
||||
yay {-Y --yay} [options] [package(s)]
|
||||
yay {-P --print} [options]
|
||||
yay {-P --show} [options]
|
||||
yay {-G --getpkgbuild} [package(s)]
|
||||
|
||||
New options:
|
||||
|
@ -111,7 +111,7 @@ Permanent configuration options:
|
|||
Print specific options:
|
||||
-c --complete Used for completions
|
||||
-d --defaultconfig Print default yay configuration
|
||||
-g --config Print current yay configuration
|
||||
-g --currentconfig Print current yay configuration
|
||||
-s --stats Display system package statistics
|
||||
-w --news Print arch news
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
|
|
@ -26,7 +26,7 @@ Perform yay specific operations. This is the default if no other operation is
|
|||
selected.
|
||||
|
||||
.TP
|
||||
.B \-P, \-\-print
|
||||
.B \-P, \-\-show
|
||||
Perform yay specific print operations.
|
||||
|
||||
.TP
|
||||
|
@ -101,7 +101,7 @@ During complete adjust the output for the fish shell.
|
|||
Print default yay configuration.
|
||||
|
||||
.TP
|
||||
.B \-g, \-\-config
|
||||
.B \-g, \-\-currentconfig
|
||||
Print current yay configuration.
|
||||
|
||||
.TP
|
||||
|
|
|
@ -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":
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue