Skip to content

Commit

Permalink
docs: Update GH_NOTIFY_FZF_OPTS description and usage
Browse files Browse the repository at this point in the history
  • Loading branch information
LangLangBart committed Jul 17, 2024
1 parent d83baf0 commit a6835a8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gh-notify
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,10 @@ select_notif() {
# a failed 'print_notifs' call, but does not display the message.

# See the man page (man fzf) for an explanation of the arguments.

output=$(
SHELL="$(which bash)" command fzf \
# shellcheck disable=SC2086
SHELL="$(which bash)" command fzf ${GH_NOTIFY_FZF_OPTS:-} \
--ansi \
--bind "${GH_NOTIFY_RESIZE_PREVIEW_KEY}:change-preview-window(75%:nohidden|75%:down:nohidden:border-top|nohidden)" \
--bind "change:first" \
Expand Down
11 changes: 11 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,17 @@ export FZF_DEFAULT_OPTS="
--bind 'ctrl-w:preview-half-page-up,ctrl-s:preview-half-page-down'"
```

#### GH_NOTIFY_FZF_OPTS
This environment variable lets you specify additional options and key bindings to customize the
search and display of notifications. Unlike `FZF_DEFAULT_OPTS`, `GH_NOTIFY_FZF_OPTS` specifically
applies to the `gh notify` extension.

```sh
# --exact: Enables exact matching instead of fuzzy matching.
GH_NOTIFY_FZF_OPTS="--exact" gh notify
```

#### Modifying Keybindings
You can also customize the keybindings created by this extension to avoid conflicts with
the ones defined by `fzf`. For example, change `ctrl-p` to `ctrl-u`:

Expand Down

0 comments on commit a6835a8

Please sign in to comment.