diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 89016d31..b4bd6dc2 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -13,7 +13,7 @@ RUN set -eux; \ sed -i 's/^#\?DownloadUser.*/#DownloadUser = alpm/' /etc/pacman.conf || true; \ pacman -Syu --noconfirm --needed \ pacman-contrib zsh git-delta openssh bat go github-cli ripgrep \ - archlinux-keyring git gcc make sudo asciidoc doxygen meson curl; \ + archlinux-keyring git gcc make sudo asciidoc doxygen meson curl nodejs npm; \ curl -sSfL https://golangci-lint.run/install.sh | sh -s v2.12.2; \ go mod download; \ rm -rf /var/lib/pacman/sync/* /var/cache/pacman/* /tmp/* /var/tmp/*; \ @@ -27,7 +27,7 @@ USER docker RUN go install github.com/leonelquinteros/gotext/cli/xgotext@latest \ && go install golang.org/x/tools/gopls@latest -ENV PATH="/app/bin:/home/docker/go/bin:$PATH" +ENV PATH="/app/bin:/home/docker/go/bin:/home/docker/.local/bin:$PATH" WORKDIR /workspace diff --git a/doc/lua.md b/doc/lua.md index 55ace93a..fc667fc7 100644 --- a/doc/lua.md +++ b/doc/lua.md @@ -176,6 +176,11 @@ lists are unioned. If any hook returns `skip_menu = true`, yay applies all hook exclusions and skips the native menu. With `skip_menu = false` or no return value, hook exclusions are applied first and then the native menu is shown. +More examples: [`doc/examples/recently_modified.lua`](https://github.com/Jguer/yay/blob/next/doc/examples/recently_modified.lua) +(pre-exclude recently modified AUR upgrades) and +[`doc/examples/maintainer_change.lua`](https://github.com/Jguer/yay/blob/next/doc/examples/maintainer_change.lua) (warn on +AUR maintainer changes). + Returned exclusions must name packages from `event.data.upgrades`. Unknown names are treated as hook errors so typos do not silently upgrade the wrong package. Pulled dependencies are visible in `event.data.pulled_dependencies`, @@ -414,6 +419,9 @@ sources, all topo layers). Transitive repo dependencies pulled in by pacman but not explicitly tracked by yay are **not** included. The callback is fire-and-forget: no return value is read. +More examples: [`doc/examples/install_log.lua`](https://github.com/Jguer/yay/blob/next/doc/examples/install_log.lua) +(append every installed/upgraded package to a persistent log file). + ### Example ```lua @@ -467,6 +475,9 @@ the **unfiltered** results are shown rather than aborting the command. The callback must return `nil` or an array of `{source=, name=}` tables. Every `(source, name)` pair must exist in the input; unknown pairs are an error. +More examples: [`doc/examples/hide_first_submitted.lua`](https://github.com/Jguer/yay/blob/next/doc/examples/hide_first_submitted.lua) +(hide AUR packages submitted in the last 14 days). + ### Example ```lua @@ -502,6 +513,10 @@ Multiple hooks of the same event **run in registration order**; the **last** hook that returns a non-`nil` string wins. A later hook returning `nil` does not undo an earlier hook's string. +More examples: [`doc/examples/single_line.lua`](https://github.com/Jguer/yay/blob/next/doc/examples/single_line.lua) +(reproduces `yay.opt.single_line_results` with colored, single-line AUR and +sync results). + ### RenderAUR event

Available from yay v13.1.0