Files
copnix/modules/home/home-nushell-last.ulu.nix
T
2026-08-02 04:07:25 +03:00

20 lines
465 B
Nix

{ ... }:
{
flake.homeModules.home-nushell-last =
{ ... }:
{
programs.nushell.extraConfig = ''
$env.config.hooks.display_output = {||
tee { table --expand | print }
# SQLiteDatabase doesn't support equality comparisons.
| try { if $in != null { $env.last = $in } }
}
# Retrieve the output of the last command.
def _ []: nothing -> any {
$env.last?
}
'';
};
}