Skip to content

How to exclude extension from printed path #2988

Answered by BurntSushi
QuAzI asked this question in Q&A
Discussion options

You must be logged in to vote

You need to post-process it. ripgrep doesn't come with infinite flexibility for controlling its output. Instead, you're expected to use shell pipelines to modify it. Or, if you really need to, you can use the --json flag and completely control how it's shown.

e.g., rg blah | rg '^(.*)\.md$' -or '$1'.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants