this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(nix): install shell completions and document usage

+38
+24
README.md
··· 34 34 35 35 A fully static musl-linked binary is also available for Linux: `nix build github:arcuru/cmprss#cmprss-static` 36 36 37 + ### Shell Completions 38 + 39 + The Nix package installs Bash, Fish, and Zsh completions automatically. 40 + 41 + For other installations, add the matching snippet to your shell profile. Supported shells: `bash`, `elvish`, `fish`, `powershell`, `zsh`. 42 + 43 + Bash (`~/.bashrc`): 44 + 45 + ```bash 46 + source <(cmprss completions bash) 47 + ``` 48 + 49 + Zsh (`~/.zshrc`): 50 + 51 + ```bash 52 + source <(cmprss completions zsh) 53 + ``` 54 + 55 + Fish (`~/.config/fish/config.fish`): 56 + 57 + ```fish 58 + cmprss completions fish | source 59 + ``` 60 + 37 61 ## Usage 38 62 39 63 The primary goal is to infer behavior based on the input, so that you don't need to remember esoteric CLI arguments.
+14
flake.nix
··· 82 82 // { 83 83 doCheck = false; # Tests are run as a separate build with nextest 84 84 meta.mainProgram = "cmprss"; 85 + nativeBuildInputs = commonArgs.nativeBuildInputs ++ [pkgs.installShellFiles]; 86 + postInstall = pkgs.lib.optionalString (pkgs.stdenv.buildPlatform.canExecute pkgs.stdenv.hostPlatform) '' 87 + installShellCompletion --cmd cmprss \ 88 + --bash <($out/bin/cmprss completions bash) \ 89 + --fish <($out/bin/cmprss completions fish) \ 90 + --zsh <($out/bin/cmprss completions zsh) 91 + ''; 85 92 }); 86 93 87 94 # Fully static musl build (Linux only) ··· 122 129 cargoArtifacts = cargoArtifactsStatic; 123 130 doCheck = false; 124 131 meta.mainProgram = "cmprss"; 132 + nativeBuildInputs = staticArgs.nativeBuildInputs ++ [pkgs.installShellFiles]; 133 + postInstall = pkgs.lib.optionalString (pkgs.stdenv.buildPlatform.canExecute pkgs.stdenv.hostPlatform) '' 134 + installShellCompletion --cmd cmprss \ 135 + --bash <($out/bin/cmprss completions bash) \ 136 + --fish <($out/bin/cmprss completions fish) \ 137 + --zsh <($out/bin/cmprss completions zsh) 138 + ''; 125 139 }); 126 140 } 127 141 );