Visual Studio output format #1994
-
Uniquely to VS output is the formatting of the line number between (). This allows double-clicking on the output line in order to open the file and go to the line number. For example:
It was suggested to pipe the regular output to 'sed', or format as json and parse outpur, but it may be easier to implement this internally. There is an option to replace the ':', but it's not sufficient because VS needs a different opening and closing character. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
See:
TL;DR - #665 is a possible way of solving this, but I don't think it's ripgrep's place to provide infinite flexibility in its output format. Tools like Visual Studio should consider adapting to the grep format convention that has existed for decades. |
Beta Was this translation helpful? Give feedback.
-
if [[ "$TERM_PROGRAM" == 'vscode' ]]; then
alias 'rg'='rg --smart-case --hidden --no-heading --column'
else
alias 'rg'='rg --smart-case --hidden'
fi command+click'ing on rg Registered
internal/server/server.go:138:15: log.Println("Registered routes:") |
Beta Was this translation helpful? Give feedback.
See:
TL;DR - #665 is a possible way of solving this, but I don't think it's ripgrep's place to provide infinite flexibility in its output format. Tools like Visual Studio should consider adapting to the grep format convention that has existed for decades.