From 228aecc36587ea36bd12eee7d82efb8d2e1846db Mon Sep 17 00:00:00 2001 From: Bojun Ren Date: Fri, 11 Oct 2024 23:33:19 +0800 Subject: [PATCH] cheat: fix zsh completion --- pkgs/applications/misc/cheat/default.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/applications/misc/cheat/default.nix b/pkgs/applications/misc/cheat/default.nix index ef8780f1e88b..07b4eaa39826 100644 --- a/pkgs/applications/misc/cheat/default.nix +++ b/pkgs/applications/misc/cheat/default.nix @@ -16,6 +16,21 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles ]; + patches = [ + (builtins.toFile "fix-zsh-completion.patch" '' + diff --git a/scripts/cheat.zsh b/scripts/cheat.zsh + index befe1b2..675c9f8 100755 + --- a/scripts/cheat.zsh + +++ b/scripts/cheat.zsh + @@ -62,4 +62,4 @@ _cheat() { + esac + } + + -compdef _cheat cheat + +_cheat "$@" + '') + ]; + postInstall = '' installManPage doc/cheat.1 installShellCompletion scripts/cheat.{bash,fish,zsh}