Skip to content

How to filter a csv file using fzf? #4475

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

You must be logged in to vote

--with-nth:

fzf --delimiter ', ' --with-nth '{1}' << 'EOF'
Column 1, Column 2, Column 3, Column 4
Column 1, Column 2, Column 3, Column 4
Column 1, Column 2, Column 3, Column 4
Column 1, Column 2, Column 3, Column 4
Column 1, Column 2, Column 3, Column 4
Column 1, Column 2, Column 3, Column 4
Column 1, Column 2, Column 3, Column 4
Column 1, Column 2, Column 3, Column 4
EOF

Another option is to use --nth to limit the search scope:

fzf --delimiter ', ' --nth 1 --color nth:regular,fg:dim << 'EOF'
Column 1, Column 2, Column 3, Column 4
Column 1, Column 2, Column 3, Column 4
Column 1, Column 2, Column 3, Column 4
Column 1, Column 2, Column 3, Column 4
Column 1, Column 2, Column 3, Column 4
Colu…

Replies: 1 comment

Comment options

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