fish: remove promptInit
in favor of interactiveShellInit
(#2231)
* fish: remove `promptInit` in favor of `interactiveShellInit` * Oops * starship: replace `promptInit` with `interactiveShellInit` * autojump: replace `promptInit` with `interactiveShellInit` * Add `mkRemovedOptionModule` for `programs.fish.promptInit`
This commit is contained in:
parent
46a69810cb
commit
9282dbc1fa
|
@ -49,7 +49,7 @@ in {
|
|||
. ${package}/share/autojump/autojump.zsh
|
||||
'';
|
||||
|
||||
programs.fish.promptInit = mkIf cfg.enableFishIntegration ''
|
||||
programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration ''
|
||||
. ${package}/share/autojump/autojump.fish
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -146,6 +146,16 @@ let
|
|||
(mapAttrsToList (k: v: "alias ${k} ${escapeShellArg v}") cfg.shellAliases);
|
||||
|
||||
in {
|
||||
imports = [
|
||||
(mkRemovedOptionModule [ "programs" "fish" "promptInit" ] ''
|
||||
Prompt is now configured through the
|
||||
|
||||
programs.fish.interactiveShellInit
|
||||
|
||||
option. Please change to use that instead.
|
||||
'')
|
||||
];
|
||||
|
||||
options = {
|
||||
programs.fish = {
|
||||
enable = mkEnableOption "fish, the friendly interactive shell";
|
||||
|
@ -214,14 +224,6 @@ in {
|
|||
initialisation.
|
||||
'';
|
||||
};
|
||||
|
||||
promptInit = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Shell script code used to initialise fish prompt.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
programs.fish.plugins = mkOption {
|
||||
|
@ -365,9 +367,6 @@ in {
|
|||
# Aliases
|
||||
${aliasesStr}
|
||||
|
||||
# Prompt initialisation
|
||||
${cfg.promptInit}
|
||||
|
||||
# Interactive shell intialisation
|
||||
${cfg.interactiveShellInit}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ in {
|
|||
fi
|
||||
'';
|
||||
|
||||
programs.fish.promptInit = mkIf cfg.enableFishIntegration ''
|
||||
programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration ''
|
||||
if test "$TERM" != "dumb" -a \( -z "$INSIDE_EMACS" -o "$INSIDE_EMACS" = "vterm" \)
|
||||
eval (${starshipCmd} init fish)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue