Repository: eza-community/eza (language: rust)

Issue:
feat: add completion files to deb package
Hello,

It seems that deb packages don't contain any completion file. I have looked at all the packages that were downloadable on the repo, it doesn't seem like a recent issue, they have never been there.

I'm not a Rust dev at all, so I don't know how it should work, but the configuration section in the Cargo.toml file seems right to me. Or at least it's exactly how it was in exa. So maybe things changed in the packaging tool?


Discussion / hints:
Yeah, you're totally right ... they were never there because I forgot to add them :D ... my bad, I'll fix this!
If it's helpful this is how it's done in `nixpkgs`, ofc you don't have access to stuff like `installManPage`, but thought it might inspire how this could be done.

https://github.com/NixOS/nixpkgs/blob/3a2786eea085f040a66ecde1bc3ddc7099f6dbeb/pkgs/tools/misc/eza/default.nix#L37C2-L46C6

Fix patch:
diff --git a/completions/fish/eza.fish b/completions/fish/eza.fish
old mode 100755
new mode 100644
diff --git a/devtools/deb-package.sh b/devtools/deb-package.sh
index d67fef6f5..99b5fb9b4 100755
--- a/devtools/deb-package.sh
+++ b/devtools/deb-package.sh
@@ -47,6 +47,9 @@ for ARCH in "${!TARGETS[@]}"; do
     mkdir -p "${DEB_TMP_DIR}${DOCDIR}/man5"
     mkdir -p "${DEB_TMP_DIR}/DEBIAN"
     mkdir -p "${DEB_TMP_DIR}/usr/share/doc/${NAME}"
+    mkdir -p "${DEB_TMP_DIR}/usr/share/bash-completion/completions/"
+    mkdir -p "${DEB_TMP_DIR}/usr/share/fish/vendor_completions.d/"
+    mkdir -p "${DEB_TMP_DIR}/usr/share/zsh/vendor-completions/"
     chmod 755 -R "${DEB_TMP_DIR}"
 
     echo " -> extract executable"
@@ -60,6 +63,11 @@ for ARCH in "${!TARGETS[@]}"; do
     gzip -cn9 target/man/eza_colors-explanation.5 > "${DEB_TMP_DIR}${DOCDIR}man5/eza_colors-explanation.5.gz"
     chmod 644 "${DEB_TMP_DIR}${DOCDIR}"/**/*.gz
 
+    echo " -> copy completions"
+    cp completions/bash/eza "${DEB_TMP_DIR}/usr/share/bash-completion/completions/"
+    cp completions/fish/eza.fish "${DEB_TMP_DIR}/usr/share/fish/vendor_completions.d/"
+    cp completions/zsh/_eza "${DEB_TMP_DIR}/usr/share/zsh/vendor-completions/"
+
     echo " -> create control file"
     touch "${DEB_TMP_DIR}/DEBIAN/control"
     cat > "${DEB_TMP_DIR}/DEBIAN/control" <<EOM


Test patch: