mirror of
https://github.com/nix-community/home-manager
synced 2024-12-24 18:59:47 +01:00
zsh: move aliases definitions after initExtra
Same motivation as in https://github.com/NixOS/nixpkgs/pull/28378. zsh.initExtra parameter can be used by external modules which can redefine user aliases. This change will give user-defined aliases the highest priority.
This commit is contained in:
parent
29d5f5d760
commit
379e2c694b
2 changed files with 15 additions and 2 deletions
|
@ -107,6 +107,19 @@ in
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
news.entries = [
|
news.entries = [
|
||||||
|
{
|
||||||
|
time = "2017-09-12T13:11:48+00:00";
|
||||||
|
condition = (
|
||||||
|
config.programs.zsh.enable &&
|
||||||
|
config.programs.zsh.shellAliases != {}
|
||||||
|
);
|
||||||
|
message = ''
|
||||||
|
Aliases defined in 'programs.zsh.shellAliases'
|
||||||
|
are now have the highest priority. Such aliases will
|
||||||
|
not be redefined by the code in 'programs.zsh.initExtra'
|
||||||
|
or any external plugins.
|
||||||
|
'';
|
||||||
|
}
|
||||||
{
|
{
|
||||||
time = "2017-09-10T22:15:19+00:00";
|
time = "2017-09-10T22:15:19+00:00";
|
||||||
condition = config.programs.zsh.enable;
|
condition = config.programs.zsh.enable;
|
||||||
|
|
|
@ -241,9 +241,9 @@ in
|
||||||
source "$HOME/.zsh/plugins/${plugin.name}/${plugin.file}"
|
source "$HOME/.zsh/plugins/${plugin.name}/${plugin.file}"
|
||||||
'') cfg.plugins)}
|
'') cfg.plugins)}
|
||||||
|
|
||||||
${aliasesStr}
|
|
||||||
|
|
||||||
${cfg.initExtra}
|
${cfg.initExtra}
|
||||||
|
|
||||||
|
${aliasesStr}
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
(mkIf cfg.oh-my-zsh.enable {
|
(mkIf cfg.oh-my-zsh.enable {
|
||||||
|
|
Loading…
Reference in a new issue