To expand on Brynjar Harðarson’s helpful comment, one could run the following command to have roughly the same functionality directly in the terminal:
rg --column --line-number --hidden --ignore-case --no-heading --color=always '' | fzf --ansi --delimiter : --nth 4..
What this does is build the list to feed to fzf
using rg
:
rg --column --line-number --hidden --ignore-case --no-heading --color=always ''
Explanations for these command line flags can be found using rg --help
:)
The ''
at the end is required and means “anything” since it matches an empty string. If you do not add them rg
will give you an error.
For me running that command yields a large list of files in my /blog
folder which is filled with markdown files:
Notice how every line is in there? This is where fzf
comes in to play since it is a line based filter so we can now take that output and pipe it to fzf:
rg --column --line-number --hidden --ignore-case --no-heading --color=always '' | fzf --ansi --delimiter : --nth 4..
The help for the flags can be found using fzf --help
in this case :)
Results for me running this in the same directory look like this when I type “hello” into fzf:
Hope this helps, let me know if any questions remain.
👋