1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 21:49:48 +01:00

zoxide: add xonsh integratiion

This commit is contained in:
paki23 2024-05-30 23:55:48 +02:00
parent a284fe2633
commit 47a2dd4554
No known key found for this signature in database
GPG key ID: 13160FFB4CEB03F2

View file

@ -63,6 +63,14 @@ in {
Whether to enable Nushell integration.
'';
};
enableXonshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Xonsh integration.
'';
};
};
config = mkIf cfg.enable {
@ -93,5 +101,9 @@ in {
source ${config.xdg.cacheHome}/zoxide/init.nu
'';
};
programs.xonsh.xonshrc = mkIf cfg.enableXonshIntegration ''
execx($(${cfg.package}/bin/zoxide init xonsh), 'exec', __xonsh__.ctx, filename='zoxide')
'';
};
}