From d3dfd2223ea6d9bfb92951ba41ea4df30d5d035b Mon Sep 17 00:00:00 2001 From: renner <80410025+renner0e@users.noreply.github.com> Date: Sat, 1 Aug 2026 05:44:56 +0200 Subject: [PATCH] fix: ujust shell completions (#248) Final solution for the new just completion engine ended up being; For `bash` we have to change the script to set `JUST_JUSTFILE` while having an autocomplete script where `just` is substituted to `ujust`. This was based on feedback from Casey in https://github.com/casey/just/discussions/3683#discussioncomment-17804984 For `fish` the only method i found to get the completions working properly was to alias `ujust` to `just --justfile "/usr/share/ublue-os/justfile"` now for zsh i had to write a custom compdef that hardcodes in `--justfile "/usr/share/ublue-os/justfile"` and passes it to the completion definitions for `just`, i do not want to go into how long i spent on this stupid compdef... Hikari's words, he figured everything out here. Thanks. It's an exact clone of https://github.com/ublue-os/packages/pull/1319. resolves: https://github.com/get-aurora-dev/common/issues/220 Co-authored-by: HikariKnight <2557889+HikariKnight@users.noreply.github.com> --- Containerfile | 6 ++---- system_files/shared/usr/bin/ujust | 4 ++-- .../shared/usr/share/fish/vendor_conf.d/ujust.fish | 1 + .../shared/usr/share/zsh/site-functions/_ujust | 12 ++++++++++++ 4 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 system_files/shared/usr/share/fish/vendor_conf.d/ujust.fish create mode 100644 system_files/shared/usr/share/zsh/site-functions/_ujust diff --git a/Containerfile b/Containerfile index 85c4d10..d356d27 100644 --- a/Containerfile +++ b/Containerfile @@ -99,10 +99,8 @@ EOF RUN < /out/system_files/shared/usr/share/bash-completion/completions/ujust -just --completions zsh | sed -E 's/([\(_" ])just/\1ujust/g' > /out/system_files/shared/usr/share/zsh/site-functions/_ujust -just --completions fish | sed -E 's/([\(_" ])just/\1ujust/g' > /out/system_files/shared/usr/share/fish/vendor_completions.d/ujust.fish +install -d /out/system_files/shared/usr/share/bash-completion/completions +JUST_COMPLETE=bash just | sed -E 's/just/ujust/g' > /out/system_files/shared/usr/share/bash-completion/completions/ujust EOF RUN <