feat(just): Add tab completion to ujust ...
@bsherman does this look right?
https://github.com/ublue-os/config/commit/d0522240cb5e4488d3a0b01d0478f7372fe46b69
https://github.com/ublue-os/config/commit/d0522240cb5e4488d3a0b01d0478f7372fe46b69
%build scriptlet... everything that happens there, if you want it to be in the RPM, needs to end up in the buildroot,s/just/ujust/g chattr -i / on it and then just do the symlink normal to testbash-completion/completions/just not add a new file?s/just/ujust/g so i can programmatically do that and pipe the output to the file ujust-completion file to the config repo , as provided by @M2 and make sure it gets included in the RPMjust completion when called as ujust so there's not a need to do morejust completion file... just but it can certainly: so i can programmatically do that and pipe the output to the files/just/ujust/g
just --completions bashbuild.sh, we could install just into the build container, then you can sed 's/just/ujust/g' /usr/share/bash-completion/completions/just > /tmp/ublue-os/rpmbuild/SOURCES/ujust-completion instead of the cp%post stuff in RPM also, so that's another option, though we'd need to ensure that ublue-os-just requires that just is installed firstjust in our %post_just() {
local i cur prev opts cmds
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
cmd=""
opts=""
for i in ${COMP_WORDS[@]}
do
case "${i}" in
"$1")
cmd="just"
;;
*)
;;
esac
done
case "${cmd}" in
just)sed 's/just/ujust/g' /usr/share/bash-completion/completions/just > /tmp/ublue-os/rpmbuild/SOURCES/ujust-completion