Skip to content

Looking for the name of some internal commands #1362

Answered by joelim-work
Archie-2021 asked this question in Q&A
Discussion options

You must be logged in to vote

lf doesn't keep track of past selections, but you can manually write the selections to a file whenever it is updated and then restore them afterwards:

# update /tmp/selections.txt file whenever selection changes
map <space> :{{
    toggle
    down
    &echo "$fx" > /tmp/selections.txt
}}

# select files according to the contents of /tmp/selections.txt
map gv %{{
    lf -remote "send $id toggle $(xargs printf ' %q' < /tmp/selections.txt)"
}}

That should hopefully be a good starting point for you.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Archie-2021
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants