From e79a9d45c4756ac6d0ad72dd623bd698fbebfb33 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sun, 17 Nov 2024 10:30:03 +0100 Subject: fix(pkgs/mpp): Include the `mpc` zsh completions --- pkgs/by-name/mp/mpp/package.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/mp/mpp/package.nix b/pkgs/by-name/mp/mpp/package.nix index 29ec1c80..9c5315b0 100644 --- a/pkgs/by-name/mp/mpp/package.nix +++ b/pkgs/by-name/mp/mpp/package.nix @@ -4,6 +4,7 @@ fd, symlinkJoin, stdenv, + zsh, }: let script = sysLib.writeShellScript { name = "mpp"; @@ -18,7 +19,7 @@ }; mpcShare = stdenv.mkDerivation { - name = "${mpc.name}-only-share"; + name = "mpp-only-share"; nativeBuildInputs = [fd]; strictDeps = true; @@ -37,6 +38,11 @@ mv "$file_path" "$new_file_path" } + # Copy the zsh bundled `mpc` completions to `mpp` + # TODO: Also add completions for the new subcommands <2024-11-17> + mkdir --parents share/zsh/site-functions; + cp "${zsh}/share/zsh/${zsh.version}/functions/_mpc" "share/zsh/site-functions" + # Replace all reverences to `mpc`. First all files fd "mpc" "." --hidden --type file | while read -r file_path; do fixMpc "$file_path" -- cgit 1.4.1