From fb6dd9364dd447f1da2be262cc4bb2e40ae43602 Mon Sep 17 00:00:00 2001 From: Carl George Date: Thu, 27 May 2021 23:19:16 -0500 Subject: [PATCH] Add patch for zsh completion of new flags --- ...pdate-zsh-completion-for-new-options.patch | 51 +++++++++++++++++++ ...ompletion-files-to-correct-locations.patch | 6 +-- the_silver_searcher.spec | 5 +- 3 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 0001-update-zsh-completion-for-new-options.patch rename 0001-Install-shell-completion-files-to-correct-locations.patch => 0002-Install-shell-completion-files-to-correct-locations.patch (95%) diff --git a/0001-update-zsh-completion-for-new-options.patch b/0001-update-zsh-completion-for-new-options.patch new file mode 100644 index 0000000..5645e91 --- /dev/null +++ b/0001-update-zsh-completion-for-new-options.patch @@ -0,0 +1,51 @@ +From f54d783700757b6f988418995befaf233db6da40 Mon Sep 17 00:00:00 2001 +From: Oliver Kiddle +Date: Tue, 29 Aug 2017 01:44:43 +0200 +Subject: [PATCH 1/2] update zsh completion for new options + +--- + _the_silver_searcher | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/_the_silver_searcher b/_the_silver_searcher +index 60d2a75..650d53c 100644 +--- a/_the_silver_searcher ++++ b/_the_silver_searcher +@@ -5,7 +5,7 @@ + local ret=1 + local -a args expl + +-# Intentionally avoided many possible mutual exlusions because it is ++# Intentionally avoided many possible mutual exclusions because it is + # likely that earlier options come from an alias. In line with this + # the following conditionally adds options that assert defaults. + [[ -n $words[(r)(-[is]|--ignore-case|--case-sensitive)] ]] && args+=( +@@ -39,7 +39,7 @@ while _tags; do + '(-f --follow)'{-f,--follow}'[follow symlinks]' \ + '(-F --fixed-strings --literal -Q)'{--fixed-strings,-F,--literal,-Q}'[use literal strings]' \ + '--nogroup[repeat filename for each match line]' \ +- '(1 -G --file-search-regex)-g+[print filenames matching a pattern]:regex' \ ++ '(1 -G --file-search-regex -g --filename-pattern)'{--filename-pattern=,-g+}'[print filenames matching a pattern]:regex' \ + '(-G --file-search-regex)'{-G+,--file-search-regex=}'[limit search to filenames matching pattern]:regex' \ + '(-H --heading --noheading)'{-H,--heading}'[print filename with each match]' \ + '(-H --heading --noheading --nofilename)--noheading[suppress printing of filenames]' \ +@@ -48,6 +48,7 @@ while _tags; do + '(-i --ignore-case)'{-i,--ignore-case}'[match case-insensitively]' \ + '(-l --files-with-matches)'{-l,--files-with-matches}"[output matching files' names only]" \ + '(-L --files-without-matches)'{-L,--files-without-matches}"[output non-matching files' names only]" \ ++ "--print-all-files[print headings for all files searched, even those that don't contain matches]" \ + '(--max-count -m)'{--max-count=,-m+}'[stop after specified no of matches in each file]:max number of matches' \ + '--numbers[prefix output with line numbers, even for streams]' \ + '--nonumbers[suppress printing of line numbers]' \ +@@ -59,7 +60,7 @@ while _tags; do + '--silent[suppress all log messages, including errors]' \ + '(--stats-only)--stats[print stats (files scanned, time taken, etc.)]' \ + '(--stats)--stats-only[print stats and nothing else]' \ +- '(-U --skip-vcs-ignores)'{-U,--skip-vcs-ignores}'[ignore VCS files (stil obey .ignore)]' \ ++ '(-U --skip-vcs-ignores)'{-U,--skip-vcs-ignores}'[ignore VCS files (still obey .ignore)]' \ + '(-v --invert-match)'{-v,--invert-match}'[select non-matching lines]' \ + '--vimgrep[output results like vim :vimgrep /pattern/g would]' \ + '(-w --word-regexp)'{-w,--word-regexp}'[force pattern to match only whole words]' \ +-- +2.31.1 + diff --git a/0001-Install-shell-completion-files-to-correct-locations.patch b/0002-Install-shell-completion-files-to-correct-locations.patch similarity index 95% rename from 0001-Install-shell-completion-files-to-correct-locations.patch rename to 0002-Install-shell-completion-files-to-correct-locations.patch index b737067..daae6df 100644 --- a/0001-Install-shell-completion-files-to-correct-locations.patch +++ b/0002-Install-shell-completion-files-to-correct-locations.patch @@ -1,7 +1,7 @@ -From 1669e26ccb74aacbcdfd7100a8e24e3faa31dde4 Mon Sep 17 00:00:00 2001 +From 2deb5b23b1f97e5e554838e0c31d634542e94b40 Mon Sep 17 00:00:00 2001 From: Carl George Date: Tue, 29 Sep 2020 13:13:04 -0500 -Subject: [PATCH] Install shell completion files to correct locations +Subject: [PATCH 2/2] Install shell completion files to correct locations Bash completion files should be installed to /usr/share/bash-completion/completions, with a file name matching the @@ -82,5 +82,5 @@ index 445bdec..9239179 100644 %changelog * Thu Dec 5 2013 Emily Strickland - 0.18.1-1 -- -2.26.2 +2.31.1 diff --git a/the_silver_searcher.spec b/the_silver_searcher.spec index bd7cb66..a91d237 100644 --- a/the_silver_searcher.spec +++ b/the_silver_searcher.spec @@ -12,8 +12,10 @@ License: ASL 2.0 and BSD URL: https://github.com/ggreer/the_silver_searcher Source0: %{url}/archive/%{commit}/%{name}-%{commit}.tar.gz +# https://github.com/ggreer/the_silver_searcher/pull/1145 +Patch0: 0001-update-zsh-completion-for-new-options.patch # https://github.com/ggreer/the_silver_searcher/pull/1410 -Patch0: 0001-Install-shell-completion-files-to-correct-locations.patch +Patch1: 0002-Install-shell-completion-files-to-correct-locations.patch BuildRequires: make BuildRequires: gcc @@ -76,6 +78,7 @@ make test * Fri May 28 2021 Carl George - 2.2.0^2020704.5a1c8d8-1 - Switch to caret versioning - Build against system uthash +- Add patch for zsh completion of new flags * Wed Jan 27 2021 Fedora Release Engineering - 2.2.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild