zsh-workers
 help / color / mirror / code / Atom feed
9116d247112f34af27b0fec66a0d895a64a193c5 blob 1786 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
 
#compdef zathura

(( $+functions[_zathura_files] )) ||
_zathura_files(){
  local -a plugin_files
  for plugins_dir in "${opt_args[-p]}" "${opt_args[--plugins-dir]}" "/usr/lib/zathura" "/usr/local/lib/zathura" "/lib/zathura"; do
    plugin_files=(${plugins_dir}/*.so)
    if [[ -z "${plugin_files}" ]]; then
      break
    fi
  done
  if [[ -z "${plugin_files}" ]]; then
    _files -g "*.pdf(-.)"
    return
  fi
  local -a supported_filetypes
  for pf in "${plugin_files[@]}"; do
    if [[ $pf =~ "mupdf" ]]; then
      supported_filetypes+="pdf"
      supported_filetypes+="epub"
      supported_filetypes+="xps"
    elif [[ $pf =~ "poppler" ]]; then
      supported_filetypes+="pdf"
    else
      supported_filetypes+="${${pf%.so}#${plugins_dir}/lib}"
    fi
  done
  _files -g "*.(${(j.|.)supported_filetypes})(-.)"
}

_arguments \
  {-e,--reparent=}'[Reparents to window specified by xid]:xid:_x_window' \
  {-c,--config-dir=}'[Path to the config directory]:path:{_files -/}' \
  {-d,--data-dir=}'[Path to the data directory]:path:{_files -/}' \
  {-p,--plugins-dir=}'[Path to the directory containing plugins]:path:{_files -/}' \
  {-w,--password=}"[The document's password]:password: " \
  {-P,--page=}'[Opens the document at the given page number]:number: ' \
  {-l,--log-level=}'[Set log level]:level:(debug info warning error)' \
  {-x,--synctex-editor-command=}'[Set the synctex editor command]:command:_cmdstring' \
  '--synctex-forward=[Jump to the given position]:input: ' \
  '--synctex-pid=[Instead of looking for an instance having the correct file opened, try only the instance with the given PID]:pid:_pids' \
  '--fork[Fork into background]' \
  '(- :)--version[Display version string and exit]' \
  '(- :)--help[Display help and exit]' \
  '*:file:_zathura_files'
debug log:

solving 9116d2471 ...
found 9116d2471 in https://inbox.vuxu.org/zsh-workers/20180613163152.28843-1-doron.behar@gmail.com/

applying [1/1] https://inbox.vuxu.org/zsh-workers/20180613163152.28843-1-doron.behar@gmail.com/
diff --git a/Completion/X/Command/_zathura b/Completion/X/Command/_zathura
new file mode 100644
index 000000000..9116d2471

Checking patch Completion/X/Command/_zathura...
Applied patch Completion/X/Command/_zathura cleanly.

index at:
100644 9116d247112f34af27b0fec66a0d895a64a193c5	Completion/X/Command/_zathura

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).