mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 02:44:17 +03:00
Merge pull request #237946 from Ma27/pyinv-comp
python3.pkgs.pyinvoke: install shell completions
This commit is contained in:
commit
b71635386d
@ -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/";
|
||||
|
Loading…
Reference in New Issue
Block a user