From a9a9ec80b5e697ec0bbba4c99078270a2c3f43e7 Mon Sep 17 00:00:00 2001 From: Jakub Kuczys <6032823+jack1142@users.noreply.github.com> Date: Fri, 20 May 2022 10:57:42 +0200 Subject: [PATCH] Support the short pretty flag (-p) in hyperlinked_grep kitten --- kittens/hyperlinked_grep/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kittens/hyperlinked_grep/main.py b/kittens/hyperlinked_grep/main.py index 00dbefd33..f9f30f489 100644 --- a/kittens/hyperlinked_grep/main.py +++ b/kittens/hyperlinked_grep/main.py @@ -20,7 +20,7 @@ def write_hyperlink(write: Callable[[bytes], None], url: bytes, line: bytes, fra def main() -> None: - if not sys.stdout.isatty() and '--pretty' not in sys.argv: + if not sys.stdout.isatty() and '--pretty' not in sys.argv and '-p' not in sys.argv: os.execlp('rg', 'rg', *sys.argv[1:]) cmdline = ['rg', '--pretty', '--with-filename'] + sys.argv[1:] try: