Skip to content

No newline is inserted between aliasesStr and cfg.shellGlobalAliases #6647

@BlueskyFR

Description

@BlueskyFR

(lib.mkIf (aliasesStr != "" || cfg.shellGlobalAliases != {}) (mkOrder 1250
((optionalString (aliasesStr != "") aliasesStr) +
(optionalString (cfg.shellGlobalAliases != {})
(concatStringsSep "\n" (lib.mapAttrsToList
(k: v: "alias -g -- ${lib.escapeShellArg k}=${lib.escapeShellArg v}")
cfg.shellGlobalAliases))))))

So this config:

  home.shellAliases = {
    lt = "lsd --tree x";
  };

  programs.zsh.shellGlobalAliases = {
    g = "grep -i";
  };

Results in:

alias -- lt='lsd --tree x'alias -g -- g='grep -i'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions