mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
feat(nix): add shell completion
This commit is contained in:
parent
283f9377f2
commit
9e51c14927
1 changed files with 6 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
, lib
|
||||
|
||||
, makeWrapper
|
||||
, installShellFiles
|
||||
, stdenv
|
||||
, darwin
|
||||
|
||||
|
|
@ -34,7 +35,7 @@ rustPlatform.buildRustPackage {
|
|||
|
||||
cargoLock.lockFile = ../Cargo.lock;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
||||
buildInputs = lib.optionals stdenv.isDarwin (
|
||||
with darwin.apple_sdk.frameworks; [ Foundation ]
|
||||
);
|
||||
|
|
@ -55,6 +56,10 @@ rustPlatform.buildRustPackage {
|
|||
''
|
||||
wrapProgram $out/bin/yazi \
|
||||
--prefix PATH : "${makeBinPath runtimePaths}"
|
||||
installShellCompletion --cmd yazi \
|
||||
--bash ./config/completions/yazi.bash \
|
||||
--fish ./config/completions/yazi.fish \
|
||||
--zsh ./config/completions/_yazi
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue