diff --git a/0001-Install-shell-completion-files-to-correct-locations.patch b/0001-Install-shell-completion-files-to-correct-locations.patch deleted file mode 100644 index b737067..0000000 --- a/0001-Install-shell-completion-files-to-correct-locations.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 1669e26ccb74aacbcdfd7100a8e24e3faa31dde4 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 - -Bash completion files should be installed to -/usr/share/bash-completion/completions, with a file name matching the -command name. Zsh completion files should be installed to -/usr/share/zsh/site-functions, with a file name matching the command -name prefixed with an underscore. - -Resolves #271 - -https://github.com/scop/bash-completion/blob/master/README.md#faq -http://zsh.sourceforge.net/Doc/Release/Completion-System.html ---- - Makefile.am | 6 +++--- - ag.bashcomp.sh => completions/bash/ag | 0 - _the_silver_searcher => completions/zsh/_ag | 0 - the_silver_searcher.spec.in | 11 +++-------- - 4 files changed, 6 insertions(+), 11 deletions(-) - rename ag.bashcomp.sh => completions/bash/ag (100%) - rename _the_silver_searcher => completions/zsh/_ag (100%) - -diff --git a/Makefile.am b/Makefile.am -index 3931c3a..280b169 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -6,10 +6,10 @@ ag_LDADD = ${PCRE_LIBS} ${LZMA_LIBS} ${ZLIB_LIBS} $(PTHREAD_LIBS) - - dist_man_MANS = doc/ag.1 - --bashcompdir = $(pkgdatadir)/completions --dist_bashcomp_DATA = ag.bashcomp.sh -+bashcompdir = $(datadir)/bash-completion/completions -+dist_bashcomp_DATA = completions/bash/ag - zshcompdir = $(datadir)/zsh/site-functions --dist_zshcomp_DATA = _the_silver_searcher -+dist_zshcomp_DATA = completions/zsh/_ag - - EXTRA_DIST = Makefile.w32 LICENSE NOTICE the_silver_searcher.spec README.md - -diff --git a/ag.bashcomp.sh b/completions/bash/ag -similarity index 100% -rename from ag.bashcomp.sh -rename to completions/bash/ag -diff --git a/_the_silver_searcher b/completions/zsh/_ag -similarity index 100% -rename from _the_silver_searcher -rename to completions/zsh/_ag -diff --git a/the_silver_searcher.spec.in b/the_silver_searcher.spec.in -index 445bdec..9239179 100644 ---- a/the_silver_searcher.spec.in -+++ b/the_silver_searcher.spec.in -@@ -1,6 +1,3 @@ --%define _bashcompdir %_sysconfdir/bash_completion.d --%define _zshcompdir %{_datadir}/zsh/site-functions -- - Name: the_silver_searcher - Version: @VERSION@ - Release: 1%{?dist} -@@ -49,8 +46,6 @@ make %{?_smp_mflags} - %install - rm -rf ${RPM_BUILD_ROOT} - make install DESTDIR=${RPM_BUILD_ROOT} --mkdir -p ${RPM_BUILD_ROOT}%{_bashcompdir} --install -m 644 ag.bashcomp.sh ${RPM_BUILD_ROOT}%{_bashcompdir} - - %clean - rm -rf ${RPM_BUILD_ROOT} -@@ -60,9 +55,9 @@ rm -rf ${RPM_BUILD_ROOT} - %defattr(-,root,root,-) - %{_bindir}/* - %{_mandir}/* --%config %{_bashcompdir}/ag.bashcomp.sh --%config %{_datadir}/%{name}/completions/ag.bashcomp.sh --%config %{_datadir}/zsh/site-functions/_the_silver_searcher -+%{_datadir}/bash-completion/completions/ag -+%{_datadir}/zsh/site-functions/_ag -+ - - %changelog - * Thu Dec 5 2013 Emily Strickland - 0.18.1-1 --- -2.26.2 - 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/0002-Install-shell-completion-files-to-correct-locations.patch b/0002-Install-shell-completion-files-to-correct-locations.patch new file mode 100644 index 0000000..daae6df --- /dev/null +++ b/0002-Install-shell-completion-files-to-correct-locations.patch @@ -0,0 +1,86 @@ +From 2deb5b23b1f97e5e554838e0c31d634542e94b40 Mon Sep 17 00:00:00 2001 +From: Carl George +Date: Tue, 29 Sep 2020 13:13:04 -0500 +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 +command name. Zsh completion files should be installed to +/usr/share/zsh/site-functions, with a file name matching the command +name prefixed with an underscore. + +Resolves #271 + +https://github.com/scop/bash-completion/blob/master/README.md#faq +http://zsh.sourceforge.net/Doc/Release/Completion-System.html +--- + Makefile.am | 6 +++--- + ag.bashcomp.sh => completions/bash/ag | 0 + _the_silver_searcher => completions/zsh/_ag | 0 + the_silver_searcher.spec.in | 11 +++-------- + 4 files changed, 6 insertions(+), 11 deletions(-) + rename ag.bashcomp.sh => completions/bash/ag (100%) + rename _the_silver_searcher => completions/zsh/_ag (100%) + +diff --git a/Makefile.am b/Makefile.am +index 3931c3a..280b169 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -6,10 +6,10 @@ ag_LDADD = ${PCRE_LIBS} ${LZMA_LIBS} ${ZLIB_LIBS} $(PTHREAD_LIBS) + + dist_man_MANS = doc/ag.1 + +-bashcompdir = $(pkgdatadir)/completions +-dist_bashcomp_DATA = ag.bashcomp.sh ++bashcompdir = $(datadir)/bash-completion/completions ++dist_bashcomp_DATA = completions/bash/ag + zshcompdir = $(datadir)/zsh/site-functions +-dist_zshcomp_DATA = _the_silver_searcher ++dist_zshcomp_DATA = completions/zsh/_ag + + EXTRA_DIST = Makefile.w32 LICENSE NOTICE the_silver_searcher.spec README.md + +diff --git a/ag.bashcomp.sh b/completions/bash/ag +similarity index 100% +rename from ag.bashcomp.sh +rename to completions/bash/ag +diff --git a/_the_silver_searcher b/completions/zsh/_ag +similarity index 100% +rename from _the_silver_searcher +rename to completions/zsh/_ag +diff --git a/the_silver_searcher.spec.in b/the_silver_searcher.spec.in +index 445bdec..9239179 100644 +--- a/the_silver_searcher.spec.in ++++ b/the_silver_searcher.spec.in +@@ -1,6 +1,3 @@ +-%define _bashcompdir %_sysconfdir/bash_completion.d +-%define _zshcompdir %{_datadir}/zsh/site-functions +- + Name: the_silver_searcher + Version: @VERSION@ + Release: 1%{?dist} +@@ -49,8 +46,6 @@ make %{?_smp_mflags} + %install + rm -rf ${RPM_BUILD_ROOT} + make install DESTDIR=${RPM_BUILD_ROOT} +-mkdir -p ${RPM_BUILD_ROOT}%{_bashcompdir} +-install -m 644 ag.bashcomp.sh ${RPM_BUILD_ROOT}%{_bashcompdir} + + %clean + rm -rf ${RPM_BUILD_ROOT} +@@ -60,9 +55,9 @@ rm -rf ${RPM_BUILD_ROOT} + %defattr(-,root,root,-) + %{_bindir}/* + %{_mandir}/* +-%config %{_bashcompdir}/ag.bashcomp.sh +-%config %{_datadir}/%{name}/completions/ag.bashcomp.sh +-%config %{_datadir}/zsh/site-functions/_the_silver_searcher ++%{_datadir}/bash-completion/completions/ag ++%{_datadir}/zsh/site-functions/_ag ++ + + %changelog + * Thu Dec 5 2013 Emily Strickland - 0.18.1-1 +-- +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