Skip to content

Commit

Permalink
chore: update fzf to 0.54.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LangLangBart committed Aug 23, 2024
1 parent e5174b8 commit 739592d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/crate-ci/typos
rev: v1.22.9
rev: v1.23.7
hooks:
- id: typos
args: [--format, brief, --write-changes]
Expand Down Expand Up @@ -49,7 +49,7 @@ repos:
name: shfmt
args: [--simplify, --indent 0, --case-indent, --write]
- repo: https://github.com/lyz-code/yamlfix
rev: 1.16.0
rev: 1.17.0
hooks:
- id: yamlfix
- repo: https://github.com/tcort/markdown-link-check
Expand All @@ -59,7 +59,7 @@ repos:
name: markdown link check
args: [--quiet]
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.27.0
rev: v3.29.0
hooks:
- id: commitizen
stages: [commit-msg]
9 changes: 3 additions & 6 deletions gh-find-code
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ set -o allexport -o errexit -o errtrace -o nounset -o pipefail
# TODO: lookout for Github adding regex support to the REST or GraphQL API
# TODO: add tests - https://github.com/dodie/testing-in-bash
# TODO: replace python with a more typical bash solution
# TODO: Use the new '--info-command' from fzf 0.54.0 for the history and apply 'ctrl-t' to search
# for context, similar to 'zdharma-continuum/history-search-multi-word'

###############################################################################
# Environment Variables
Expand Down Expand Up @@ -145,7 +143,7 @@ gh_accept_text_match="Accept: application/vnd.github.text-match+json"
gh_rest_api_version="X-GitHub-Api-Version:2022-11-28"

# https://github.com/junegunn/fzf/releases/tag/0.52.0
min_fzf_version="0.52.0"
min_fzf_version="0.54.0"
# a bug with 'gh-browse' with relative paths was fixed
# https://github.com/cli/cli/issues/7674
min_gh_version="2.37.0"
Expand Down Expand Up @@ -650,7 +648,7 @@ gh_query() {

# Escape special charters before using the string in extended 'grep'.
# However, the "|" character should be left unescaped.
sanitized_patterns=$(command sed -e 's/[][?*+.$^()]/\\&/g' <<<"$patterns")
sanitized_patterns=$(command sed -e 's/[][?*+.$^(){}]/\\&/g' <<<"$patterns")
line_numbers=()
[[ $patterns != "__NoPatternFound__" ]] && while IFS='' read -r matched_line; do
# Ensure only valid numbers are included
Expand Down Expand Up @@ -816,7 +814,7 @@ view_contents() {
# Basic style for 'fzf'; useful tool: https://vitormv.github.io/fzf-themes/
# IMPORTANT: anything after "$@" will overwrite options in the actual command
fzf_basic_style() {
: | command fzf -- \
command fzf -- \
--ansi \
--bind 'scroll-up:offset-up,scroll-down:offset-down' \
--border block \
Expand All @@ -838,7 +836,6 @@ fzf_basic_style() {
--scroll-off 3 \
--scrollbar '│▐' \
--separator '' \
--sync \
--unicode \
--with-shell "${execution_shell:-"$(which bash) -c"}" \
"$@"
Expand Down

0 comments on commit 739592d

Please sign in to comment.