diff --git a/gh-notify b/gh-notify index 53b439d..64fb759 100755 --- a/gh-notify +++ b/gh-notify @@ -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" \ diff --git a/readme.md b/readme.md index 11c65c9..9a08098 100644 --- a/readme.md +++ b/readme.md @@ -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`: