| 1 |
#compdef pdfgrep |
| 2 |
|
| 3 |
# Zsh completion for pdfgrep. |
| 4 |
|
| 5 |
# Copyright (C) 2012-2023 by Hans-Peter Deifel ([email protected]) |
| 6 |
# |
| 7 |
# This program is free software; you can redistribute it and/or modify |
| 8 |
# it under the terms of the GNU General Public License as published by |
| 9 |
# the Free Software Foundation; either version 2 of the License, or |
| 10 |
# (at your option) any later version. |
| 11 |
# |
| 12 |
# This program is distributed in the hope that it will be useful, |
| 13 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
# GNU General Public License for more details. |
| 16 |
# |
| 17 |
# You should have received a copy of the GNU General Public License |
| 18 |
# along with this program; if not, write to the |
| 19 |
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 20 |
# Boston, MA 02110-1301 USA. |
| 21 |
|
| 22 |
_arguments -s -S -A "-*" \ |
| 23 |
"(-n --page-number)"{-n,--page-number}"[prefix match with page number]" \ |
| 24 |
"(-i --ignore-case)"{-i,--ignore-case}"[ignore case distinctions]" \ |
| 25 |
"(-F --fixed-strings -P --perl-regexp)"{-F,--fixed-strings}"[use literal strings]" \ |
| 26 |
"(-F --fixed-strings -P --perl-regexp)"{-P,--perl-regexp}"[use Perl compatible regular expression syntax]" \ |
| 27 |
"(-H --with-filename -h --no-filename)"{-H,--with-filename}"[print filename for each match]" \ |
| 28 |
"(-h --no-filename -H --with-filename)"{-h,--no-filename}"[don't print filename]" \ |
| 29 |
"(-l --files-with-matches -L --files-without-match)"{-l,--files-with-matches}"[print only names of matching files]" \ |
| 30 |
"(-l --files-with-matches -L --files-without-match)"{-L,--files-without-match}"[print only names of non-matching files]" \ |
| 31 |
"(-c --count)"{-c,--count}"[print only a count of matches per file]" \ |
| 32 |
"(-p --page-count)"{-p,--page-count}"[count matches per page]" \ |
| 33 |
"(-C --context)"{-C,--context=}"[specify lines of context]:lines" \ |
| 34 |
"(-A --after-context)"{-A,--after-context=}"[specify lines of trailing context]:lines" \ |
| 35 |
"(-B --before-context)"{-B,--before-context=}"[specify lines of leading context]:lines" \ |
| 36 |
"--color=[use colors for highlighting]:color:(always never auto)" \ |
| 37 |
"--cache[use a cache for faster operation]" \ |
| 38 |
"(-r -R --recursive --dereference-recursive)"{-r,--recursive}"[search directories recursively]" \ |
| 39 |
"(-r -R --recursive --dereference-recursive)"{-R,--dereference-recursive}"[search directories recursively, follow symlinks]" \ |
| 40 |
"*--exclude=[skip files]:exclude" \ |
| 41 |
"*--include=[opposite of exclude]:include" \ |
| 42 |
"--page-range=[limit search to a set of pages]:page-range" \ |
| 43 |
"(- 1)--help[display help information]" \ |
| 44 |
"(- 1)"{-V,--version}"[display version information]" \ |
| 45 |
"(-q --quiet)"{-q,--quiet}"[suppress all normal output]" \ |
| 46 |
"(-Z --null)"{-Z,--null}"[replace colon after filename by null byte]" \ |
| 47 |
"--match-prefix-separator=[specify separator between filename, page and text]:separator" \ |
| 48 |
"*--password=[specify password to decrypt file]:password" \ |
| 49 |
"(-m --max-count)"{-m,--max-count=}"[process at most count matches]:count" \ |
| 50 |
"--debug[enable debug output]" \ |
| 51 |
"--warn-empty[warn if a PDF file contains no text]" \ |
| 52 |
"--unac[remove accents and ligatures]" \ |
| 53 |
"(-e --regexp 1)"{-e,--regexp}"[use argument as pattern]:pattern" \ |
| 54 |
"(-f --file 1)"{-f,--file}"[read patterns from file]:pattern" \ |
| 55 |
'(-e --regexp -f --file)1: :_guard "^-*" pattern' \ |
| 56 |
'*:pdf file:_files -g "*.pdf(-.)"' |