Skip to content

Commit 9bd4e16

Browse files
version v0.0.0
1 parent 8a624b7 commit 9bd4e16

File tree

2 files changed

+35
-14
lines changed

2 files changed

+35
-14
lines changed

README.md

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,25 @@
2626
Search GitHub repositories interactively from the command line. Start the prompt and browse the results! The name of that repository 🤔? Written in rust, a list of awesome projects...
2727

2828
...well say no more:
29+
2930
```
3031
gh s -l rust -d list
3132
```
3233

3334
<img alt="example_image" src="https://user-images.githubusercontent.com/15387611/151635859-4a8a2200-b000-4e03-888a-2dc8ddcef009.png">
3435

3536
## Installation
37+
3638
```
3739
gh extension install gennaro-tedesco/gh-s
3840
```
41+
3942
This being a `gh` extension, you of course need [gh cli](https://github.com/cli/cli) as prerequisite.
4043

4144
## Usage
45+
4246
Get started!
47+
4348
```
4449
gh s
4550
```
@@ -49,40 +54,56 @@ gh s
4954
...or do you prefer a [full YouTube video](https://www.youtube.com/watch?v=JbG_mLsbw24) on the topic?
5055

5156
Without any argument (or with flags only) `gh s` starts a prompt to insert the search query; after the search a list of results is shown. Navigate the list to show details, stars counts, URL and more. If instead you want to do all in one line
57+
5258
```
5359
gh s [search] [flag]
5460
```
61+
5562
takes one of the following arguments or flags
5663

57-
| flags | description | multiple | example |
64+
| flags | description | multiple | example |
5865
| :------------ | :----------------------------------------------- | :-------- | :--------------------------- |
59-
| -E, --empty | do not prompt for name, search by flags only | no | gh s -E -l go -l rust |
60-
| -l, --lang | narrow down the search to a specific language | yes (OR) | gh s prompt -l go -l lua |
61-
| -d, --desc | search for keyword in the repository description | no | gh s neovim -d plugin |
62-
| -u, --user | restrict the search to a specific user | no | gh s lsp -u neovim |
63-
| -t, --topic | narrow down the search to specific topics | yes (AND) | gh s lsp -t plugin -t neovim |
64-
| -c, --colour | change colour of the prompt | no | gh s nvim -c magenta |
65-
| -L, --limit | limit the number of results (default 20) | no | gh s nvim -L 3 |
66-
| -h, --help | show the help page | no | gh s -h |
67-
| -V, --version | print the current version | no | gh s -V |
66+
| -E, --empty | do not prompt for name, search by flags only | no | gh s -E -l go -l rust |
67+
| -l, --lang | narrow down the search to a specific language | yes (OR) | gh s prompt -l go -l lua |
68+
| -d, --desc | search for keyword in the repository description | no | gh s neovim -d plugin |
69+
| -u, --user | restrict the search to a specific user | no | gh s lsp -u neovim |
70+
| -t, --topic | narrow down the search to specific topics | yes (AND) | gh s lsp -t plugin -t neovim |
71+
| -c, --colour | change colour of the prompt | no | gh s nvim -c magenta |
72+
| -L, --limit | limit the number of results (default 20) | no | gh s nvim -L 3 |
73+
| -h, --help | show the help page | no | gh s -h |
74+
| -V, --version | print the current version | no | gh s -V |
6875

6976
The prompt accepts the following navigation commands:
7077

71-
| key | description |
78+
| key | description |
7279
| :------------- | :---------------------------------------- |
73-
| arrow keys | browse results list |
74-
| `/` | toggle search in results list |
80+
| arrow keys | browse results list |
81+
| `/` | toggle search in results list |
7582
| `enter (<CR>)` | print selected repository URL to `stdout` |
7683

7784
### Search by topic or language only
85+
7886
`gh-s` allows to skip prompting for a repository name by passing the `-E` flag; this in turn implies that the query searches against all possible GitHub repositories, which may result in longer response times. Notice furthermore that `-E` must always be accompanied by at least another non-empty flag. Use with care, however it does allow for some interesting statistics or general curiosity: check the [Wiki](https://github.com/gennaro-tedesco/gh-s/wiki/Common-queries)!
7987

8088
### Execute commands
89+
8190
`gh-s` must be intended as a filter prompt returning the URL of the selection; as such, the best and most flexible way to execute commands with the results is to pipe it into and from `stdin/stdout`. Have a look at the [Wiki](https://github.com/gennaro-tedesco/gh-s/wiki/Execute-commands) for some common examples!
8291

92+
## Release versions
93+
94+
Releases are obtained via [goreleaser](https://goreleaser.com/) and the available architectures are defined in [.goreleaser.yml](https://github.com/gennaro-tedesco/gh-s/blob/master/.goreleaser.yml). To locally test the release workflow
95+
96+
```bash
97+
goreleaser check
98+
goreleaser healthcheck
99+
goreleaser release --snapshot --skip=publish --clean
100+
```
101+
83102
## Feedback
103+
84104
If you find this application useful consider awarding it a ⭐, it is a great way to give feedback! Otherwise, any additional suggestions or merge request is warmly welcome!
85105

86106
See also the complete family of extensions
107+
87108
- [gh-i](https://github.com/gennaro-tedesco/gh-i) to search for github issues with interactive prompt
88109
- [gh-f](https://github.com/gennaro-tedesco/gh-f) to snap around your git worfklow with `fzf`

cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
var cfgFile string
1111

1212
// VERSION number: change manually
13-
const VERSION = "0.0.8"
13+
const VERSION = "0.0.9"
1414

1515
var rootCmd = &cobra.Command{
1616
Use: "gh-s",

0 commit comments

Comments
 (0)