From 8419dfd39d678afd5bc40df48f21fcaad8fc1332 Mon Sep 17 00:00:00 2001 From: linj Date: Sun, 29 May 2022 13:08:21 +0800 Subject: [PATCH] fish: enable manpage completion This patch follows a similar patch[1] in nixpkgs. With this patch, fish can complete manpages for programs installed through home-manager, e.g., using home.packages. [1]: https://github.com/NixOS/nixpkgs/pull/91794 --- modules/programs/fish.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index 1fbb9e071..7eda6eb6b 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -285,6 +285,9 @@ in { { home.packages = [ cfg.package ]; + # Support completion for `man` by building a cache for `apropos`. + programs.man.generateCaches = mkDefault true; + xdg.dataFile."fish/home-manager_generated_completions".source = let # paths later in the list will overwrite those already linked destructiveSymlinkJoin = args_@{ name, paths, preferLocalBuild ? true