summary refs log tree commit diff
path: root/pkgs/tools/misc/tmuxp
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2023-06-23 21:34:51 -0300
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-06-26 10:36:30 -0300
commit643ed5356431bc81d538c845f61e04336b58b633 (patch)
tree2fb0db87ae31d4908c1b426f4ea69baddd2ecb16 /pkgs/tools/misc/tmuxp
parent8af62f76ae228009e696cac3ac41a2c3027725a9 (diff)
downloadnixpkgs-643ed5356431bc81d538c845f61e04336b58b633.tar
nixpkgs-643ed5356431bc81d538c845f61e04336b58b633.tar.gz
nixpkgs-643ed5356431bc81d538c845f61e04336b58b633.tar.bz2
nixpkgs-643ed5356431bc81d538c845f61e04336b58b633.tar.lz
nixpkgs-643ed5356431bc81d538c845f61e04336b58b633.tar.xz
nixpkgs-643ed5356431bc81d538c845f61e04336b58b633.tar.zst
nixpkgs-643ed5356431bc81d538c845f61e04336b58b633.zip
tmuxp: fix shell completion generation
tmuxp 1.17+ uses shtab to generate the shell completion. This commit
adapts the code to properly generate the shell completion module.

A side effect of use of shtab is that fish is not supported so it has
been removed from postInstall.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'pkgs/tools/misc/tmuxp')
-rw-r--r--pkgs/tools/misc/tmuxp/default.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/tools/misc/tmuxp/default.nix b/pkgs/tools/misc/tmuxp/default.nix
index b7cf5626e91..b2c67e8da6e 100644
--- a/pkgs/tools/misc/tmuxp/default.nix
+++ b/pkgs/tools/misc/tmuxp/default.nix
@@ -20,6 +20,7 @@ pypkgs.buildPythonApplication rec {
 
   nativeBuildInputs = [
     pypkgs.poetry-core
+    pypkgs.shtab
     installShellFiles
   ];
 
@@ -32,9 +33,8 @@ pypkgs.buildPythonApplication rec {
 
   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)
+      --bash <(shtab --shell=bash -u tmuxp.cli.create_parser) \
+      --zsh <(shtab --shell=zsh -u tmuxp.cli.create_parser)
   '';
 
   meta = with lib; {