Warning Regarding NixOS Package Configuration and Zoxide Integration in Fish shell
When running the package on NixOS, particularly with zoxide, there are important considerations for setting up brrtfetch as part of the shellInit so it executes upon terminal startup.
If you initialize zoxide with zoxide init fish without specifying the fish integration correctly, it may not function as intended. Specifically, the command z will not be assigned to zoxide unless the configuration is specified as follows:
fish = {
interactiveShellInit = ''
${lib.getExe pkgs.zoxide} init fish | source
timeout 3 brrtfetch -width 30 -height 30 -fps 10 /etc/nixos/ascii.gif
'';
};
Explanation
The issue arises because if the configuration is not specified correctly, NixOS interprets the initialization in a way that results in the config.fish file executing brrtfetch before zoxide. This sequence disrupts zoxide's functionality and disables the z command.
Bad Configuration Example
# Interactive shell initialization
set fish_greeting # Disable greeting
timeout 3 brrtfetch -width 30 -height 30 -fps 10 /etc/nixos/ascii.gif
/nix/store/7lh4ina0b99aql433h56iq3fvp1d8znn-zoxide-0.9.8/bin/zoxide init fish | source
Correct Configuration Example
# Interactive shell initialization
set fish_greeting # Disable greeting
/nix/store/7lh4ina0b99aql433h56iq3fvp1d8znn-zoxide-0.9.8/bin/zoxide init fish | source
timeout 3 brrtfetch -width 30 -height 30 -fps 10 /etc/nixos/ascii.gif
Following this configuration ensures that zoxide initializes properly, allowing you to use the z command as expected.
Comment for Developer
I've encountered a puzzling issue when brrtfetch interacts with the fish shell and zoxide. Specifically, if brrtfetch runs before zoxide is initialized, it appears to disable the z command functionality.
Could you please shed light on why this might happen? Is there a way to fix this interaction to enhance compatibility with the fish shell and zoxide?
Thank you for your attention!
Warning Regarding NixOS Package Configuration and Zoxide Integration in Fish shell
When running the package on NixOS, particularly with zoxide, there are important considerations for setting up
brrtfetchas part of theshellInitso it executes upon terminal startup.If you initialize zoxide with
zoxide init fishwithout specifying the fish integration correctly, it may not function as intended. Specifically, the commandzwill not be assigned to zoxide unless the configuration is specified as follows:fish = { interactiveShellInit = '' ${lib.getExe pkgs.zoxide} init fish | source timeout 3 brrtfetch -width 30 -height 30 -fps 10 /etc/nixos/ascii.gif ''; };Explanation
The issue arises because if the configuration is not specified correctly, NixOS interprets the initialization in a way that results in the
config.fishfile executingbrrtfetchbeforezoxide. This sequence disrupts zoxide's functionality and disables thezcommand.Bad Configuration Example
Correct Configuration Example
Following this configuration ensures that
zoxideinitializes properly, allowing you to use thezcommand as expected.Comment for Developer
I've encountered a puzzling issue when
brrtfetchinteracts with the fish shell and zoxide. Specifically, ifbrrtfetchruns beforezoxideis initialized, it appears to disable thezcommand functionality.Could you please shed light on why this might happen? Is there a way to fix this interaction to enhance compatibility with the fish shell and zoxide?
Thank you for your attention!