laloch / xontrib-fzf-widgets

Set of fzf widgets for xonsh
GNU General Public License v3.0
33 stars 18 forks source link

Display error when searching directories #2

Closed arkhan closed 4 years ago

arkhan commented 4 years ago

Greetings, great work.

It works wonderfully, but when trying to find Files or Directories it tries to show the colors, and this gives a bad display of the directory name, this can be seen in the attached image

img-2020-06-04-214250

Thanks

laloch commented 4 years ago

Hi @arkhan, thanks for reporting! What are your $fzf_find_command and $FZF_DEFAULT_COMMAND?

laloch commented 4 years ago

See https://github.com/laloch/xontrib-fzf-widgets/blob/master/README.rst#troubleshooting for explanation.

arkhan commented 4 years ago

Hi @arkhan, thanks for reporting! What are your $fzf_find_command and $FZF_DEFAULT_COMMAND? I have this:

img-2020-06-05-090739

and not set $FZF_DEFAULT_COMMAND

Thanks

laloch commented 4 years ago

OK, that's strange, because fd should by default (it does for me) recognize, that its output is being piped to fzf and turn the coloring off. However, you have two options:

  1. Turn the colors off by setting
    $fzf_find_command = "fd --color never"
    $fzf_find_dirs_command = "fd --color never -t d"
  2. Make fzf use the colored output by appending --ansi argument to $FZF_DEFAULT_OPTS. I, for instance, have
    $FZF_DEFAULT_OPTS = "--tiebreak=index --ansi --border"
arkhan commented 4 years ago

Great, thank you very much now it works perfectly