Skip to content

How to support strings with spaces and single quotes #3532

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

You must be logged in to vote
  • maybe this will work
cat current.txt | fzf | tr '\n' '\0' | xargs -0 -I {}
  • alternatively, fzf can also read NUL
cat current.txt | tr '\n' '\0' | fzf --read0 | xargs -0 -I {}

EDIT

  • Additionally, fzf can print NUL, making the tr command redundant.
cat current.txt | fzf --print0 | xargs -0 -I {}

Replies: 1 comment 1 reply

Comment options

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

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