Skip to content

Commit

Permalink
fix: single quotation mark in help page for bash 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
LangLangBart committed Jul 12, 2023
1 parent 808beec commit 7af6d41
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
---
default_stages: [commit]
repos:
- repo: local
hooks:
- id: bash-3
name: macOS default bash version 3.2
entry: |
bash -c 'set -x
err=$(/bin/bash ./gh-find-code -h 2>&1 >/dev/null)
[[ -n $err ]] && exit 1 || exit 0'
language: system
pass_filenames: false
files: gh-find-code
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand Down
4 changes: 3 additions & 1 deletion gh-find-code
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ check_version() {
# IMPORTANT: Keep it in sync with the readme.md
print_help_text() {
local help_text
# Note: the quotation mark in '@junegunn‘s' is the unicode char U+02bc, don't use the
# typical single quotation mark, as this would cause the script to fail in bash 3.2
help_text=$(
cat <<EOF
GitHub code searching with 'fzf'
Expand All @@ -120,7 +122,7 @@ ${WHITE_BOLD}Hotkeys${COLOR_RESET}
${GREEN_NORMAL}esc ${COLOR_RESET} quit
${WHITE_BOLD}Example${COLOR_RESET}
${DARK_GRAY}# matches code from @junegunn's 'fzf' repo ${COLOR_RESET}
${DARK_GRAY}# matches code from @junegunnʼs 'fzf' repo ${COLOR_RESET}
gh find-code 'repo:junegunn/fzf FZF_PORT'
${DARK_GRAY}# matches JavaScript files with "new Proxy()" ${COLOR_RESET}
gh find-code 'language:js "new Proxy()"'
Expand Down

0 comments on commit 7af6d41

Please sign in to comment.