You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ git -C 'testing/zet/zettels' grep -Ii --heading --break --all-match -e '^#\s.*' --or -e 'hello'
20211016205158/README.md
# Zet test entry
Hello there!
20211016223643/README.md
# Another zet test entry
Hello everyone
^#\s.* symbolizes the zettel title. --or is used to provide git grep with multiple patterns, and --all-match has to be used, because otherwise all zettels would be matched (because every zettel contains a title).
The side effect of this approach is the fact that the first line is colored as matched (i.e. full red), but I don't see another way without messing with git grep output in Python, which I'd like to avoid.
Because of that, this should be rather an optional flag rather than a normal behavior.
The text was updated successfully, but these errors were encountered:
It is possible by using some
git grep
flags:^#\s.*
symbolizes the zettel title.--or
is used to providegit grep
with multiple patterns, and--all-match
has to be used, because otherwise all zettels would be matched (because every zettel contains a title).The side effect of this approach is the fact that the first line is colored as matched (i.e. full red), but I don't see another way without messing with
git grep
output in Python, which I'd like to avoid.Because of that, this should be rather an optional flag rather than a normal behavior.
The text was updated successfully, but these errors were encountered: