sheldon: fix how commands are combined
This commit is contained in:
parent
6c65ca95fc
commit
abfc68ac8f
|
@ -46,28 +46,49 @@ in {
|
|||
source = tomlFormat.generate "sheldon-config" cfg.settings;
|
||||
};
|
||||
|
||||
programs.bash.initExtra = mkIf (cfg.settings != { }) ''
|
||||
programs.bash.initExtra = concatStringsSep "\n" [
|
||||
mkIf
|
||||
(cfg.settings != { })
|
||||
''
|
||||
eval "$(sheldon source)"
|
||||
'' + mkIf cfg.enableBashCompletions ''
|
||||
''
|
||||
mkIf
|
||||
cfg.enableBashCompletions
|
||||
''
|
||||
if [[ $TERM != "dumb" ]]; then
|
||||
eval "$(${cmd} completions --shell=bash)"
|
||||
fi
|
||||
'';
|
||||
''
|
||||
];
|
||||
|
||||
programs.zsh.initExtra = mkIf (cfg.settings != { }) ''
|
||||
programs.zsh.initExtra = concatStringsSep "\n" [
|
||||
mkIf
|
||||
(cfg.settings != { })
|
||||
''
|
||||
eval "$(sheldon source)"
|
||||
'' + mkIf cfg.enableZshCompletions ''
|
||||
''
|
||||
mkIf
|
||||
cfg.enableZshCompletions
|
||||
''
|
||||
if [[ $TERM != "dumb" ]]; then
|
||||
eval "$(${cmd} completions --shell=zsh)"
|
||||
fi
|
||||
'';
|
||||
''
|
||||
];
|
||||
|
||||
programs.fish.interactiveShellInit = mkIf (cfg.settings != { }) ''
|
||||
programs.fish.interactiveShellInit = concatStringsSep "\n" [
|
||||
mkIf
|
||||
(cfg.settings != { })
|
||||
''
|
||||
eval "$(sheldon source)"
|
||||
'' + mkIf cfg.enableFishCompletions ''
|
||||
''
|
||||
mkIf
|
||||
cfg.enableFishCompletions
|
||||
''
|
||||
if test "$TERM" != "dumb"
|
||||
eval "$(${cmd} completions --shell=fish)"
|
||||
end
|
||||
'';
|
||||
''
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue