Please read the FAQ for the bug you encountered.
⏯ Playground Link
https//not-applicable-to-this-issue
💻 Code
It might be a regression, but even with the latest release, sg does not seem to respect --color=never.
sg run --pattern 'garbage rule$A$B' --lang typescript --color=never
I am seeing this problem because the neovim plugin I maintain (https://github.com/MagicDuck/grug-far.nvim) needs to call astgrep with --color=never.
🙁 Actual behavior
Notice the colors in the output
If I redirect stderr to a file and edit it with nvim, I see the color codes:
�[31mError:�[0m �[1mCannot parse query as a valid pattern.�[0m
�[34mHelp:�[0m The pattern either fails to parse or contains error. Please refer to pattern syntax guide.
�[1;2mSee also:�[0m �]8;;https://ast-grep.github.io/guide/pattern-syntax.html�\�[3;36mhttps://ast-grep.github.io/guide/pattern-syntax.html�[0m�]8;;�\
�[31m✖�[0m Caused by
�[31m╰▻�[0m Multiple AST nodes are detected. Please check the pattern source `garbage rule$A$B`.
🙂 Expected behavior
no colors
Additional information about the issue
No response
Please read the FAQ for the bug you encountered.
⏯ Playground Link
https//not-applicable-to-this-issue
💻 Code
It might be a regression, but even with the latest release,
sgdoes not seem to respect--color=never.sg run --pattern 'garbage rule$A$B' --lang typescript --color=neverI am seeing this problem because the neovim plugin I maintain (https://github.com/MagicDuck/grug-far.nvim) needs to call astgrep with
--color=never.🙁 Actual behavior
Notice the colors in the output
If I redirect stderr to a file and edit it with nvim, I see the color codes:
🙂 Expected behavior
no colors
Additional information about the issue
No response