Skip to content

Copy selected items to clipboard #4187

Answered by LangLangBart
enoryw asked this question in Q&A
Discussion options

You must be logged in to vote

How to get back a list of selected items as line-separated?

Combine the f and + flag.

Placeholder Description
{} current line
{n} current line number (zero index)
{q} current query
Placeholder expression flags Description
+ space-separated list of the selected lines
f temporary file
s preserve whitespace
# macOS copy/paste commands
seq 4 | fzf --multi --bind 'result:select-all+become:cat {+f} | pbcopy'

pbpaste
1
2
3
4

EDIT1: add --multi flag

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by enoryw
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