Skip to content

Standalone selection script #1929

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

You must be logged in to vote

You can use the -command option to have lf do something upon startup (such as selecting files), and then wrap that up into a script:

lfselect.sh

#!/bin/sh

lf -command "cmd on-init toggle $(tr '\n' ' ')"

And then use it like so:

ls | head -n 5 | lfselect.sh

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@avidseeker
Comment options

@joelim-work
Comment options

@avidseeker
Comment options

@joelim-work
Comment options

@avidseeker
Comment options

Answer selected by avidseeker
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