|
26 | 26 | 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... |
27 | 27 |
|
28 | 28 | ...well say no more: |
| 29 | + |
29 | 30 | ``` |
30 | 31 | gh s -l rust -d list |
31 | 32 | ``` |
32 | 33 |
|
33 | 34 | <img alt="example_image" src="https://user-images.githubusercontent.com/15387611/151635859-4a8a2200-b000-4e03-888a-2dc8ddcef009.png"> |
34 | 35 |
|
35 | 36 | ## Installation |
| 37 | + |
36 | 38 | ``` |
37 | 39 | gh extension install gennaro-tedesco/gh-s |
38 | 40 | ``` |
| 41 | + |
39 | 42 | This being a `gh` extension, you of course need [gh cli](https://github.com/cli/cli) as prerequisite. |
40 | 43 |
|
41 | 44 | ## Usage |
| 45 | + |
42 | 46 | Get started! |
| 47 | + |
43 | 48 | ``` |
44 | 49 | gh s |
45 | 50 | ``` |
|
49 | 54 | ...or do you prefer a [full YouTube video](https://www.youtube.com/watch?v=JbG_mLsbw24) on the topic? |
50 | 55 |
|
51 | 56 | 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 | + |
52 | 58 | ``` |
53 | 59 | gh s [search] [flag] |
54 | 60 | ``` |
| 61 | + |
55 | 62 | takes one of the following arguments or flags |
56 | 63 |
|
57 | | -| flags | description | multiple | example | |
| 64 | +| flags | description | multiple | example | |
58 | 65 | | :------------ | :----------------------------------------------- | :-------- | :--------------------------- | |
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 | |
68 | 75 |
|
69 | 76 | The prompt accepts the following navigation commands: |
70 | 77 |
|
71 | | -| key | description | |
| 78 | +| key | description | |
72 | 79 | | :------------- | :---------------------------------------- | |
73 | | -| arrow keys | browse results list | |
74 | | -| `/` | toggle search in results list | |
| 80 | +| arrow keys | browse results list | |
| 81 | +| `/` | toggle search in results list | |
75 | 82 | | `enter (<CR>)` | print selected repository URL to `stdout` | |
76 | 83 |
|
77 | 84 | ### Search by topic or language only |
| 85 | + |
78 | 86 | `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)! |
79 | 87 |
|
80 | 88 | ### Execute commands |
| 89 | + |
81 | 90 | `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! |
82 | 91 |
|
| 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 | + |
83 | 102 | ## Feedback |
| 103 | + |
84 | 104 | 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! |
85 | 105 |
|
86 | 106 | See also the complete family of extensions |
| 107 | + |
87 | 108 | - [gh-i](https://github.com/gennaro-tedesco/gh-i) to search for github issues with interactive prompt |
88 | 109 | - [gh-f](https://github.com/gennaro-tedesco/gh-f) to snap around your git worfklow with `fzf` |
0 commit comments