mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-05 20:11:43 +03:00
nixos/zsh: Adds enableGlobalCompInit option
This commit is contained in:
parent
1d417c39f0
commit
17876c2cf1
@ -87,6 +87,19 @@ in
|
|||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
enableGlobalCompInit = mkOption {
|
||||||
|
default = cfg.enableCompletion;
|
||||||
|
description = ''
|
||||||
|
Enable execution of compinit call for all interactive zsh shells.
|
||||||
|
|
||||||
|
This option can be used if the user wants to extend its
|
||||||
|
<literal>fpath</literal> and a custom <literal>compinit</literal>
|
||||||
|
call in the local config is required.
|
||||||
|
'';
|
||||||
|
type = types.bool;
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -159,7 +172,7 @@ in
|
|||||||
fpath+=($p/share/zsh/site-functions $p/share/zsh/$ZSH_VERSION/functions $p/share/zsh/vendor-completions)
|
fpath+=($p/share/zsh/site-functions $p/share/zsh/$ZSH_VERSION/functions $p/share/zsh/vendor-completions)
|
||||||
done
|
done
|
||||||
|
|
||||||
${optionalString cfg.enableCompletion "autoload -U compinit && compinit"}
|
${optionalString cfg.enableGlobalCompInit "autoload -U compinit && compinit"}
|
||||||
|
|
||||||
${cfge.interactiveShellInit}
|
${cfge.interactiveShellInit}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user