lf directory history via fzf #1429
-
Hello, cmd fzf_jump ${{
# res="$(find . -maxdepth 1 | fzf --reverse --header='Jump to location' | sed 's/\\/\\\\/g;s/"/\\"/g')"
res="$(fd | fzf --reverse --header='Jump to location' | sed 's/\\/\\\\/g;s/"/\\"/g')"
if [ -d "$res" ] ; then
cmd="cd"
elif [ -f "$res" ] ; then
cmd="select"
else
exit 0
fi
lf -remote "send $id $cmd \"$res\""
}} thank you |
Beta Was this translation helpful? Give feedback.
Answered by
DusanLesan
Sep 18, 2023
Replies: 2 comments 5 replies
-
Something like this maybe:
On every change it adds one last entry to a file in tmp, removes duplicates and removes older lines. On history command it displays content of tmp file |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
techeddie
-
resolved |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Something like this maybe:
On every change it adds one last entry to a file in tmp, removes duplicates and removes older lines. On history command it displays content of tmp file