Skip to content

Commit

Permalink
rage: Fix Debian installation paths for fish and Zsh completions
Browse files Browse the repository at this point in the history
  • Loading branch information
str4d committed Jan 20, 2024
1 parent 5f7d447 commit 048d2b3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
2 changes: 2 additions & 0 deletions rage/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ to 1.0.0 are beta releases.
- `rage-keygen` now prints fatal errors directly instead of them being hidden
behind the `RUST_LOG=error` environment variable. It also now sets its return
code appropriately instead of always returning 0.
- The Debian package now uses the correct installation paths for fish and Zsh
completions.

## [0.9.2] - 2023-06-12
### Changed
Expand Down
31 changes: 25 additions & 6 deletions rage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,31 @@ assets = [
["target/release/completions/rage.bash", "usr/share/bash-completion/completions/rage", "644"],
["target/release/completions/rage-keygen.bash", "usr/share/bash-completion/completions/rage-keygen", "644"],
["target/release/completions/rage-mount.bash", "usr/share/bash-completion/completions/rage-mount", "644"],
["target/release/completions/rage.fish", "usr/share/fish/completions/", "644"],
["target/release/completions/rage-keygen.fish", "usr/share/fish/completions/", "644"],
["target/release/completions/rage-mount.fish", "usr/share/fish/completions/", "644"],
["target/release/completions/_rage", "usr/share/zsh/functions/Completion/Debian/", "644"],
["target/release/completions/_rage-keygen", "usr/share/zsh/functions/Completion/Debian/", "644"],
["target/release/completions/_rage-mount", "usr/share/zsh/functions/Completion/Debian/", "644"],

# From https://fishshell.com/docs/current/completions.html#where-to-put-completions:
# > By default, Fish searches the following for completions, using the first available
# > file that it finds:
# > [..]
# > - A directory for third-party software vendors to ship their own completions for
# > their software, usually `/usr/share/fish/vendor_completions.d`;
# > [..]
# > If you are developing another program and would like to ship completions with your
# > program, install them to the “vendor” completions directory. As this path may vary
# > from system to system, the `pkgconfig` framework should be used to discover this
# > path with the output of `pkg-config --variable completionsdir fish`.
["target/release/completions/rage.fish", "usr/share/fish/vendor_completions.d/", "644"],
["target/release/completions/rage-keygen.fish", "usr/share/fish/vendor_completions.d/", "644"],
["target/release/completions/rage-mount.fish", "usr/share/fish/vendor_completions.d/", "644"],

# The best reference I can find for the Zsh completions path is
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921236#17 from February 2019:
# > As a rule, completion functions (first line is "#compdef") should be
# > installed to /usr/share/zsh/vendor-completions and autoloadable
# > functions (first line is "#autoload") to /usr/share/zsh/vendor-functions;
# > both of these paths are Debian-specific.
["target/release/completions/_rage", "usr/share/zsh/vendor-completions/", "644"],
["target/release/completions/_rage-keygen", "usr/share/zsh/vendor-completions/", "644"],
["target/release/completions/_rage-mount", "usr/share/zsh/vendor-completions/", "644"],

# From the default `/etc/manpath.config` created by the `man-db` package:
# > MANPATH_MAP /usr/bin /usr/share/man
Expand Down

0 comments on commit 048d2b3

Please sign in to comment.