diff options
author | Ryan Orendorff <ryan@orendorff.io> | 2019-09-23 22:11:58 -0700 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2020-02-20 00:03:17 +0100 |
commit | 4833a8b532e92bad14f5e8867c27488e72eac955 (patch) | |
tree | 33d4cfe5c56d22ecb95a19771de98b615983f743 /modules/programs/fish.nix | |
parent | d45e1c4adc68dcda504cfc13ea894b308e552807 (diff) |
fish: add section headers to generated config
The section headers help show where each section came from when looking at the
generated config. Added a note about how the config was generated in the
generated file.
Diffstat (limited to 'modules/programs/fish.nix')
-rw-r--r-- | modules/programs/fish.nix | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index 9ae350c291f..50cee2c065a 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -212,9 +212,12 @@ in ''; xdg.configFile."fish/config.fish".text = '' - # ~/.config/fish/config.fish: DO NOT EDIT -- this file has been generated automatically. + # ~/.config/fish/config.fish: DO NOT EDIT -- this file has been generated + # automatically by home-manager. + # if we haven't sourced the general config, do it if not set -q __fish_general_config_sourced + set fish_function_path ${pkgs.fish-foreign-env}/share/fish-foreign-env/functions $fish_function_path fenv source ${config.home.profileDirectory}/etc/profile.d/hm-session-vars.sh > /dev/null set -e fish_function_path[1] @@ -223,31 +226,43 @@ in # and leave a note so we don't source this config section again from # this very shell (children will source the general config anew) set -g __fish_general_config_sourced 1 + end + # if we haven't sourced the login config, do it status --is-login; and not set -q __fish_login_config_sourced and begin + # Login shell initialisation ${cfg.loginShellInit} + # and leave a note so we don't source this config section again from # this very shell (children will source the general config anew) set -g __fish_login_config_sourced 1 + end + # if we haven't sourced the interactive config, do it status --is-interactive; and not set -q __fish_interactive_config_sourced and begin - # Abbrs + + # Abbreviations ${abbrsStr} # Aliases ${aliasesStr} + # Prompt initialisation ${cfg.promptInit} + + # Interactive shell intialisation ${cfg.interactiveShellInit} + # and leave a note so we don't source this config section again from # this very shell (children will source the general config anew, # allowing configuration changes in, e.g, aliases, to propagate) set -g __fish_interactive_config_sourced 1 + end ''; } { |