diff options
| author | Shohei YOSHIDA <syohex@gmail.com> | 2022-11-16 11:11:28 +0900 |
|---|---|---|
| committer | Shohei YOSHIDA <syohex@gmail.com> | 2022-11-16 11:18:01 +0900 |
| commit | 6de723fd36d40715ca1c4f04de3f6df2c5167e0b (patch) | |
| tree | 0e40486ec4249fead6917308b2f02436b4166f7b /src/_pygmentize | |
| parent | Merge pull request #919 from zsh-users/update-grances (diff) | |
| download | zsh-completions-6de723fd36d40715ca1c4f04de3f6df2c5167e0b.tar zsh-completions-6de723fd36d40715ca1c4f04de3f6df2c5167e0b.tar.gz zsh-completions-6de723fd36d40715ca1c4f04de3f6df2c5167e0b.tar.bz2 zsh-completions-6de723fd36d40715ca1c4f04de3f6df2c5167e0b.tar.lz zsh-completions-6de723fd36d40715ca1c4f04de3f6df2c5167e0b.tar.xz zsh-completions-6de723fd36d40715ca1c4f04de3f6df2c5167e0b.tar.zst zsh-completions-6de723fd36d40715ca1c4f04de3f6df2c5167e0b.zip | |
Update pygmentize completion
Diffstat (limited to 'src/_pygmentize')
| -rw-r--r-- | src/_pygmentize | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/src/_pygmentize b/src/_pygmentize index c2fbcfd..02e3600 100644 --- a/src/_pygmentize +++ b/src/_pygmentize @@ -1,6 +1,6 @@ #compdef pygmentize # ------------------------------------------------------------------------------ -# Copyright (c) 2012 Github zsh-users - http://github.com/zsh-users +# Copyright (c) 2012 Github zsh-users - https://github.com/zsh-users # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -28,7 +28,7 @@ # Description # ----------- # -# Completion script for pygmentize. +# Completion script for pygmentize 2.13.0 (https://github.com/pygments/pygments) # # ------------------------------------------------------------------------------ # Authors @@ -42,22 +42,29 @@ _pygmentize() { local context state line _arguments -s -S \ - '-h[prints help]:' \ - '-V[prints the package version]:' \ - '-L[lists lexers, formatters, styles or filters]:args:(lexers formatters styles filters):' \ - '-f[formatter]:FORMATTER:_get_formatters' \ - '-o[output file]:FILENAME:_gnu_generic' \ - '(-h -V -L -f -o -S -F -H -g -l)-N[guesses and prints out a lexer name based solely on given filename]:FILENAME:_files:' \ - '(-h -V -L -o -F -H -g -l -N)-S[style]:STYLE:_get_styles' \ - '-F[filter]:STYLE:_get_filters' \ + '(-g)-l[Specify the lexer to use]:LEXER:_pygmentize_get_lexers' \ + '(-l)-g[Guess the lexer from the file contents]' \ + '-F[Add a filter to the token stream]:STYLE:_pygmentize_get_filters' \ + '-f[Specify the formatter to use]:FORMATTER:_pygmentize_get_formatters' \ + '-O[Give options to the lexer and formatter as a comma-separated list of key-value pairs]' \ + '-P[Give a single option to the lexer and formatter]' \ + '-o[output file]:FILENAME:_files' \ + '-v[Print a detailed traceback on unhandled exceptions]' \ + '-s[Process lines one at a time until EOF]' \ + '-x[Allow custom lexers and formatters to be loaded from a .py file]' \ + '--json[Output as JSON]' \ + '(-L -o -F -H -g -l -N)-S[Print style definitions for STYLE for a formatter given with -f]:STYLE:_pygmentize_get_styles' \ + '-L[lists lexers, formatters, styles or filters]:args:(lexers formatters styles filters)' \ + '(-L -f -o -S -F -H -g -l)-N[guesses and prints out a lexer name based solely on given filename]:FILENAME:_files' \ + '-C[Like -N, but print out a lexer name based solely on a given content from standard input]' \ '-H[prints detailed help for the object <name> of type <type>]:' \ - '(-g)-l[lexer]::LEXER:_get_lexers:' \ - '(-l)-g[attempt to guess the lexer from the file contents]' \ - '*:args:_gnu_generic' + '-a[Formatter-specific additional argument for the -S mode]:' \ + '(* -)-V[prints the package version]' \ + '(* -)'{-h,--help}'[prints help]' \ + '*:args:_files' } - -_get_filters() { +_pygmentize_get_filters() { local cache_policy zstyle -s ":completion:${curcontext}:" cache-policy cache_policy if [[ -z "$cache_policy" ]]; then @@ -74,9 +81,7 @@ _get_filters() { _wanted pygmentize_filters expl 'pygmentize filters' compadd -a _pygmentize_filters } - -(( $+functions[_get_formatters] )) || -_get_formatters() { +_pygmentize_get_formatters() { local cache_policy zstyle -s ":completion:${curcontext}:" cache-policy cache_policy if [[ -z "$cache_policy" ]]; then @@ -93,8 +98,7 @@ _get_formatters() { _wanted pygmentize_formatter expl 'pygmentize formatters' compadd -a _pygmentize_formatter } - -_get_lexers() { +_pygmentize_get_lexers() { local cache_policy zstyle -s ":completion:${curcontext}:" cache-policy cache_policy if [[ -z "$cache_policy" ]]; then @@ -111,8 +115,7 @@ _get_lexers() { _wanted pygmentize_lexer expl 'pygmentize lexers' compadd -a _pygmentize_lexer } - -_get_styles() { +_pygmentize_get_styles() { local cache_policy zstyle -s ":completion:${curcontext}:" cache-policy cache_policy if [[ -z "$cache_policy" ]]; then @@ -129,7 +132,6 @@ _get_styles() { _wanted pygmentize_style expl 'pygmentize styles' compadd -a _pygmentize_style } - _pygmentize_caching_policy() { local -a oldp oldp=( "$1"(Nmh+24) ) # 24 hour |
