diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-11-17 10:30:03 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-11-17 10:33:00 +0100 |
commit | e79a9d45c4756ac6d0ad72dd623bd698fbebfb33 (patch) | |
tree | dfb29fd6df9a1a8ef0847b2caca8115765582c0c /pkgs | |
parent | refactor(legacy/conf/mpd): Move to a unified `mpd` by-name module (diff) | |
download | nixos-config-e79a9d45c4756ac6d0ad72dd623bd698fbebfb33.tar.gz nixos-config-e79a9d45c4756ac6d0ad72dd623bd698fbebfb33.zip |
fix(pkgs/mpp): Include the `mpc` zsh completions
Diffstat (limited to '')
-rw-r--r-- | pkgs/by-name/mp/mpp/package.nix | 8 |
1 files changed, 7 insertions, 1 deletions
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" |