Skip to content

Commit 746bc4b

Browse files
committed
docs(readme, license): formatting cleanups
1 parent 4ee118a commit 746bc4b

File tree

2 files changed

+55
-17
lines changed

2 files changed

+55
-17
lines changed

LICENSE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# MIT Licence
1+
# MIT License
22

3-
Copyright (c) Ben Elan
3+
Copyright (c) 2023 Ben Elan
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 53 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,39 @@ An fzf wrapper around the GitHub CLI.
1212
- [`run`](#run)
1313
- [Configuration](#configuration)
1414
- [Related projects](#related-projects)
15-
<!--toc:end-->
15+
16+
<!--toc:end-->
1617

1718
## Installation
1819

19-
1. Install [`gh`](https://github.com/cli/cli#installation) and [`fzf`](https://github.com/junegunn/fzf#installation) if you don't already have them. For example:
20+
1. Install [`gh`](https://github.com/cli/cli#installation) and
21+
[`fzf`](https://github.com/junegunn/fzf#installation) if you don't already have
22+
them. For example:
2023
- **Homebrew:** `brew install gh fzf`
2124
- **DNF:** `sudo dnf install gh fzf`
2225
- ... see the links above for other package managers
2326
2. Authenticate with the GitHub CLI: `gh auth login`
2427
3. Install the extension: `gh extension install benelan/gh-fzf`
2528
4. [???](#usage)
26-
5. PROFIT
29+
5. **PROFIT**
2730

2831
## Usage
2932

3033
```sh
3134
gh fzf <command> [flags]
3235
```
3336

34-
The extension adds a new command that wraps GitHub's "list" subcommands with fzf to make them fuzzy findable. All of the arguments after `<command>` are passed directly to `gh`. Because of the way shell works, you need to escape quotes required by GitHub, e.g. [strings with whitespace](https://docs.github.com/en/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#use-quotation-marks-for-queries-with-whitespace). There are example usages for each command in the sections below.
37+
This extension adds a new command that wraps GitHub's "list" subcommands with
38+
fzf to make them fuzzy findable. All of the arguments after `<command>` are
39+
passed directly to `gh`. Because of the way shell works, you need to escape
40+
quotes required by GitHub, e.g.
41+
[strings with whitespace](https://docs.github.com/en/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#use-quotation-marks-for-queries-with-whitespace).
42+
There are example usages for each command in the sections below.
3543

36-
A preview of the current selection is displayed when navigating through the resulting list. Each command has keybindings to further filter the list or to call other `gh` subcommands on the item. There are also a few global keybindings that can be used with any `gh fzf` command:
44+
A preview of the current selection is displayed when navigating through the
45+
resulting list. Each command has keybindings to further filter the list or to
46+
call other `gh` subcommands on the item. There are also a few global
47+
keybindings that can be used with any `gh fzf` command:
3748

3849
- `ctrl-o`: Open the selected item in the browser
3950
- `ctrl-y`: Copy the selected item's URL to the clipboard
@@ -58,8 +69,17 @@ A preview of the current selection is displayed when navigating through the resu
5869
- `alt-m`: Filter the list, showing issues where you are mentioned
5970
- `alt-s`: Filter the list, showing issues with any state (open or closed)
6071
- **Examples:**
61-
- `gh fzf issue --assignee @me --milestone "v1.33.7" --state all`: Filter the initial list to open and closed issues assigned to you in the "v1.33.7" milestone.
62-
- `gh fzf i -S \'no:assignee label:\"good first issue\" milestone:backburner'`: Filter the initial list to issues with the "good first issue" label, no assignee, and in the "backburner" milestone. Uses [GitHub's search syntax](https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests).
72+
- Filter the initial list to open and closed issues assigned to you in the
73+
"v1.33.7" milestone:
74+
```sh
75+
gh fzf issue --assignee @me --milestone "v1.33.7" --state all
76+
```
77+
- Filter the initial list to issues with the "good first issue" label,
78+
no assignee, and in the "backburner" milestone. Uses
79+
[GitHub's search syntax](https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests):
80+
```sh
81+
gh fzf i -S \'no:assignee label:\"good first issue\" milestone:backburner\'
82+
```
6383
6484
### `pr`
6585
@@ -80,10 +100,20 @@ A preview of the current selection is displayed when navigating through the resu
80100
- `alt-a`: Filter the list, showing pull requests assigned to you
81101
- `alt-A`: Filter the list, showing pull requests authored by you
82102
- `alt-b`: Filter the list, showing pull requests from the current branch
83-
- `alt-s`: Filter the list, showing pull requests with any state (open, closed, or merged)
103+
- `alt-s`: Filter the list, showing pull requests with any state
104+
(open, closed, or merged)
84105
- **Examples:**
85-
- `gh fzf pr --state merged --author @me --label \"breaking change\"`: Filter the initial list to your merged pull requests with the "breaking change" label
86-
- `gh fzf p -S \'merged:">=2023-01-01" \"breaking change\" in:body author:@me\'`: Filter the initial list to your pull requests merged since the beginning of 2023 that have "breaking change" in the body. Uses [GitHub's search syntax](https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests).
106+
- Filter the initial list to your merged pull requests with the
107+
"breaking change" label:
108+
```sh
109+
gh fzf pr --state merged --author @me --label \"breaking change\"
110+
```
111+
- Filter the initial list to your pull requests merged since the beginning
112+
of 2023 that have "breaking change" in the body. Uses
113+
[GitHub's search syntax](https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests):
114+
```sh
115+
gh fzf p -S \'merged:">=2023-01-01" \"breaking change\" in:body author:@me\'
116+
```
87117
88118
### `run`
89119
@@ -99,8 +129,14 @@ A preview of the current selection is displayed when navigating through the resu
99129
- `alt-u`: Filter the list, showing runs triggered by you
100130
- `alt-f`: Filter the list, showing failed runs
101131
- **Examples:**
102-
- `gh fzf run --workflow test`: Filter the initial list to runs for the "test" workflow.
103-
- `gh fzf r -b main -s failure`: Filter the initial list to failed runs on the main branch.
132+
- Filter the initial list to runs for the "test" workflow.
133+
```sh
134+
gh fzf run --workflow test
135+
```
136+
- Filter the initial list to failed runs on the main branch.
137+
```sh
138+
gh fzf r -b main -s failure
139+
```
104140
105141
## Configuration
106142
@@ -114,10 +150,12 @@ Environment variables are used to configure different options in `gh-fzf`.
114150
115151
## Related projects
116152
117-
- [`gh-f`](https://github.com/gennaro-tedesco/gh-f): another `fzf` wrapper around `gh`, which also provides some `git` functionality.
153+
- [`gh-f`](https://github.com/gennaro-tedesco/gh-f):
154+
another `fzf` wrapper around `gh`, which also provides some `git` functionality.
118155
119-
**NOTE:** `gh-fzf` leaves `git` functionality to other tools, and instead focuses on providing more keybindings for the GitHub commands.
120-
The following `fzf` wrappers around `git` are both good options to bridge that gap:
156+
**NOTE:** `gh-fzf` leaves `git` functionality to other tools, and instead
157+
focuses on providing more keybindings for the GitHub commands. The following
158+
`fzf` wrappers around `git` are both good options to bridge that gap:
121159
122160
- [`forgit`](https://github.com/wfxr/forgit) (I use this one)
123161
- [`git-fuzzy`](https://github.com/bigH/git-fuzzy)

0 commit comments

Comments
 (0)