telescope-project.nvim
telescope-project.nvim copied to clipboard
Use `gsub` to remove ansi-rgb term output after getting `git_root` from `vim.fn.systemlist`
Currently, I am running into a problem that the path of the added project is after some color sequence coding:
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: