1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-05-10 01:26:17 +02:00

gitlab !12: completion for mat & mat2

This commit is contained in:
Jan Máslo 2020-05-04 17:49:33 +02:00 committed by Oliver Kiddle
parent 1ee8ecd8ea
commit dc5dfd19a2
3 changed files with 41 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2020-06-11 Oliver Kiddle <okiddle@yahoo.co.uk>
* gitlab !12: Jan Máslo: Completion/Linux/Command/_mat,
Completion/Linux/Command/_mat2: new completions
* 46036: Completion/Zsh/Type/_ps1234: fix colouring in prompt
completion

View File

@ -0,0 +1,19 @@
#compdef mat
# Completion for mat 0.6.1 (https://tails.boum.org/blueprint/doc/mat)
local curcontext="$curcontext" state line
typeset -A opt_args
_arguments \
'(- *)'{-h,--help}'[show help message and exit]' \
'(-a --add2archive)'{-a,--add2archive}'[add to output archive non-supported filetypes]' \
'(-b --backup)'{-b,--backup}'[keep a backup copy]' \
'(-L --low-pdf-quality)'{-L,--low-pdf-quality}'[produces a lighter, but lower quality PDF]' \
'(-c --check -b --backup)'{-c,--check}'[check if a file is free of harmful metadatas]' \
'(-d --display -b --backup)'{-d,--display}'[list all the harmful metadata of a file without removing them]' \
'(- *)'{-l,--list}'[list all supported fileformats]' \
'(- *)'{-v,--version}"[show program's version number and exit]" \
'*:file:_files -g "*.(tif|tiff|png|jpeg|jpg|jpe|odt|fodt|odx|odp|fodp|ods|fods|odg|fodg|docx|docm|pptx|pptm|xlsx|xlsm|pdf|tar|tar.bz2|tar.gz|zip|mp3|mp2|mp1|mpa|ogg|oga|flac|torrent)"'
# they are all that are in --list
# might not be all the supported files

View File

@ -0,0 +1,19 @@
#compdef mat2
# Completion for mat2 0.11.0 (https://0xacab.org/jvoisin/mat2).
local curcontext="$curcontext" state line
typeset -A opt_args
_arguments \
'(- *)'{-h,--help}'[show help message and exit]' \
'(-V --verbose)'{-V,--verbose}'[show more verbose status information]' \
--unknown-members'[policy how to handle unknown members of archive-style files]:policy:(abort omit keep)' \
--inplace'[clean in place, without backup]' \
--no-sandbox"[disable bubblewrap's sandboxing]" \
'(- *)'{-v,--version}"[show program's version number and exit]" \
'(- *)'{-l,--list}'[list all supported fileformats]' \
'(- *)'--check-dependencies'[check if mat2 has all the dependencies it needs]' \
'(-L --lightweight -s --show)'{-L,--lightweight}'[remove SOME metadata]' \
'(-s --show -L --lightweight)'{-s,--show}'[list harmful metadata detectable by mat2 without removing them]' \
'*:file:_files -g "*.(epub|pdf|odc|odf|odg|odi|odp|ods|odt|pptx|xlsx|docx|torrent|ncx|tar|xhtml|xhtm|xht|zip|mp3|mpga|mp1|mp2|oga|opus|ogg|spx|flac|wav|gif|jpg|jpe|jfif|jpeg|png|svgz|svg|tiff|tif|bmp|ppm|css|htm|html|cxx|text|log|txt|hh|hxx|el|conf|cc|pm|f90|mpg4|m4v|mp4|wmv|avi)"'