Skip to content

Using fzf for tagging workflow - ability to add to input options? #3662

Answered by junegunn
sullyj3 asked this question in Q&A
Discussion options

You must be logged in to vote

This should give you some ideas.

cat /usr/share/dict/words | fzf --header 'Press space to add the typed word' --multi \
  --bind 'start:execute-silent(: > /tmp/added)' \
  --bind 'space:execute-silent(echo {q} >> /tmp/added)+clear-query+refresh-preview' \
  --preview '
    echo "Selected words:"
    echo {+} | sed "s/^/  - /"
    echo
    echo "Added words:"
    cat /tmp/added | sed "s/^/  - /"
  '

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@sullyj3
Comment options

@lamyergeier
Comment options

Answer selected by sullyj3
Comment options

You must be logged in to vote
1 reply
@junegunn
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants