mirror of
https://github.com/Jguer/yay.git
synced 2024-11-06 00:57:21 +01:00
Add --askyesremovemake option (#2199)
Same as --askremovemake option but with "Y" as a default answer.
This commit is contained in:
parent
7dc4fae155
commit
adde043514
1
cmd.go
1
cmd.go
@ -95,6 +95,7 @@ Permanent configuration options:
|
||||
--nodiffmenu Don't show diffs for build files
|
||||
--noeditmenu Don't edit/view PKGBUILDS
|
||||
--askremovemake Ask to remove makedepends after install
|
||||
--askyesremovemake Ask to remove makedepends after install("Y" as default)
|
||||
--removemake Remove makedepends after install
|
||||
--noremovemake Don't remove makedepends after install
|
||||
|
||||
|
@ -75,7 +75,7 @@ _yay() {
|
||||
noansweredit noanswerupgrade cleanmenu diffmenu editmenu cleanafter nocleanafter
|
||||
nocleanmenu nodiffmenu provides noprovides pgpfetch nopgpfetch
|
||||
useask nouseask combinedupgrade nocombinedupgrade aur repo makepkgconf
|
||||
nomakepkgconf askremovemake removemake noremovemake completioninterval aururl aurrpcurl
|
||||
nomakepkgconf askremovemake askyesremovemake removemake noremovemake completioninterval aururl aurrpcurl
|
||||
searchby batchinstall nobatchinstall'
|
||||
'b d h q r v')
|
||||
yays=('clean gendb' 'c')
|
||||
|
@ -220,6 +220,7 @@ complete -c $progname -n "not $noopt" -l nocleanmenu -d 'Do not clean build PKGB
|
||||
complete -c $progname -n "not $noopt" -l nodiffmenu -d 'Do not show diffs for build files' -f
|
||||
complete -c $progname -n "not $noopt" -l noeditmenu -d 'Do not edit/view PKGBUILDS' -f
|
||||
complete -c $progname -n "not $noopt" -l askremovemake -d 'Ask to remove make deps after install' -f
|
||||
complete -c $progname -n "not $noopt" -l askyesremovemake -d 'Ask to remove make deps after install(with "Y" as default)' -f
|
||||
complete -c $progname -n "not $noopt" -l removemake -d 'Remove make deps after install' -f
|
||||
complete -c $progname -n "not $noopt" -l noremovemake -d 'Do not remove make deps after install' -f
|
||||
complete -c $progname -n "not $noopt" -l topdown -d 'Shows repository packages first and then aur' -f
|
||||
|
@ -74,6 +74,7 @@ _pacman_opts_common=(
|
||||
"--nodiffmenu[Don't show diffs for build files]"
|
||||
"--noeditmenu[Don't edit/view PKGBUILDS]"
|
||||
"--askremovemake[Ask to remove makedepends after install]"
|
||||
"--askyesremovemake[Ask to remove makedepends after install(with "Y" as default)]"
|
||||
"--removemake[Remove makedepends after install]"
|
||||
"--noremovemake[Don't remove makedepends after install]"
|
||||
|
||||
|
@ -326,6 +326,10 @@ Do not show the edit menu.
|
||||
.B \-\-askremovemake
|
||||
Ask to remove makedepends after installing packages.
|
||||
|
||||
.TP
|
||||
.B \-\-askyesremovemake
|
||||
Ask to remove makedepends after installing packages(with "Y" as default).
|
||||
|
||||
.TP
|
||||
.B \-\-removemake
|
||||
Remove makedepends after installing packages.
|
||||
|
@ -199,6 +199,8 @@ func (c *Configuration) handleOption(option, value string) bool {
|
||||
c.RemoveMake = "no"
|
||||
case "askremovemake":
|
||||
c.RemoveMake = "ask"
|
||||
case "askyesremovemake":
|
||||
c.RemoveMake = "askyes"
|
||||
case "separatesources":
|
||||
c.SeparateSources = true
|
||||
case "noseparatesources":
|
||||
|
@ -440,6 +440,7 @@ func isArg(arg string) bool {
|
||||
case "removemake":
|
||||
case "noremovemake":
|
||||
case "askremovemake":
|
||||
case "askyesremovemake":
|
||||
case "complete":
|
||||
case "stats":
|
||||
case "news":
|
||||
|
@ -115,7 +115,9 @@ func (preper *Preparer) ShouldCleanMakeDeps(cmdArgs *parser.Arguments) PostInsta
|
||||
case "no":
|
||||
return nil
|
||||
default:
|
||||
if !text.ContinueTask(os.Stdin, gotext.Get("Remove make dependencies after install?"), false, settings.NoConfirm) {
|
||||
isYesDefault := preper.cfg.RemoveMake == "askyes"
|
||||
if !text.ContinueTask(os.Stdin, gotext.Get("Remove make dependencies after install?"),
|
||||
isYesDefault, settings.NoConfirm) {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user