Add json output flag (#139)

This commit is contained in:
Dave G
2022-07-05 00:11:00 -04:00
committed by GitHub
parent 3df07dc65e
commit 260ef74d4e
7 changed files with 148 additions and 57 deletions

View File

@@ -12,8 +12,9 @@
- [View Hot Deals](#view-hot-deals)
- [View and Sort Hot Deals](#view-and-sort-hot-deals)
- [Search](#search)
- [Advanced](#advanced)
- [Regex](#regex)
- [View Posts](#view-posts)
- [JSON Output](#json-output)
- [Shell Completion](#shell-completion)
- [bash](#bash)
- [zsh](#zsh)
@@ -47,7 +48,6 @@ If you have [brew](https://brew.sh):
brew install davegallant/public/rfd
```
## Usage
All commands open up in a [terminal pager](https://en.wikipedia.org/wiki/Terminal_pager).
@@ -93,7 +93,7 @@ rfd threads --sort-by views --pages 10
rfd search 'pizza'
```
#### Advanced
#### Regex
Regular expressions can be used for search.
@@ -111,6 +111,16 @@ rfd posts https://forums.redflagdeals.com/kobo-vs-kindle-2396227/
This allows for easy grepping and searching for desired expressions.
### JSON Output
All commands support JSON output.
For example:
```sh
rfd threads --output json
```
## Shell Completion
Shell completion can be enabled if using `bash` or `zsh`.