fzf icon indicating copy to clipboard operation
fzf copied to clipboard

Color output when using --nth

Open 0phoff opened this issue 4 years ago • 0 comments

  • [X] I have read through the manual page (man fzf)
  • [X] I have the latest version of fzf
  • [X] I have searched through the existing issues

Info

  • OS
    • [X] Linux
    • [ ] Mac OS X
    • [ ] Windows
    • [ ] Etc.
  • Shell
    • [X] bash
    • [ ] zsh
    • [ ] fish

Problem / Steps to reproduce

When using the --nth option, it would be nice to be able to visually indicate which part of the lines are actually being searched.

rg -nSH . | fzf --nth=3..

The following command shows filename:linenumber:content, but I only want to filter based on content. Using --nth works wonderfully, but the current setup is quite cluttered because it is difficult to see where the content starts.

It would be nice to add an extra color specification, to enable a different styling of "disabled" search field indices. You could default it to dim (gray), or default it to the normal text so that nothing changes if it is not enabled.

Alternatives I considered

  • I could use --with-nth, but I like to have the filename visible as extra information.
  • I could use --color=always for rg and --ansi for fzf, but I dont like it that the matches are highlighted by rg as well.

0phoff avatar Nov 22 '21 18:11 0phoff