1
0
mirror of https://github.com/Jguer/yay synced 2024-07-01 07:56:37 +00:00

Compare commits

...

8 Commits

Author SHA1 Message Date
Daniel Oh
18cfe5e35c
Merge b3f36d4a6f into 5149e3714d 2024-06-22 00:17:14 +10:00
Jo
5149e3714d
fix(query): match empty pacman -Si with AUR info (#2459) 2024-06-21 10:06:02 +02:00
jguer
b3f36d4a6f
add long options 2024-05-13 09:27:12 +02:00
jguer
c965cdc57e
add a N options 2024-05-13 09:25:38 +02:00
Daniel Oh
5ba2f3f347 add fish completion 2024-05-04 22:55:23 -05:00
Daniel Oh
43f368794e update man page 2024-05-02 21:48:35 -05:00
Daniel Oh
6f6db1dab2 run pre-commit 2024-02-23 04:54:08 -06:00
Daniel Oh
c2ed16c513 add short option for --repo 2024-02-23 04:42:51 -06:00
8 changed files with 13 additions and 9 deletions

2
cmd.go
View File

@ -54,7 +54,7 @@ If no operation is specified 'yay -Syu' will be performed
If no operation is specified and targets are provided -Y will be assumed
New options:
--repo Assume targets are from the repositories
-N --repo Assume targets are from the repositories
-a --aur Assume targets are from the AUR
Permanent configuration options:

View File

@ -61,8 +61,8 @@ _yay() {
search unrequired upgrades' 'c e g i k l m n o p s t u')
remove=('cascade dbonly nodeps assume-installed nosave print recursive unneeded' 'c n p s u')
sync=('asdeps asexplicit clean dbonly downloadonly overwrite groups ignore ignoregroup
info list needed nodeps assume-installed print refresh recursive search sysupgrade'
'c g i l p s u w y')
info list needed nodeps assume-installed print refresh recursive search sysupgrade aur repo'
'c g i l p s u w y a N')
upgrade=('asdeps asexplicit overwrite needed nodeps assume-installed print recursive' 'p')
core=('database files help query remove sync upgrade version' 'D F Q R S U V h')

View File

@ -165,7 +165,7 @@ complete -c $progname -n "$webspecific" -s u -l unvote -d 'Unvote for AUR packag
complete -c $progname -n "$webspecific" -xa "$listall"
# New options
complete -c $progname -n "not $noopt" -l repo -d 'Assume targets are from the AUR' -f
complete -c $progname -n "not $noopt" -s N -l repo -d 'Assume targets are from the AUR' -f
complete -c $progname -n "not $noopt" -s a -l aur -d 'Assume targets are from the repositories' -f
# Yay options

View File

@ -23,7 +23,7 @@ _pacman_opts_commands=(
# options for passing to _arguments: options common to all commands
_pacman_opts_common=(
'--repo[Assume targets are from the repositories]'
{-N,--repo}'[Assume targets are from the repositories]'
{-a,--aur}'[Assume targets are from the AUR]'
'--aururl[Set an alternative AUR URL]:url'
'--aurrpcurl[Set an alternative URL for the AUR /rpc endpoint]:url'

View File

@ -63,7 +63,7 @@ Yay will also remove cached data about devel packages.
.SH NEW OPTIONS
.TP
.B \-\-repo
.B \-N, \-\-repo
Assume all targets are from the repositories. Additionally Actions such as
sysupgrade will only act on repository packages.

View File

@ -169,7 +169,7 @@ func (c *Configuration) handleOption(option, value string) bool {
c.CombinedUpgrade = boolValue
case "a", "aur":
c.Mode = parser.ModeAUR
case "repo":
case "N", "repo":
c.Mode = parser.ModeRepo
case "removemake":
c.RemoveMake = "yes"

View File

@ -425,7 +425,7 @@ func isArg(arg string) bool {
case "useask":
case "combinedupgrade":
case "a", "aur":
case "repo":
case "N", "repo":
case "removemake":
case "noremovemake":
case "askremovemake":

View File

@ -45,6 +45,10 @@ func syncInfo(ctx context.Context, run *runtime.Runtime,
pkgS = query.RemoveInvalidTargets(run.Logger, pkgS, run.Cfg.Mode)
aurS, repoS := packageSlices(pkgS, run.Cfg, dbExecutor)
if len(repoS) == 0 && len(aurS) == 0 {
aurS = dbExecutor.InstalledRemotePackageNames()
}
if len(aurS) != 0 {
noDB := make([]string, 0, len(aurS))
@ -64,7 +68,7 @@ func syncInfo(ctx context.Context, run *runtime.Runtime,
}
}
if len(repoS) != 0 {
if len(repoS) != 0 || (len(aurS) == 0 && len(repoS) == 0) {
arguments := cmdArgs.Copy()
arguments.ClearTargets()
arguments.AddTarget(repoS...)