diff options
author | wzy <32936898+Freed-Wu@users.noreply.github.com> | 2023-03-30 16:34:55 +0800 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2023-04-27 23:22:46 +0200 |
commit | 8634641676c76bc7245ce1dd18d34b42035aea74 (patch) | |
tree | bfabe5021410813e810c4287ee75a46a7f104235 /pkgs/tools | |
parent | d6bde74dde09f750b54c861587917d6530266ab8 (diff) |
trash-cli: add shell completions
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/misc/trash-cli/default.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/tools/misc/trash-cli/default.nix b/pkgs/tools/misc/trash-cli/default.nix index f607da9099a0d..fdc99fcfaa008 100644 --- a/pkgs/tools/misc/trash-cli/default.nix +++ b/pkgs/tools/misc/trash-cli/default.nix @@ -43,6 +43,16 @@ python3Packages.buildPythonApplication rec { runHook postInstallCheck ''; + postInstall = '' + for bin in trash{,-{empty,list,put,restore}}; do + $out/bin/$bin --print-completion bash > $bin + install -Dm644 $bin -t $out/share/bash-completion/completions + $out/bin/$bin --print-completion zsh > _$bin + install -Dm644 _$bin -t $out/share/zsh/site-functions + $out/bin/$bin --print-completion tcsh > $bin.csh + install -Dm644 $bin.csh -t $out/etc/profile.d + done + ''; meta = with lib; { homepage = "https://github.com/andreafrancia/trash-cli"; |