From f8bb0ba6de361c43c1c1e9756375f23ffadac1f9 Mon Sep 17 00:00:00 2001 From: carschandler <92899389+carschandler@users.noreply.github.com> Date: Mon, 10 Mar 2025 03:50:41 +0000 Subject: [PATCH] zoxide: update mkOrder to place bash configuration at end of bashrc (#6572) I updated my flake a few weeks back and `zoxide` has been giving me an error recently: ``` zoxide: detected a possible configuration issue. Please ensure that zoxide is initialized right at the end of your shell configuration file (usually ~/.bashrc). If the issue persists, consider filing an issue at: https://github.com/ajeetdsouza/zoxide/issues Disable this message by setting _ZO_DOCTOR=0. ``` To be fair, I haven't noticed any issues with `zoxide` apart from this error message. The `zoxide` eval statement in my `.bashrc` is not "right at the end" of the file as mentioned in the message which isn't surprising given that it is given a `mkOrder 150`. In my own config, I increased this to `2000` (to ensure it comes after any `mkAfter`s which are `mkOrder 1500` to ensure it happens at the end of the script. After doing so, it appears at the end of my `bashrc` and I no longer get the error message. --- modules/programs/zoxide.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/zoxide.nix b/modules/programs/zoxide.nix index 23a18a357..95364f04b 100644 --- a/modules/programs/zoxide.nix +++ b/modules/programs/zoxide.nix @@ -48,7 +48,7 @@ in { config = mkIf cfg.enable { home.packages = [ cfg.package ]; - programs.bash.initExtra = mkIf cfg.enableBashIntegration (mkOrder 150 '' + programs.bash.initExtra = mkIf cfg.enableBashIntegration (mkOrder 2000 '' eval "$(${cfg.package}/bin/zoxide init bash ${cfgOptions})" '');