How to exclude extension from printed path #2988
-
For example, I have daily notes in Obsidian with h2 headers (##), at the end of the week I need some summary in simple readable format like $ rg -N --sort path '^(#+\s+)' -g '2025-02-{10,11,12,13,14}.md' -r ' '
2025-02-10.md
## Some topic for monday
## Second task
### Sub-task
2025-02-11.md
## Some topic for next day
2025-02-12.md
## It Wednesday, my dudes... But I need it without extensions |
Beta Was this translation helpful? Give feedback.
Answered by
BurntSushi
Feb 14, 2025
Replies: 1 comment
-
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 e.g., |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
BurntSushi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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'
.