summaryrefslogtreecommitdiff
path: root/modules/programs
diff options
context:
space:
mode:
authorEmily <vcs@emily.moe>2024-09-10 23:31:41 +0100
committerGitHub <noreply@github.com>2024-09-10 23:31:41 +0100
commit4c96bd694bab9bd872bb2e1b738133342e77966d (patch)
treecb7c515d8cd8a794e08e40ea2e99cd4cd068250a /modules/programs
parent5b2d8e9a47c3e17514650d1ce7d5e907114db82b (diff)
parent15f64efcaf936f3b77955018d29b4802be6b144f (diff)
Merge pull request #1066 from antoineco/zsh/fpath
Backport Zsh fpath mangling from NixOS
Diffstat (limited to 'modules/programs')
-rw-r--r--modules/programs/zsh/default.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/programs/zsh/default.nix b/modules/programs/zsh/default.nix
index bbf8ad9..58a3155 100644
--- a/modules/programs/zsh/default.nix
+++ b/modules/programs/zsh/default.nix
@@ -135,6 +135,11 @@ in
. ${config.system.build.setEnvironment}
fi
+ # Tell zsh how to find installed completions
+ for p in ''${(z)NIX_PROFILES}; do
+ fpath=($p/share/zsh/site-functions $p/share/zsh/$ZSH_VERSION/functions $p/share/zsh/vendor-completions $fpath)
+ done
+
${cfg.shellInit}
# Read system-wide modifications.
@@ -182,11 +187,6 @@ in
${config.environment.interactiveShellInit}
${cfg.interactiveShellInit}
- # Tell zsh how to find installed completions
- for p in ''${(z)NIX_PROFILES}; do
- fpath+=($p/share/zsh/site-functions $p/share/zsh/$ZSH_VERSION/functions $p/share/zsh/vendor-completions)
- done
-
${cfg.promptInit}
${optionalString cfg.enableGlobalCompInit "autoload -U compinit && compinit"}