mirror of
https://github.com/davegallant/rfd.git
synced 2025-08-06 00:33:40 +00:00
Add --sort-by flag to threads sub-command (#75)
* Add --sort-by flag to threads sub-command * Add some sanity test commands to tox
This commit is contained in:
44
README.md
44
README.md
@@ -5,7 +5,6 @@ Hot deals on the command line.
|
||||
[](https://travis-ci.org/davegallant/rfd)
|
||||
[](https://badge.fury.io/py/rfd)
|
||||
[](https://dependabot.com/)
|
||||
[](https://lgtm.com/projects/g/davegallant/rfd/alerts/)
|
||||
[](https://lgtm.com/projects/g/davegallant/rfd/context:python)
|
||||
|
||||
|
||||
@@ -37,29 +36,46 @@ Commands:
|
||||
|
||||
## Examples
|
||||
|
||||
### view hot deals
|
||||
```shell
|
||||
rfd threads
|
||||
### View Hot Deals
|
||||
```console
|
||||
$ rfd threads
|
||||
```
|
||||
|
||||
### search for pizza
|
||||
```shell
|
||||
rfd search 'pizza'
|
||||
### View and Sort Hot Deals
|
||||
|
||||
```console
|
||||
$ rfd threads --sort-by score
|
||||
```
|
||||
|
||||
## Tab Completion
|
||||
```console
|
||||
$ rfd threads --sort-by total_views --limit 40
|
||||
```
|
||||
|
||||
To enable:
|
||||
### Simple Search
|
||||
```console
|
||||
$ rfd search 'pizza'
|
||||
```
|
||||
|
||||
### RegEx Search
|
||||
|
||||
Regular expressions can be used for search.
|
||||
|
||||
```console
|
||||
$ rfd search '(coffee|starbucks)' --num-pages 100
|
||||
```
|
||||
|
||||
## Shell Completion
|
||||
|
||||
Completion can be enabled if using `bash` or `zsh`.
|
||||
|
||||
### bash
|
||||
|
||||
```bash
|
||||
echo 'eval "$(_RFD_COMPLETE=source rfd)"' >> ~/.profile
|
||||
```console
|
||||
$ echo 'eval "$(_RFD_COMPLETE=source rfd)"' >> ~/.profile
|
||||
```
|
||||
|
||||
### zsh
|
||||
|
||||
|
||||
```zsh
|
||||
echo 'eval "$(_RFD_COMPLETE=source_zsh rfd)"' >> ~/.zshrc
|
||||
```console
|
||||
$ echo 'eval "$(_RFD_COMPLETE=source_zsh rfd)"' >> ~/.zshrc
|
||||
```
|
||||
|
Reference in New Issue
Block a user