mirror of
https://github.com/Jguer/yay.git
synced 2025-10-20 00:05:31 -04: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
|
--nodiffmenu Don't show diffs for build files
|
||||||
--noeditmenu Don't edit/view PKGBUILDS
|
--noeditmenu Don't edit/view PKGBUILDS
|
||||||
--askremovemake Ask to remove makedepends after install
|
--askremovemake Ask to remove makedepends after install
|
||||||
|
--askyesremovemake Ask to remove makedepends after install("Y" as default)
|
||||||
--removemake Remove makedepends after install
|
--removemake Remove makedepends after install
|
||||||
--noremovemake Don't remove makedepends after install
|
--noremovemake Don't remove makedepends after install
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ _yay() {
|
|||||||
noansweredit noanswerupgrade cleanmenu diffmenu editmenu cleanafter nocleanafter
|
noansweredit noanswerupgrade cleanmenu diffmenu editmenu cleanafter nocleanafter
|
||||||
nocleanmenu nodiffmenu provides noprovides pgpfetch nopgpfetch
|
nocleanmenu nodiffmenu provides noprovides pgpfetch nopgpfetch
|
||||||
useask nouseask combinedupgrade nocombinedupgrade aur repo makepkgconf
|
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'
|
searchby batchinstall nobatchinstall'
|
||||||
'b d h q r v')
|
'b d h q r v')
|
||||||
yays=('clean gendb' 'c')
|
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 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 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 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 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 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
|
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]"
|
"--nodiffmenu[Don't show diffs for build files]"
|
||||||
"--noeditmenu[Don't edit/view PKGBUILDS]"
|
"--noeditmenu[Don't edit/view PKGBUILDS]"
|
||||||
"--askremovemake[Ask to remove makedepends after install]"
|
"--askremovemake[Ask to remove makedepends after install]"
|
||||||
|
"--askyesremovemake[Ask to remove makedepends after install(with "Y" as default)]"
|
||||||
"--removemake[Remove makedepends after install]"
|
"--removemake[Remove makedepends after install]"
|
||||||
"--noremovemake[Don't remove makedepends after install]"
|
"--noremovemake[Don't remove makedepends after install]"
|
||||||
|
|
||||||
|
@ -326,6 +326,10 @@ Do not show the edit menu.
|
|||||||
.B \-\-askremovemake
|
.B \-\-askremovemake
|
||||||
Ask to remove makedepends after installing packages.
|
Ask to remove makedepends after installing packages.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B \-\-askyesremovemake
|
||||||
|
Ask to remove makedepends after installing packages(with "Y" as default).
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-\-removemake
|
.B \-\-removemake
|
||||||
Remove makedepends after installing packages.
|
Remove makedepends after installing packages.
|
||||||
|
@ -199,6 +199,8 @@ func (c *Configuration) handleOption(option, value string) bool {
|
|||||||
c.RemoveMake = "no"
|
c.RemoveMake = "no"
|
||||||
case "askremovemake":
|
case "askremovemake":
|
||||||
c.RemoveMake = "ask"
|
c.RemoveMake = "ask"
|
||||||
|
case "askyesremovemake":
|
||||||
|
c.RemoveMake = "askyes"
|
||||||
case "separatesources":
|
case "separatesources":
|
||||||
c.SeparateSources = true
|
c.SeparateSources = true
|
||||||
case "noseparatesources":
|
case "noseparatesources":
|
||||||
|
@ -440,6 +440,7 @@ func isArg(arg string) bool {
|
|||||||
case "removemake":
|
case "removemake":
|
||||||
case "noremovemake":
|
case "noremovemake":
|
||||||
case "askremovemake":
|
case "askremovemake":
|
||||||
|
case "askyesremovemake":
|
||||||
case "complete":
|
case "complete":
|
||||||
case "stats":
|
case "stats":
|
||||||
case "news":
|
case "news":
|
||||||
|
@ -115,7 +115,9 @@ func (preper *Preparer) ShouldCleanMakeDeps(cmdArgs *parser.Arguments) PostInsta
|
|||||||
case "no":
|
case "no":
|
||||||
return nil
|
return nil
|
||||||
default:
|
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
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user