mirror of
https://github.com/Jguer/yay
synced 2024-10-05 23:59:13 +00:00
Add upgrademenu to match {clean,diff,edit}menu
This commit is contained in:
parent
d0bc1d70d9
commit
42f0508625
4
cmd.go
4
cmd.go
|
@ -323,6 +323,10 @@ func handleConfig(option, value string) bool {
|
|||
config.PGPFetch = true
|
||||
case "nopgpfetch":
|
||||
config.PGPFetch = false
|
||||
case "upgrademenu":
|
||||
config.UpgradeMenu = true
|
||||
case "noupgrademenu":
|
||||
config.UpgradeMenu = false
|
||||
case "cleanmenu":
|
||||
config.CleanMenu = true
|
||||
case "nocleanmenu":
|
||||
|
|
|
@ -66,6 +66,7 @@ type Configuration struct {
|
|||
Provides bool `json:"provides"`
|
||||
PGPFetch bool `json:"pgpfetch"`
|
||||
ShowDiffs bool `json:"showdifs"`
|
||||
UpgradeMenu bool `json:"upgrademenu"`
|
||||
CleanMenu bool `json:"cleanmenu"`
|
||||
DiffMenu bool `json:"diffmenu"`
|
||||
EditMenu bool `json:"editmenu"`
|
||||
|
@ -173,6 +174,7 @@ func defaultSettings(config *Configuration) {
|
|||
config.AnswerUpgrade = ""
|
||||
config.GitClone = true
|
||||
config.Provides = true
|
||||
config.UpgradeMenu = true
|
||||
config.CleanMenu = true
|
||||
config.DiffMenu = true
|
||||
config.EditMenu = false
|
||||
|
|
|
@ -104,7 +104,7 @@ func install(parser *arguments) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
if len(dp.Aur) == 0 {
|
||||
parser.op = "S"
|
||||
parser.delArg("y", "refresh")
|
||||
|
|
|
@ -343,6 +343,14 @@ func upgradePkgs(aurUp, repoUp upSlice) (stringSet, stringSet, error) {
|
|||
return ignore, aurNames, nil
|
||||
}
|
||||
|
||||
if !config.UpgradeMenu {
|
||||
for _, pkg := range aurUp {
|
||||
aurNames.set(pkg.Name)
|
||||
}
|
||||
|
||||
return ignore, aurNames, nil
|
||||
}
|
||||
|
||||
sort.Sort(repoUp)
|
||||
sort.Sort(aurUp)
|
||||
allUp := append(repoUp, aurUp...)
|
||||
|
|
Loading…
Reference in a new issue