telescope-project.nvim icon indicating copy to clipboard operation
telescope-project.nvim copied to clipboard

Use `gsub` to remove ansi-rgb term output after getting `git_root` from `vim.fn.systemlist`

Open TonyWu20 opened this issue 2 years ago • 0 comments

Currently, I am running into a problem that the path of the added project is after some color sequence coding: image Maybe it is due to my $COLORTERM='truecolor'. Part of my :checkhealth:

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=^H
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
  - INFO: $TERM_PROGRAM='WezTerm'
  - INFO: $COLORTERM='truecolor'

So I go to try_and_find_git_path in util.lua, use gsub to remove the whole color sequence, which could be invisible on github rendering since it contains the ascii control sequence. They are displayed as "^[" (esc) and "^G" in my neovim: image

TonyWu20 avatar Jun 30 '22 06:06 TonyWu20