From 6053dfba6fd1172c7180985cc61b068018768608 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Fri, 6 Feb 2026 14:43:39 +0900 Subject: modified lf/lfrc, modified shell/profile --- ar/.config/lf/lfrc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ar/.config/lf') diff --git a/ar/.config/lf/lfrc b/ar/.config/lf/lfrc index c11a06c..710ab41 100644 --- a/ar/.config/lf/lfrc +++ b/ar/.config/lf/lfrc @@ -179,6 +179,7 @@ cmd delete ${{ }} cmd trash ${{ + clear files=$(printf "$fx" | tr '\n' ';') while [ "$files" ]; do file=${files%%;*} @@ -223,6 +224,15 @@ cmd extract ${{ }} # Git +cmd git-root %{{ + root=$(git rev-parse --show-toplevel 2>/dev/null) + if [ -n "$root" ]; then + lf -remote "send $id cd \"$root\"" + else + lf -remote "send $id echo 'Not in a git repository'" + fi +}} + cmd on-cd &{{ zoxide add "$PWD" bash -c ' @@ -646,6 +656,7 @@ map fD zi map fd $lf -remote "send $id select \"$(find . -type d | fzf)\"" map ff $lf -remote "send $id select \"$(find . -type f | fzf)\"" map gl follow_link +map gc git-root map fzf_search map z -- cgit v1.2.3