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.
This commit is contained in:
parent
d45e1c4adc
commit
4833a8b532
|
@ -212,9 +212,12 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
xdg.configFile."fish/config.fish".text = ''
|
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 we haven't sourced the general config, do it
|
||||||
if not set -q __fish_general_config_sourced
|
if not set -q __fish_general_config_sourced
|
||||||
|
|
||||||
set fish_function_path ${pkgs.fish-foreign-env}/share/fish-foreign-env/functions $fish_function_path
|
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
|
fenv source ${config.home.profileDirectory}/etc/profile.d/hm-session-vars.sh > /dev/null
|
||||||
set -e fish_function_path[1]
|
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
|
# and leave a note so we don't source this config section again from
|
||||||
# this very shell (children will source the general config anew)
|
# this very shell (children will source the general config anew)
|
||||||
set -g __fish_general_config_sourced 1
|
set -g __fish_general_config_sourced 1
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# if we haven't sourced the login config, do it
|
# if we haven't sourced the login config, do it
|
||||||
status --is-login; and not set -q __fish_login_config_sourced
|
status --is-login; and not set -q __fish_login_config_sourced
|
||||||
and begin
|
and begin
|
||||||
|
|
||||||
|
# Login shell initialisation
|
||||||
${cfg.loginShellInit}
|
${cfg.loginShellInit}
|
||||||
|
|
||||||
# and leave a note so we don't source this config section again from
|
# and leave a note so we don't source this config section again from
|
||||||
# this very shell (children will source the general config anew)
|
# this very shell (children will source the general config anew)
|
||||||
set -g __fish_login_config_sourced 1
|
set -g __fish_login_config_sourced 1
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# if we haven't sourced the interactive config, do it
|
# if we haven't sourced the interactive config, do it
|
||||||
status --is-interactive; and not set -q __fish_interactive_config_sourced
|
status --is-interactive; and not set -q __fish_interactive_config_sourced
|
||||||
and begin
|
and begin
|
||||||
# Abbrs
|
|
||||||
|
# Abbreviations
|
||||||
${abbrsStr}
|
${abbrsStr}
|
||||||
|
|
||||||
# Aliases
|
# Aliases
|
||||||
${aliasesStr}
|
${aliasesStr}
|
||||||
|
|
||||||
|
# Prompt initialisation
|
||||||
${cfg.promptInit}
|
${cfg.promptInit}
|
||||||
|
|
||||||
|
# Interactive shell intialisation
|
||||||
${cfg.interactiveShellInit}
|
${cfg.interactiveShellInit}
|
||||||
|
|
||||||
# and leave a note so we don't source this config section again from
|
# and leave a note so we don't source this config section again from
|
||||||
# this very shell (children will source the general config anew,
|
# this very shell (children will source the general config anew,
|
||||||
# allowing configuration changes in, e.g, aliases, to propagate)
|
# allowing configuration changes in, e.g, aliases, to propagate)
|
||||||
set -g __fish_interactive_config_sourced 1
|
set -g __fish_interactive_config_sourced 1
|
||||||
|
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
} {
|
} {
|
||||||
|
|
Loading…
Reference in a new issue