feat(installers): install shell completions and man pages (bat, fd, lsd, rg, watchexec, zoxide)

Install bash/fish/zsh completions from release archive into
pkg_src_dir/share/, and man pages into pkg_src_dir/share/man/man1/.
This commit is contained in:
AJ ONeal
2026-05-14 15:26:50 -06:00
parent 9f28505af7
commit b209bfe46f
10 changed files with 138 additions and 1 deletions
+16
View File
@@ -25,6 +25,22 @@ __init_lsd() {
# mv ./lsd-*/lsd ~/.local/opt/lsd-v0.17.0/bin/lsd
mv ./lsd-*/lsd "$pkg_src_cmd"
# install completions if present (autocomplete/{_lsd,lsd.fish,lsd.bash-completion})
if test -d ./lsd-*/autocomplete; then
mkdir -p "$pkg_src_dir/share/bash-completion/completions"
mkdir -p "$pkg_src_dir/share/fish/vendor_completions.d"
mkdir -p "$pkg_src_dir/share/zsh/site-functions"
mv ./lsd-*/autocomplete/lsd.bash-completion "$pkg_src_dir/share/bash-completion/completions/lsd" 2>/dev/null || true
mv ./lsd-*/autocomplete/lsd.fish "$pkg_src_dir/share/fish/vendor_completions.d/lsd.fish" 2>/dev/null || true
mv ./lsd-*/autocomplete/_lsd "$pkg_src_dir/share/zsh/site-functions/_lsd" 2>/dev/null || true
fi
# install man page if present
if test -f ./lsd-*/lsd.1; then
mkdir -p "$pkg_src_dir/share/man/man1"
mv ./lsd-*/lsd.1 "$pkg_src_dir/share/man/man1/lsd.1"
fi
}
# pkg_get_current_version is recommended, but (soon) not required