From 394a6413419f30d22bda0e2072707a1202c7e318 Mon Sep 17 00:00:00 2001 From: ant Date: Sat, 11 Oct 2025 13:28:49 +0200 Subject: [PATCH] restore lfcd fish function that was removed by mistake --- home/lf.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/home/lf.nix b/home/lf.nix index adef56c..e4aba23 100644 --- a/home/lf.nix +++ b/home/lf.nix @@ -190,6 +190,21 @@ ''; }; + programs.fish.functions.lfcd.body = '' + set tmp (mktemp) + # `command` is needed in case `lfcd` is aliased to `lf` + command lf -last-dir-path=$tmp $argv + if test -f "$tmp" + set dir (cat $tmp) + rm -f $tmp + if test -d "$dir" + if test "$dir" != (pwd) + cd $dir + end + end + end + ''; + programs.fish = { shellAliases = { f = "lfcd";