#compdef pdfgrep # Zsh completion for pdfgrep. # Copyright (C) 2012-2023 by Hans-Peter Deifel (hpd@hpdeifel.de) # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301 USA. _arguments -s -S -A "-*" \ "(-n --page-number)"{-n,--page-number}"[prefix match with page number]" \ "(-i --ignore-case)"{-i,--ignore-case}"[ignore case distinctions]" \ "(-F --fixed-strings -P --perl-regexp)"{-F,--fixed-strings}"[use literal strings]" \ "(-F --fixed-strings -P --perl-regexp)"{-P,--perl-regexp}"[use Perl compatible regular expression syntax]" \ "(-H --with-filename -h --no-filename)"{-H,--with-filename}"[print filename for each match]" \ "(-h --no-filename -H --with-filename)"{-h,--no-filename}"[don't print filename]" \ "(-l --files-with-matches -L --files-without-match)"{-l,--files-with-matches}"[print only names of matching files]" \ "(-l --files-with-matches -L --files-without-match)"{-L,--files-without-match}"[print only names of non-matching files]" \ "(-c --count)"{-c,--count}"[print only a count of matches per file]" \ "(-p --page-count)"{-p,--page-count}"[count matches per page]" \ "(-C --context)"{-C,--context=}"[specify lines of context]:lines" \ "(-A --after-context)"{-A,--after-context=}"[specify lines of trailing context]:lines" \ "(-B --before-context)"{-B,--before-context=}"[specify lines of leading context]:lines" \ "--color=[use colors for highlighting]:color:(always never auto)" \ "--cache[use a cache for faster operation]" \ "(-r -R --recursive --dereference-recursive)"{-r,--recursive}"[search directories recursively]" \ "(-r -R --recursive --dereference-recursive)"{-R,--dereference-recursive}"[search directories recursively, follow symlinks]" \ "*--exclude=[skip files]:exclude" \ "*--include=[opposite of exclude]:include" \ "--page-range=[limit search to a set of pages]:page-range" \ "(- 1)--help[display help information]" \ "(- 1)"{-V,--version}"[display version information]" \ "(-q --quiet)"{-q,--quiet}"[suppress all normal output]" \ "(-Z --null)"{-Z,--null}"[replace colon after filename by null byte]" \ "--match-prefix-separator=[specify separator between filename, page and text]:separator" \ "*--password=[specify password to decrypt file]:password" \ "(-m --max-count)"{-m,--max-count=}"[process at most count matches]:count" \ "--debug[enable debug output]" \ "--warn-empty[warn if a PDF file contains no text]" \ "--unac[remove accents and ligatures]" \ "(-e --regexp 1)"{-e,--regexp}"[use argument as pattern]:pattern" \ "(-f --file 1)"{-f,--file}"[read patterns from file]:pattern" \ '(-e --regexp -f --file)1: :_guard "^-*" pattern' \ '*:pdf file:_files -g "*.pdf(-.)"'