Support the short pretty flag (-p) in hyperlinked_grep kitten
This commit is contained in:
parent
eb84990f5a
commit
a9a9ec80b5
@ -20,7 +20,7 @@ def write_hyperlink(write: Callable[[bytes], None], url: bytes, line: bytes, fra
|
|||||||
|
|
||||||
|
|
||||||
def main() -> None:
|
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:])
|
os.execlp('rg', 'rg', *sys.argv[1:])
|
||||||
cmdline = ['rg', '--pretty', '--with-filename'] + sys.argv[1:]
|
cmdline = ['rg', '--pretty', '--with-filename'] + sys.argv[1:]
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user