From df424b093c97ddd07638c30303bb4eabfe1af4a0 Mon Sep 17 00:00:00 2001 From: Kid <44045911+kidonng@users.noreply.github.com> Date: Thu, 29 Jul 2021 19:49:58 +0800 Subject: [PATCH 1/5] fish: remove `promptInit` in favor of `interactiveShellInit` --- modules/programs/fish.nix | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index f381960f6eb0..24caa23620d9 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -214,13 +214,6 @@ in { initialisation. ''; }; - - promptInit = mkOption { - type = types.lines; - default = ""; - description = '' - Shell script code used to initialise fish prompt. - ''; }; }; @@ -382,9 +375,6 @@ in { # Aliases ${aliasesStr} - # Prompt initialisation - ${cfg.promptInit} - # Interactive shell intialisation ${cfg.interactiveShellInit} From f0fe00994cec25c1a66cf9e432e02264015a8d38 Mon Sep 17 00:00:00 2001 From: Kid <44045911+kidonng@users.noreply.github.com> Date: Thu, 29 Jul 2021 20:00:46 +0800 Subject: [PATCH 2/5] Oops --- modules/programs/fish.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index 24caa23620d9..e134884095c6 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -214,7 +214,6 @@ in { initialisation. ''; }; - }; }; programs.fish.plugins = mkOption { From 81431fe778eae7007125df12d6db802e9d1e5290 Mon Sep 17 00:00:00 2001 From: Kid <44045911+kidonng@users.noreply.github.com> Date: Thu, 29 Jul 2021 20:05:49 +0800 Subject: [PATCH 3/5] starship: replace `promptInit` with `interactiveShellInit` --- modules/programs/starship.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/starship.nix b/modules/programs/starship.nix index 33db8e6d6c68..d9ff51b60933 100644 --- a/modules/programs/starship.nix +++ b/modules/programs/starship.nix @@ -100,7 +100,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 (${cfg.package}/bin/starship init fish) end From d19a45767c69c4b24f0e19266c82ae0618d63187 Mon Sep 17 00:00:00 2001 From: Kid <44045911+kidonng@users.noreply.github.com> Date: Thu, 29 Jul 2021 20:06:14 +0800 Subject: [PATCH 4/5] autojump: replace `promptInit` with `interactiveShellInit` --- modules/programs/autojump.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/autojump.nix b/modules/programs/autojump.nix index db3bdaf593c0..e8bf6b4375cd 100644 --- a/modules/programs/autojump.nix +++ b/modules/programs/autojump.nix @@ -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 ''; }; From a6fd4f65ed2c885a8d493626fb3747a84ee3d690 Mon Sep 17 00:00:00 2001 From: Kid <44045911+kidonng@users.noreply.github.com> Date: Thu, 29 Jul 2021 22:25:00 +0800 Subject: [PATCH 5/5] Add `mkRemovedOptionModule` for `programs.fish.promptInit` --- modules/programs/fish.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index e134884095c6..1b594f408d1f 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -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";