python3.pkgs.invoke: install shell completions
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
, bash
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pythonOlder
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -26,6 +26,13 @@ buildPythonPackage rec {
|
||||
"invoke"
|
||||
];
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
mkdir -p $out/share/{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
|
||||
$out/bin/inv --print-completion-script=zsh >$out/share/zsh/site-functions/_inv
|
||||
$out/bin/inv --print-completion-script=bash >$out/share/bash-completion/completions/inv.bash
|
||||
$out/bin/inv --print-completion-script=fish >$out/share/fish/vendor_completions.d/inv.fish
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Pythonic task execution";
|
||||
homepage = "https://www.pyinvoke.org/";
|
||||
|
||||
Reference in New Issue
Block a user