summaryrefslogtreecommitdiff
path: root/Completion/X/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/X/Command')
-rw-r--r--Completion/X/Command/_code4
-rw-r--r--Completion/X/Command/_geany30
-rw-r--r--Completion/X/Command/_mupdf53
-rw-r--r--Completion/X/Command/_qiv20
-rw-r--r--Completion/X/Command/_zathura48
-rw-r--r--Completion/X/Command/_zeal43
6 files changed, 194 insertions, 4 deletions
diff --git a/Completion/X/Command/_code b/Completion/X/Command/_code
index 089050e26..b725b2a17 100644
--- a/Completion/X/Command/_code
+++ b/Completion/X/Command/_code
@@ -24,12 +24,14 @@ arguments=(
'(-s --status)'{-s,--status}'[print process usage and diagnostics information]'
'(-p --performance)'{-p,--performance}'[start with the "Developer: Startup Performance" command enabled]'
'--prof-startup[run CPU profiler during startup]'
- '--disable-extensions[disable all installed extensions]'
+ \*--disable-extension'[disable specified installed extension]'
+ '(--disable-extension --disable-extensions)--disable-extensions[disable all installed extensions]'
'--inspect-extensions[allow debugging and profiling of extensions]'
'--inspect-brk-extensions[allow debugging and profiling of extensions with the extension host being paused after start]'
'--disable-gpu[disable GPU hardware acceleration]'
'--upload-logs[uploads logs from current session to a secure endpoint]:confirm:(iConfirmLogsUpload)'
'--max-memory=[specify max memory size for a window]:size (Mbytes)'
+ '--folder-uri[open specified URI as a folder, if there is an extension contributing a FileSystemProvider for that URI]'
'*:filename:_files'
)
diff --git a/Completion/X/Command/_geany b/Completion/X/Command/_geany
new file mode 100644
index 000000000..c6a9ae113
--- /dev/null
+++ b/Completion/X/Command/_geany
@@ -0,0 +1,30 @@
+#compdef geany
+
+local ign
+
+(( $#words > 2 )) && ign='!'
+_arguments -s -S \
+ "${ign}(- *)"{-h,--help}'[display usage information]' \
+ "${ign}(- *)--help-all[display all options]" \
+ "${ign}(- *)--help-gtk[display GTK+ Options]" \
+ '--column=[set initial column number for the first opened file]:column number' \
+ '(-c --config)'{-c,--config=}'[use an alternate configuration directory]:configuration directory:_directories' \
+ "${ign}(- *)--ft-names[print internal filetype names]" \
+ {-g,--generate-tags}'[generate global tags file]:tags file:_files -g "*.tags(-.)":*:source file:_files' \
+ '(-P --no-preprocessing)'{-P,--no-preprocessing}"[don't preprocess C/C++ files when generating tags]" \
+ '(-i --new-instance --socket-file)'{-i,--new-instance}"[don't open files in a running instance, force opening a new instance]" \
+ '(-i --new-instance)--socket-file=[use specified socket file to communicate with a Geany instance]:socket:_files -g "*(-=)"' \
+ "${ign}(- *)--list-documents[return a list of open documents in a running Geany instance]" \
+ '(-l --line)'{-l,--line=}'[set initial line number for the first opened file]:line number' \
+ '(-m --no-msgwin)'{-m,--no-msgwin}"[don't show message window at startup]" \
+ '(-n --no-ctags)'{-n,--no-ctags}"[don't load completion and call tip data]" \
+ '(-p --no-plugins)'{-p,--no-plugins}"[don't load plugins]" \
+ "${ign}(- *)--print-prefix[print Geany's installation prefix]" \
+ '(-r --read-only)'{-r,--read-only}'[open all given files in read-only mode]' \
+ '(-s --no-session)'{-s,--no-session}"[don't load the previous session's files]" \
+ '(-t --no-terminal --vte-lib)'{-t,--no-terminal}"[don't load terminal support]" \
+ '(-t --no-terminal)--vte-lib=[specify path and filename of VTE library]:libvte.so filename:_files -g "*.so(-.)"' \
+ '(-v --verbose)'{-v,--verbose}'[be verbose]' \
+ "${ign}(- *)"{-V,--version}'[display version information]' \
+ '--display=[specify X display to use]:display:_x_display' \
+ '(-g --generate-tags)*: :_files'
diff --git a/Completion/X/Command/_mupdf b/Completion/X/Command/_mupdf
new file mode 100644
index 000000000..8a3c76459
--- /dev/null
+++ b/Completion/X/Command/_mupdf
@@ -0,0 +1,53 @@
+#compdef mupdf
+
+local -a ext=(
+ cbt
+ cbz
+ tar
+ zip
+ epub
+ gproof
+ fb2
+ htm
+ html
+ xhtml
+ xml
+ bmp
+ gif
+ hdp
+ j2k
+ jfif
+ jfif-tbnl
+ jp2
+ jpe
+ jpeg
+ jpg
+ jpx
+ jxr
+ pam
+ pbm
+ pgm
+ png
+ pnm
+ ppm
+ tif
+ tiff
+ wdp
+ pdf
+ pclm
+ ai
+ svg
+ oxps
+ xps
+)
+
+_arguments -S -s -A '-*' \
+ '-p+[use specified password]:password:' \
+ '-r+[specify initial zoom level]:resolution [72]:' \
+ '-A+[specify anti-aliasing quality]:bits [8]:({0..8})' \
+ '-C+[specify full-page tint:tint (RRGGBB) [FFFAF0]:' \
+ '-W+[specify page width]:width:' \
+ '-H+[specify page height]:height:' \
+ '-S+[specify font size]:font size:' \
+ '-U+[specify user style sheet]:CSS file:_files' \
+ ': :_files -g "*(#i).(${(j:|:)ext})(-.)"'
diff --git a/Completion/X/Command/_qiv b/Completion/X/Command/_qiv
index d10407584..35ceec09a 100644
--- a/Completion/X/Command/_qiv
+++ b/Completion/X/Command/_qiv
@@ -5,7 +5,9 @@ _arguments -s \
'(- *)'{-v,--version}'[display version information]' \
'--display:display:_x_display' \
\*{-F,--file}'[read file names from file]:file:_files' \
+ '(-B --browse)'{-B,--browse}'[scan directory of file for browsing]' \
'(-e --center)'{-e,--center}'[disable window centering]' \
+ '(-C --cycle)'{-C,--cycle}"[don't cycle after last image]" \
'(-w --fixed_width -W --fixed_zoom)'{-w,--fixed_width}'[use window with specified width]:width' \
'(-w --fixed_width -W --fixed_zoom)'{-W,--fixed_zoom}'[use window with specified zoom factor]:zoom (percentage)' \
'(-x -y -z --root --root_t --root_s -f --file *)'{-x,--root}'[use image as the current desktop background, centered]:image file:_files' \
@@ -13,6 +15,7 @@ _arguments -s \
'(-x -y -z --root --root_t --root_s -f --file *)'{-z,--root_s}'[use image as the current desktop background, stretched]:image file:_files' \
'(-m --maxpect)'{-m,--maxpect}'[expand image to fit screen size]' \
'(-t --scale_down)'{-t,--scale_down}'[shrink images to fit screen size]' \
+ "--trashbin[move files to user's trash bin instead of .qiv-trash when deleting]" \
'(-b --brightness)'{-b,--brightness}'[set brightness]:brightness (-32..32)' \
'(-c --contrast)'{-c,--contrast}'[set contrast]:contrast (-32..32)' \
'(-g --gamma)'{-g,--gamma}'[set gamma]:gamma (-32..32)' \
@@ -21,7 +24,7 @@ _arguments -s \
'(-i --no_statusbar -I --statusbar)'{-I,--statusbar}'[enable statusbar]' \
'(-p --transparency)'{-p,--transparency}'[enable transparency]' \
'(-a --do_grab)'{-a,--do_grab}'[grab the pointer in windowed mode]' \
- '(-G --disable_grab)'{-G,--disable_grab}'[disable pointer grabbing]' \
+ '(-G --disable_grab)'{-G,--disable_grab}'[disable pointer grabbing in fullscreen mode]' \
'(-o --bg_color)'{-o,--bg_color}'[set root background color]:color:_x_color' \
'(-s --slide)'{-s,--slide}'[start slideshow immediately]' \
'(-r --random)'{-r,--random}'[shuffle images for slideshow]' \
@@ -31,6 +34,17 @@ _arguments -s \
'(-f --fullscreen)'{-f,--fullscreen}'[use fullscreen window on startup]' \
'(-P --ignore_path_sort)'{-P,--ignore_path_sort}'[sort images by just the filename]' \
'(-M --merged_case_sort)'{-M,--merged_case_sort}'[sort images case-insensitively]' \
- '(-N --numeric_sort)'{-N,--numeric_sort}'[numeric image sort]' \
+ '(-K --mtime_sort)'{-K,--mtime_sort}'[sort images by their modification time]' \
+ '(-N --numeric_sort -K --mtime_sort)'{-N,--numeric_sort}'[numeric image sort]' \
+ '(-D --no_sort -N --numeric_sort -K --mtime_sort -M --merged_case_sort -P --ignore_path_sort)'{-D,--no_sort}"[don't apply any sorting to the images]" \
'(-T --watch)'{-T,--watch}'[reload the image if it changes]' \
- '*:image file:_files -g "*.(#i)(bmp|eim|gif|jp([eg]|eg)|pcx|png|p[pngb]m|tif(|f)|tga|x[pb]m)(-.)"'
+ '(-u --recursivedir)'{-u,--recursivedir}'[recursively include all files]' \
+ '(-L --followlinks)'{-L,--followlinks}'[follow symlinks to directories]' \
+ '(-A --select_dir)'{-A,--select_dir}'[store selected files in specified directory]:directory [.qiv-select]:_directories' \
+ '(-l --autorotate)'{-l,--autorotate}"[don't autorotate JPEGs according to EXIF rotation tag]" \
+ '(-q --rotate)'{-q,--rotate}'[rotate image]:angle:((1\:90 2\:180 3\:270))' \
+ '(-X --xineramascreen)'{-X,--xineramascreen}'[specify preferred screen]:screen' \
+ '(-Y --source_profile)'{-Y,--source_profile}'[specify colour profile file as source profile]:colour profile file:_files' \
+ '(-Z --display_profile)'{-Z,--display_profile}'[specify colour profile file as display profile]:colour profile file:_files' \
+ '--vikeys[enable movement with h/j/k/l]' \
+ '*:image file:_files -g "*.(#i)(bmp|eim|gif|ico|jp([eg]|eg)|pcx|png|p[pngb]m|pjpeg|svg|tif(|f)|wmf|x[pb]m)(-.)"'
diff --git a/Completion/X/Command/_zathura b/Completion/X/Command/_zathura
new file mode 100644
index 000000000..141cadf63
--- /dev/null
+++ b/Completion/X/Command/_zathura
@@ -0,0 +1,48 @@
+#compdef zathura
+
+(( $+functions[_zathura_files] )) ||
+_zathura_files(){
+ local -a plugins_files
+ local plugins_dir
+ for plugins_dir in \
+ ${(Qv)opt_args[(i)-p|--plugins-dir]}(#qN) \
+ {/usr/local,/usr,}/lib/zathura(#qN)
+ do
+ plugins_files=( $plugins_dir/*.so )
+ (( $#plugins_files )) && break
+ done
+ if [[ -z "${plugins_files}" ]]; then
+ _files -g "*.pdf(-.)"
+ return
+ fi
+ local -a supported_filetypes
+ local pf
+ for pf in "${plugins_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 -s -S \
+ {-e,--reparent=}'[specify xid of window to reparent to]:xid:_x_window' \
+ {-c,--config-dir=}'[specify path to the config directory]:config directory:{_files -/}' \
+ {-d,--data-dir=}'[specify path to the data directory]:data directory:{_files -/}' \
+ {-p,--plugins-dir=}'[specify path to the directory containing plugins]:plugins directory:{_files -/}' \
+ {-w,--password=}"[specify a password for the document]:password: " \
+ {-P,--page=}'[open the document at the given page number]:page number: ' \
+ {-l,--log-level=}'[set log level]:log level:(debug info warning error)' \
+ {-x,--synctex-editor-command=}'[specify synctex editor command]:synctex editor command:_cmdstring' \
+ '--synctex-forward=[jump to the given position]:synctex position: ' \
+ '--synctex-pid=[specify pid of an instance having the correct file opened]:synctex pid:_pids' \
+ '--fork[fork into background]' \
+ '(- :)--version[display version string and exit]' \
+ '(- :)--help[display help and exit]' \
+ '*:file:_zathura_files'
diff --git a/Completion/X/Command/_zeal b/Completion/X/Command/_zeal
new file mode 100644
index 000000000..334331d40
--- /dev/null
+++ b/Completion/X/Command/_zeal
@@ -0,0 +1,43 @@
+#compdef zeal
+
+local curcontext="$curcontext" cfg docset setdir mbegin mend ret=1
+local -a state line expl suf docsets globbed match
+local -A opt_args dsets
+
+_arguments -S \
+ ':query:->queries' \
+ + '(opt)' \
+ {-h,--help}'[display help information]' \
+ {-v,--version}'[display version information]' \
+ {-f,--force}'[force the application to run]' && ret=0
+
+if [[ -n $state ]]; then
+ cfg=${XDG_CONFIG_HOME:-~/.config}/Zeal/Zeal.conf
+ if [[ -r $cfg ]]; then
+ docsets=${${(M)${(f)"$(<$cfg)"}:#path=*}#path=}
+ else
+ docsets=${XDG_DATA_HOME:-~/.local/share}/Zeal/Zeal/docsets
+ fi
+ for docset in $docsets/*.docset/Contents/Info.plist(N); do
+ setdir=${docset:h:h:r:t:l:gs/+/p}
+ [[ $(<$docset) = *DocSetPlatformFamily\<[^\<]#\<string\>(#b)([^\<]#)* ]] ||
+ match=( ${docset:h:h:r:t:l:gs/+/p} )
+ dsets+=( $match[1] ${docset:h} )
+ done
+ if compset -P 1 '*:'; then
+ globbed=( ${dsets[${IPREFIX%:}]}/Resources/docSet.dsidx(N[1]) )
+ if (( $+commands[sqlite3] )) && [[ -e $globbed ]]; then
+ _description queries expl 'query'
+ compadd "$expl[@]" - ${(f)"$(_call_program queries
+ sqlite3 $globbed 'select name from searchIndex')"} && ret=0
+ else
+ _message -e queries 'query'
+ fi
+ else
+ compset -S ':*' || suf=( -qS : )
+ _description docsets expl 'docset'
+ compadd "$expl[@]" $suf -k dsets && ret=0
+ fi
+fi
+
+return ret