-
-
Notifications
You must be signed in to change notification settings - Fork 336
Closed
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Please read the FAQ for the bug you encountered.
- I have read the existing FAQ
⏯ 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=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:
�[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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request