Skip to content

Commit

Permalink
rage: Install Elvish completions in Debian package
Browse files Browse the repository at this point in the history
These are not automatically discovered, but installing the files means
that Elvish users can import them.
  • Loading branch information
str4d committed Jan 20, 2024
1 parent 048d2b3 commit 857f2ec
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rage/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ to 1.0.0 are beta releases.
## [Unreleased]
### Added
- `rage-keygen -y IDENTITY_FILE` to convert identity files to recipients.
- Elvish completions to the Debian package. These are not automatically
discovered; Elvish users will need to manually import them.

### Changed
- MSRV is now 1.65.0.
Expand Down
18 changes: 18 additions & 0 deletions rage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,24 @@ assets = [
["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"],

# From https://github.com/elves/elvish/issues/1564#issuecomment-1166333636:
# > Completion files can be installed like other modules into a global module search
# > directory ([..]). There is no automatic discovery of completion files though; the
# > user would have to import them manually with `use`.
#
# From https://elv.sh/ref/command.html#module-search-directories:
# > When importing modules, Elvish searches the following directories:
# > [..]
# > 3. If the XDG_DATA_DIRS environment variable is defined and non-empty, it is
# > treated as a colon-delimited list of paths (semicolon-delimited on Windows),
# > which are all searched.
# >
# > Otherwise, `/usr/local/share/elvish/lib` and `/usr/share/elvish/lib` are
# > searched on non-Windows OSes.
["target/release/completions/rage.elv", "usr/share/elvish/lib/", "644"],
["target/release/completions/rage-keygen.elv", "usr/share/elvish/lib/", "644"],
["target/release/completions/rage-mount.elv", "usr/share/elvish/lib/", "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:
Expand Down

0 comments on commit 857f2ec

Please sign in to comment.