mirror of
https://github.com/nix-community/home-manager
synced 2024-11-01 00:39:45 +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 {
|
enableCompletion = mkOption {
|
||||||
default = true;
|
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;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -278,8 +284,10 @@ in
|
||||||
|
|
||||||
home.file."${relToDotDir ".zshrc"}".text = ''
|
home.file."${relToDotDir ".zshrc"}".text = ''
|
||||||
typeset -U path cdpath fpath manpath
|
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"
|
HELPDIR="${pkgs.zsh}/share/zsh/$ZSH_VERSION/help"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue