summaryrefslogtreecommitdiff
path: root/ar/.local/bin/fzffiles
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-28 01:37:44 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-28 01:37:44 +0900
commit41c1df54d4bbe3e07c16ed0db9821622cc13f5e4 (patch)
treedb20c2cfc9d01c70f999785fafb0852c0d7a7635 /ar/.local/bin/fzffiles
parentbdb59276699429f4044f6abf522b610f1f6b95e7 (diff)
modified lf/cleaner, modified lf/scope, modified bin/fzffiles, modified bin/lfub, deleted bin/unewsboat
Diffstat (limited to 'ar/.local/bin/fzffiles')
-rwxr-xr-xar/.local/bin/fzffiles9
1 files changed, 8 insertions, 1 deletions
diff --git a/ar/.local/bin/fzffiles b/ar/.local/bin/fzffiles
index 5dd97bc..d092596 100755
--- a/ar/.local/bin/fzffiles
+++ b/ar/.local/bin/fzffiles
@@ -10,7 +10,14 @@ IFS='
# Get the list of selected files with key bindings for specific paths
files=$(fzf-tmux \
--header "^a pwd ^b public ^d .dotfiles ^f configs ^g git ^h home ^k desktop ^r scripts ^s suckless ^u staged files ^v private ^/ help" \
- --preview 'if [ -d {} ]; then exa --color=always --long --all --header --icons --git {}; elif [ -L {} ]; then file -h {}; else bat --color=always --style=header,grid --line-range=:500 {}; fi' \
+ --preview "target=\$(readlink -f {}) &&
+ if [ -d \"\$target\" ]; then
+ exa --color=always --long --all --header --icons --git \"\$target\"
+ elif [ -f \"\$target\" ]; then
+ bat --color=always --style=header,grid --line-range=:500 \"\$target\"
+ else
+ file -h {}
+ fi" \
--reverse \
--query="$1" \
--multi \