From a284fe263397e0c46570e481073549b1f7154b06 Mon Sep 17 00:00:00 2001 From: paki23 Date: Thu, 30 May 2024 23:36:42 +0200 Subject: [PATCH] thefuck: add xonsh integration --- modules/programs/thefuck.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/programs/thefuck.nix b/modules/programs/thefuck.nix index ab56ea016..a5d6f15ba 100644 --- a/modules/programs/thefuck.nix +++ b/modules/programs/thefuck.nix @@ -80,5 +80,9 @@ with lib; alias fuck = ${cfg.package}/bin/thefuck $"(history | last 1 | get command | get 0)" ''; }; + + programs.xonsh.xonshrc = '' + aliases["fuck"] = lambda args, stdin=None: execx($(${cfg.package}/bin/thefuck @(__xonsh__.history[-1].cmd))) + ''; }; }