Commit Graph
97 Commits
Author SHA1 Message Date
github-actions[bot]andJo Garnier 45964c4b42 [repo-assist] fix(diff): add --no-pager and package header to git diff (#1243) (#2905)
* fix(diff): add --no-pager and package header to git diff

Previously, each package's diff was shown via a separate `git diff`
invocation with Show(), allowing git to invoke its own pager (e.g. less)
independently for each package. This caused inconsistent pagination:
large diffs opened a pager, small diffs scrolled past in the terminal.

Changes:
- Add --no-pager flag to git diff so git doesn't open its own pager
  per package; all diffs now stream consistently to stdout.
- Print a package name header before each diff so users can easily
  identify which package each diff belongs to when reviewing multiple
  packages.

Closes #1243

* bunch up diffs and render in one go

Co-authored-by: Jo Garnier <me@jguer.space>
2026-07-19 02:23:09 +02:00
Jo 072503e2ec chore(docs): link examples to lua funcs (#2898)
* add doc/lua examples

* full url
2026-07-06 14:58:28 +02:00
Jo 4869306719 feat(search): implement render-hooks for search (#2896)
* add render hooks

* re-render hook per event

* add example with single_line and simplify built rendering

* update docs availability

* remove comments
2026-07-06 14:15:57 +02:00
Prathamesh Mahaleanddanielwerg 80192ab1cb feat(lua): add lua-language-server type stubs for the yay global (#2884)
* feat(lua): add lua-language-server type stubs for the yay global

Ship a meta/yay.meta.lua definition file that declares the `yay` global,
all yay.opt fields, and every autocmd event payload so lua-language-server
users get completion, hover docs, and typo detection without an
"Undefined global `yay`" warning.

- meta/yay.meta.lua: 232-line stub covering opt (45 fields), log, abort,
  create_autocmd with per-event overloads, and 14 payload classes for the
  5 autocmd events (AURPreInstall, AURPostDownload, UpgradeSelect,
  PostInstall, SearchFilter). Return contracts for UpgradeSelect and
  SearchFilter are annotated.
- doc/lua.md: add "Editor support" section with .luarc.json setup.
- doc/init.lua: fix PostInstall example referencing pkg.installed, a
  field that does not exist on PostInstallPackage.
- Makefile: install/uninstall meta/yay.meta.lua to
  $(PREFIX)/share/yay/meta/ so the documented /usr/share/yay/meta path
  exists on installed systems.

Closes #2876

* doc(lua): fix api-since version to v13.0.1

* feat(lua): apply review feedback on type stubs

Type opt fields as string unions with descriptions, rename to yay.d.lua
per LuaLS docs, strip redundant comments from doc/init.lua, bump to v13.0.2.

Tested everything again: go build, go test, lua-language-server, gendocs.

* doc(lua): move "editor support", add hyperlinks

added link to `init.lua` example in "location" paragraph

having "editor support" paragraph at the very bottom of document didn't make any sense. user would want to have lsp editor support right after creating a file in config dir if ever.

removed useless paragraph about `.luarc.json` location that already been explained aboved.

added hyperlinks for luals extensions. couldn't find any special info for helix (unlike jetbrains), but it should be already covered by "other editors"

---------

Co-authored-by: danielwerg <35052399+danielwerg@users.noreply.github.com>
2026-06-24 00:28:28 +02:00
Jo d72402292e feat(lua): allow configuring answer menus and minor fixes to examples (#2880)
allow configuring answer menus and minor fixes to examples
2026-06-19 14:31:43 +02:00
Jo 88c72b32b1 fix(lua): change search paths to resolve lua modules in config dir (#2879)
change search paths to not resolve lua modules in cwd but in the config dir
2026-06-19 12:04:12 +02:00
Jo 9577e22dba doc(lua): fix formatting (#2873)
fix formatting
2026-06-17 22:14:45 +02:00
Jo db55be2626 Update man page version to v13 and sync VS Code settings (#2872)
update man entry
2026-06-17 22:11:39 +02:00
Jo 70d7a0f0a8 fix(lua): Reduce event size of PostInstall and SearchFilter hooks (#2871)
* remove fields from events that might not be needed yet

* reduce event size
2026-06-17 21:40:02 +02:00
Jo 4dbf124c51 feat(lua): add search filter and post install hooks (#2867)
* search filter and post install

add examples

* add tag
2026-06-16 23:35:18 +02:00
Jo 6927555779 fix: propagate Maintainer field through dep graph and upgrade service (#2865)
* fix: propagate Maintainer field through dep graph and upgrade service

Add Maintainer to InstallInfo and propagate it through the dependency
graph (dep_resolve, dep_visual) and UpgradeService. Update docs
generator with TOC support and Lua page builder.

* lint
2026-06-16 12:19:19 +02:00
Jo a70c058875 Fix gendocs index source path (#2863)
fix gendocs index source path
2026-06-16 00:54:25 +02:00
Jo 1ec6f3f793 feat: expose AUR package maintainer to upgrade hooks (#2858)
lint
2026-06-15 22:07:49 +02:00
Jo 16479dcaf3 feat: Add AURPostDownload hook (#2856)
* run hooks after source download

* lint

* nitpick: remove event table indirection
2026-06-15 18:10:41 +02:00
Jo 421b65bf43 feat: Add UpgradeSelect hook, logging and security example (#2855)
* add upgrade hook structure

* remove extra field

* feat: Add UpgradeSelect hook logging and security example

Add yay.log API to UpgradeSelect hooks for informational and warning messages.

- Add yay.log.info() and yay.log.warn() for hook logging
- Add doc/examples/recently_modified.lua: practical example to pre-exclude
  recently-modified AUR packages (supply chain attack mitigation)
- Update doc/init.lua with improved UpgradeSelect example
- Update doc/lua.md with logging API documentation
- Refactor autocmd and load modules for cleaner log integration
- Add comprehensive unit tests for logging functionality

* lint
2026-06-15 15:25:40 +02:00
Jo 1501438fba AUR: Add AURPreInstall hooks (#2854)
* add lua hooks on aur package installs

* add abort command to differentiate errors and aborts

* u
2026-06-15 13:31:13 +02:00
Jo ecae3e601e Add Lua configuration support (#2845)
* lua opt trial

* go mod tidy
2026-06-09 00:31:26 +02:00
Jo 90ae08862a Remove timeupdate option (#2796)
* disable provides by default

* remove time update due to low usage
2026-03-18 23:01:14 +01:00
Joey Holtzman 733e6a6b17 Add support for all sortyby options (#2747)
* Add all sortyby options

Previously, only 'name' was a supported sortby option. Now, all sortby
options are supported.

Whenever there is a tie, the metric is used as a tiebreaker (it is also
the default when sortby is not specified). The only behavior that
changed is that packages with the same metric are sorted oppositely when
sorting bottomUp. This was actually a bug in the previous implementation
which inverts the `cmpResult` for bottomUp which returns true if the
metrics are the same. According to the docs for Less
(https://pkg.go.dev/sort#Interface), Less(i, i) should be false (the
same element cannot sort before itself).

I mainly structured the code for efficiency by creating the sortby
function once rather than checking `separateSources` and `bottomUp`
every comparison, but I also think this improves readability compared to
having a switch-case in the comparison function.

* Fix separating sources on ties and improve test coverage

* Remove 'id' and 'baseid' in sortby options
2026-01-22 09:26:35 +01:00
Jo 15c0597562 Build: Build without install with -B . (#2684)
* remove deprecated --tar flag and add --gitflags

Built without installing with -B

fix git tests gitBin

align with next

* fix order of ops
2025-12-22 15:22:10 +01:00
Rodrigo Barrios 13df7e79eb Document -Ycc in manpage (#2482)
Signed-off-by: r.b4rr10s <rodrigoedu11@gmail.com>
2024-09-19 14:14:16 +02:00
Daniel Ohandjguer 836fc5922a add short option for --repo (#2380)
* add short option for --repo

* run pre-commit

* update man page

* add fish completion

* add a N options

* add long options

---------

Co-authored-by: jguer <me@jguer.space>
2024-06-28 16:40:35 +02:00
Joey Holtzman d02c45e5b6 Remove deprecated flags in favor of boolean flags (#2350) 2024-01-25 16:03:47 +01:00
Joey Holtzman d368f99be0 feat(yay): add boolean flags (#2285)
* feat(yay): add boolean flags

This feature now allows users to specify --<option>=<bool value> instead
of using --<option> and --no<option>. Specifying nothing results in the
boolean value being true. The flags prefixed with `no` are deprecated.

* chore(args): Print warning when using deprecated flags

* chore(yay): Update man page for deprecated options and add examples of
boolean flags being used
2023-09-27 12:36:57 +02:00
Joey Holtzmanandjguer 04c76a404e feat(install): add --keepsrc to keep pkg/ and src/ directories (#2272)
* feat(install): add --nocleanbuild to keep pkg/ and src/ directories for
AUR packages

Providing this flag during installation of AUR packages allows for keeping
the src/ and pkg/ directories produced my makepkg. If the user wants to
delete the directories, they can either select to cleanBuild in the
cleanmenu or run the installation without the --nocleanbuild flag (yay
will only remove the directories if the package is rebuilt)

* fix(completion): simplify description for --nocleanbuild in fish

This makes the description consistent with the descriptions in the
man page, --help, and zsh completion.

* refactor(install): Rename --nocleanbuild to --keepsrc

This naming scheme is more familiar to users since it is the name of the
flag in Paru.

---------

Co-authored-by: jguer <me@jguer.space>
2023-09-18 09:21:42 +02:00
smolx adde043514 Add --askyesremovemake option (#2199)
Same as --askremovemake option but with "Y" as a default answer.
2023-06-11 16:13:01 +00:00
Jo e28319fece chore(yay): lift legacy engine (#2189)
* remove legacy engine

* remove legacy dep handlers

* use prepare for gendb

* remove unused method

* remove aur client old interface

* remove unused menu fns

* remove inactive upgrademenu option

* unexport printInfo
2023-05-24 08:22:18 +00:00
Jo b51c10ca3e doc(yay): specify search narrowing in man (#2145)
specify search narrowing in man
2023-05-01 12:33:19 +00:00
Jo 511b95769e docs(yay): correct order of editor var evaluation (#2104)
correct documentation on order of editor preference. Use logger for editfn
2023-04-10 15:46:46 +00:00
Jo a64180464b chore(man): fix wording on operation order to make it more clear (#2088)
fix wording on operation order to make it more clear
2023-04-06 16:49:18 +00:00
Jo c744058b20 Update manual page and remove deprecate/removed options (#1951)
* add new options and remove deprecated

* add new -Bi
2023-03-08 13:07:15 +00:00
Jo f372494d74 feat(search): add new bys and misc fixes (#1870)
* use default bin entry of gpg

* fix(dep): fix displayed information in chosen provide

* add new rpc bys to searchby

* man document
2022-12-30 19:02:32 +00:00
moson-mo 647d160182 add option/setting "AurRpcUrl" (#1809)
Signed-off-by: moson-mo <mo-son@mailbox.org>
2022-09-18 00:05:27 +00:00
Mudskipper875 cd4462761a Fix environment variable name in man-page (#1806) 2022-09-07 18:08:15 +02:00
Jordan CannonandJo b6b1888e89 Remove duplicate line from man page (#1792)
Co-authored-by: Jo <me@jguer.space>
2022-08-16 09:08:51 +02:00
Jguer 0fdfe79943 Add experimental vote util to yay (#1765)
* feat(vote): add vote utility

* update deps

* add vote and unvote capabilities

* use -W for web ops

* add fish completions

* add bash completion

* add zsh completion

* add md instructions
2022-06-17 16:55:22 +00:00
cubercsl ed2f533534 docs: remove tuna aur config for China users (#1747)
Tuna has removed the aur proxy service since 01Mar:
- https://mirrors.tuna.tsinghua.edu.cn/news/remove-aur/
- tuna/issues#1424
2022-05-03 22:15:17 +02:00
J Guerreiro e4a1f018ea feat(search): Add fuzzy name matching and mixed sources (#1719)
* fix(alpm): fix callback text

* feat(yay): Add mixed search result

* remove old result structs

* add option for controlling query builder

* only set query builder after parsing args

* add parser args

* update manpage

* write test for results

* write test for results

* mixed source test

* only sort 1 time with every mode
2022-03-06 23:48:15 +00:00
Matt Alexander 22c165a11f feat(search): add optional setting that formats each search result on a single line, Part II 2021-11-05 09:26:34 +01:00
Matt Alexander 673f077e7f feat(search): add optional setting that formats each search result on a single line 2021-11-05 09:26:34 +01:00
jguer ba1e06d367 feat(cmd): remove unused absdir option 2021-09-08 22:25:55 +02:00
Peter Wu 827adab4b8 Update yay.8 2021-07-31 16:47:16 +02:00
jguer fd9e2638f9 fix(yay): fix completions of -Gp 2021-01-31 19:07:08 +01:00
nycex d9b440c929 implement yay -Pp option
fix linting errors

format with make fmt

fix completions

resolve most of the requested changes

move loop over dbSlice back into makeRequest

query aur in chunks of 20

check for status codes

continue instead of return in for loop

format code
2021-01-31 19:07:08 +01:00
morganamilo 952e801ed1 Update email 2020-12-06 15:16:31 +01:00
Dương Đỗ Minh Châu c6a17d02f4 Fix typos in man page 2020-02-25 22:52:15 +01:00
morganamilo f2959922a7 Remove tar support
tar is slower and harder to diff. I doubt any one still uses it intentially.

There's a chance some people have not cleared their cache in two years
and still have tar based packages around. But forcing them to clear
their cache is not a big deal at all.
2019-11-11 02:57:14 +00:00
Pierre-Alain TORET 6dd65a2df2 Add SudoBin and SudoFlags 2019-10-28 18:35:36 +00:00
Jguer 211b96867c Bump version for release. 9.4.0 2019-10-21 16:50:17 +01:00
morganamilo 3baf2e1ff1 Update documentation 2019-10-21 15:30:04 +01:00