1
0
Fork 0

remove old file

This commit is contained in:
Luca Bilke 2024-05-23 17:06:08 +02:00
parent 6287059d34
commit 28304eb8c4
1 changed files with 0 additions and 22 deletions

View File

@ -1,22 +0,0 @@
#!/bin/sh
clear
file="$(\
fzf --expect=' ' --select-1 --cycle --bind one:accept -q '^' -e -n1 --scheme=history --history="$XDG_DATA_HOME/lf/shortcut_history" --header='Searching Shortcuts' --preview='
file=$(cut -f2 <<< "{}")
if [ -f "$file" ] && [ -r "$file" ]; then
head -$LINES "$file"
elif [ -d "$file" ] && [ -r "$file" ]; then
ls -lhpANX --color=always --group-directories-first "$file"
fi
' <"$XDG_DATA_HOME/lf/dirs" |
cut -f2 |
tr -d '\n'
)"
if [ -d "$file" ]; then
lf -remote "send $id cd $file"
return
elif [ -f "$file" ]; then
lf -remote "send $id select $file"
fi