diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 171b202..0b8b1ac 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -7,12 +7,12 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/crate-ci/typos
- rev: v1.26.0
+ rev: v1.28.3
hooks:
- id: typos
args: [--format, brief, --write-changes, --force-exclude]
- repo: https://github.com/tcort/markdown-link-check
- rev: v3.12.2
+ rev: v3.13.6
hooks:
- id: markdown-link-check
name: markdown link check
@@ -23,7 +23,7 @@ repos:
- id: shellcheck
args: [--external-source, --norc]
- repo: https://github.com/scop/pre-commit-shfmt
- rev: v3.9.0-1
+ rev: v3.10.0-2
hooks:
- id: shfmt
args: [--simplify, --indent, '0', --case-indent, --write]
@@ -32,7 +32,7 @@ repos:
hooks:
- id: yamlfix
- repo: https://github.com/crate-ci/typos
- rev: v1.26.0
+ rev: v1.28.3
hooks:
- id: typos
name: detect typos in commit message
@@ -46,7 +46,7 @@ repos:
args: [--ignore, body-is-missing, --msg-filename]
stages: [commit-msg]
- repo: https://github.com/commitizen-tools/commitizen
- rev: v3.29.1
+ rev: v4.1.0
hooks:
- id: commitizen
name: check commit message structure
diff --git a/gh-find-code b/gh-find-code
index be2f0cd..d01f589 100755
--- a/gh-find-code
+++ b/gh-find-code
@@ -366,7 +366,7 @@ ${WHITE_BOLD}Hotkeys${COLOR_RESET}
${GREEN_NORMAL}? ${COLOR_RESET} toggle help
${GREEN_NORMAL}${GHFC_OPEN_BROWSER_KEY} ${COLOR_RESET} open the file in the browser
${GREEN_NORMAL}${GHFC_OPEN_EDITOR_KEY} ${COLOR_RESET} open the file content in the editor
- ${GREEN_NORMAL}${GHFC_FILTER_BY_REPO_KEY} ${COLOR_RESET} replace query with "repo:owner/name"
+ ${GREEN_NORMAL}${GHFC_FILTER_BY_REPO_KEY} ${COLOR_RESET} prepend "repo:{owner/name}" to the query
${GREEN_NORMAL}${GHFC_RELOAD_KEY} ${COLOR_RESET} reload with up to 100 results
${GREEN_NORMAL}${GHFC_TOGGLE_HISTORY_KEY}${COLOR_RESET} toggle command history
${GREEN_NORMAL}${GHFC_TOGGLE_FUZZY_SEARCH_KEY} ${COLOR_RESET} toggle between Code and Fuzzy search
@@ -1015,7 +1015,7 @@ main() {
# solution is needed to address this complexity.
fzf_basic_style \
--bind "change:first+reload:command sleep 0.5; gh_query" \
- --bind "resize:transform:preview_transformer" \
+ --bind "resize:transform(preview_transformer)+refresh-preview" \
--bind "start:reload:gh_query" \
--bind "?:transform:[[ ! \$FZF_PROMPT =~ \"$fzf_prompt_helpABC\" ]] &&
echo 'change-prompt($fzf_prompt_helpABC)+change-preview-window(~0:+1)+change-preview:print_help_text' ||
@@ -1024,7 +1024,7 @@ main() {
--bind "${GHFC_OPEN_EDITOR_KEY}:transform:[[ \$FZF_MATCH_COUNT -ge 1 && \${EDITOR##*/} =~ ^(code|codium)$ ]] &&
echo 'execute-silent:open_in_editor=true \view_contents \{}' ||
echo 'execute:open_in_editor=true \view_contents \{}'" \
- --bind "${GHFC_FILTER_BY_REPO_KEY}:transform-query:echo repo:{4}" \
+ --bind "${GHFC_FILTER_BY_REPO_KEY}:transform-query:echo repo:{4} \$FZF_QUERY" \
--bind "${GHFC_RELOAD_KEY}:reload:gh_user_limit=100 gh_query" \
--bind "${GHFC_TOGGLE_HISTORY_KEY}:execute:view_history_commands" \
--bind "${GHFC_TOGGLE_FUZZY_SEARCH_KEY}:transform:[[ ! \$FZF_PROMPT == \"$fzf_prompt_fuzzyAB\" ]] &&
diff --git a/readme.md b/readme.md
index 3dc0f27..be1662c 100644
--- a/readme.md
+++ b/readme.md
@@ -46,19 +46,19 @@ gh find-code [Flags] [Search query]
| `-l` | limit the number of listed results (default 30, max 100) |
| `-h` | help |
-| Key Bindings fzf | Description |
-| ------------------------------- | ------------------------------------ |
-| ? | toggle help |
-| ctrlb | open the file in the browser |
-| ctrlo | open the file content in the editor |
-| ctrlp | replace query with "repo:owner/name" |
-| ctrlr | reload with up to 100 results |
-| ctrlspace | toggle command history |
-| ctrlt | toggle between Code and Fuzzy search |
-| ctrlx | open the search query in the browser |
-| enter | open the file in the pager |
-| tab | toggle the file preview |
-| esc | quit |
+| Key Bindings fzf | Description |
+| ------------------------------- | ---------------------------------------- |
+| ? | toggle help |
+| ctrlb | open the file in the browser |
+| ctrlo | open the file content in the editor |
+| ctrlp | prepend "repo:{owner/name}" to the query |
+| ctrlr | reload with up to 100 results |
+| ctrlspace | toggle command history |
+| ctrlt | toggle between Code and Fuzzy search |
+| ctrlx | open the search query in the browser |
+| enter | open the file in the pager |
+| tab | toggle the file preview |
+| esc | quit |
---
@@ -114,17 +114,17 @@ GHFC_FILTER_BY_REPO_KEY="ctrl-u" gh find-code
> man fzf | less --pattern "AVAILABLE KEYS"
> ```
-| Variable | Purpose | Default |
-| ------------------------------ | ------------------------------------ | ------------ |
-| `GHFC_OPEN_BROWSER_KEY` | open the file in the browser | `ctrl-b` |
-| `GHFC_OPEN_EDITOR_KEY` | open the file content in the editor | `ctrl-o` |
-| `GHFC_FILTER_BY_REPO_KEY` | replace query with "repo:owner/name" | `ctrl-p` |
-| `GHFC_RELOAD_KEY` | reload with up to 100 results | `ctrl-r` |
-| `GHFC_TOGGLE_HISTORY_KEY` | toggle command history | `ctrl-space` |
-| `GHFC_TOGGLE_FUZZY_SEARCH_KEY` | toggle between Code and Fuzzy search | `ctrl-t` |
-| `GHFC_OPEN_BROWSER_QUERY_KEY` | open the search query in the browser | `ctrl-x` |
-| `GHFC_VIEW_CONTENTS_KEY` | open the file in the pager | `enter` |
-| `GHFC_TOGGLE_PREVIEW_KEY` | toggle the file preview | `tab` |
+| Variable | Purpose | Default |
+| ------------------------------ | ---------------------------------------- | ------------ |
+| `GHFC_OPEN_BROWSER_KEY` | open the file in the browser | `ctrl-b` |
+| `GHFC_OPEN_EDITOR_KEY` | open the file content in the editor | `ctrl-o` |
+| `GHFC_FILTER_BY_REPO_KEY` | prepend "repo:{owner/name}" to the query | `ctrl-p` |
+| `GHFC_RELOAD_KEY` | reload with up to 100 results | `ctrl-r` |
+| `GHFC_TOGGLE_HISTORY_KEY` | toggle command history | `ctrl-space` |
+| `GHFC_TOGGLE_FUZZY_SEARCH_KEY` | toggle between Code and Fuzzy search | `ctrl-t` |
+| `GHFC_OPEN_BROWSER_QUERY_KEY` | open the search query in the browser | `ctrl-x` |
+| `GHFC_VIEW_CONTENTS_KEY` | open the file in the pager | `enter` |
+| `GHFC_TOGGLE_PREVIEW_KEY` | toggle the file preview | `tab` |
---