tmuxp: install completions

This commit is contained in:
Mario Rodas 2022-08-12 23:45:00 -05:00
parent e64306119c
commit 0aa1c74387

View File

@ -1,4 +1,4 @@
{ lib, python3Packages }:
{ lib, python3Packages, installShellFiles }:
let
pypkgs = python3Packages;
@ -21,6 +21,8 @@ pypkgs.buildPythonApplication rec {
# No tests in archive
doCheck = false;
nativeBuildInputs = [ installShellFiles ];
propagatedBuildInputs = with pypkgs; [
click
colorama
@ -28,6 +30,13 @@ pypkgs.buildPythonApplication rec {
libtmux
];
postInstall = ''
installShellCompletion --cmd tmuxp \
--bash <(_TMUXP_COMPLETE=bash_source $out/bin/tmuxp) \
--fish <(_TMUXP_COMPLETE=fish_source $out/bin/tmuxp) \
--zsh <(_TMUXP_COMPLETE=zsh_source $out/bin/tmuxp)
'';
meta = with lib; {
description = "Manage tmux workspaces from JSON and YAML";
homepage = "https://tmuxp.git-pull.com/";