Is there a grep tool that shows context based on indentation? For each match, I would like to see all the most recent lines with a lower indent level, but skip all the lines at the same indent level in between. Example:
$ contextgrep rstrip pep8.py
class Checker(object):
def check_logical(self):
if self.verbose >= 2:
print(self.logical_line[:80].rstrip())
Here's a blog post about a literal Haskell implementation of "outline grep".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With