mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
zsh: add system packages' completion path to fpath
This commit is contained in:
parent
fa6f697dbb
commit
2304c145f3
1 changed files with 11 additions and 3 deletions
|
@ -153,7 +153,13 @@ in
|
|||
|
||||
enableCompletion = mkOption {
|
||||
default = true;
|
||||
description = "Enable zsh completion.";
|
||||
description = ''
|
||||
Enable zsh completion. Don't forget to add
|
||||
<programlisting>
|
||||
environment.pathsToLink = [ "/share/zsh" ];
|
||||
</programlisting>
|
||||
to your system configuration to get completion for system packages (e.g. systemd).
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
|
@ -278,8 +284,10 @@ in
|
|||
|
||||
home.file."${relToDotDir ".zshrc"}".text = ''
|
||||
typeset -U path cdpath fpath manpath
|
||||
fpath+="$HOME/.nix-profile/share/zsh/site-functions"
|
||||
fpath+="$HOME/.nix-profile/share/zsh/$ZSH_VERSION/functions"
|
||||
|
||||
for profile in ''${(z)NIX_PROFILES}; do
|
||||
fpath+=($profile/share/zsh/site-functions $profile/share/zsh/$ZSH_VERSION/functions $profile/share/zsh/vendor-completions)
|
||||
done
|
||||
|
||||
HELPDIR="${pkgs.zsh}/share/zsh/$ZSH_VERSION/help"
|
||||
|
||||
|
|
Loading…
Reference in a new issue