restore lfcd fish function that was removed by mistake
Some checks failed
/ build-all (push) Has been cancelled

This commit is contained in:
ant 2025-10-11 13:28:49 +02:00
parent 064e0683d0
commit c3ba849207

View file

@ -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 = { programs.fish = {
shellAliases = { shellAliases = {
f = "lfcd"; f = "lfcd";