zoxide: add xonsh integratiion
This commit is contained in:
parent
0cd0a7b407
commit
e6c8ddbc99
|
@ -63,6 +63,14 @@ in {
|
||||||
Whether to enable Nushell integration.
|
Whether to enable Nushell integration.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enableXonshIntegration = mkOption {
|
||||||
|
default = true;
|
||||||
|
type = types.bool;
|
||||||
|
description = ''
|
||||||
|
Whether to enable Xonsh integration.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -93,5 +101,9 @@ in {
|
||||||
source ${config.xdg.cacheHome}/zoxide/init.nu
|
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')
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue