3 ms·
Is there a way to get the results inline? e.g. first filename, then line number then the matched string? I don't want the filename, newline, matches syntax.
by apples_oranges 7y ago
Is there a way to get the results inline? e.g. first filename, then line number then the matched string? I don't want the filename, newline, matches syntax.
- yorwba 7y agoYou might want to use the --vimgrep option: Show results with every match on its own line, including line numbers and column numbers. With this option, a line with more than one match will be printed more than once.
- apples_oranges 7y agoThanks, this works, I didn't see that option. --no-heading is also useful. (other comment)
- burntsushi 7y agoMy sibling comment suggested --vimgrep, but that will print each match on its own line. For example: $ echo foofoo | rg foo --vimgrep <stdin>:1:1:foofoo <stdin>:1:4:foofoo What you want is probably `--no-heading`. You can add it to a config file or an alias if you always want it enabled: https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#configuration-file https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#c...
- apples_oranges 7y agothat's it, thank you!