KarlHeitmann / KarlHeitmann/rg_wrapper

When a `rg` command is run, display the results in the same version of `rg` without `--json` flag

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Rust
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

This issue is blocked by #3

Currently, when an `rg` command is run, we can see it's output with the `--json` flag.

The `--json` flag is pretty useful FOR THE COMPUTER: the computer can read the data, parse it, and later on do some cool stuff with that parsed data. But for an human the format is AWFUL.

The easy way to run the command for the computer and for the user. Is to run the command the first time with the `--json` flag, the program will read the data and store the information like described on #3 , and run it a second time without the `--json` flag, take the output and show it directly to the user.

What would be really cool (and save an unnecesary second call to the OS, imagine you are running the command in a folder with hundreds of thousands of files), would be to run the command only once, and adapt the Struct generated by parsing the `json` data, and add a function to the Struct to display the data on a human friendly format.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.