1#compdef optirun 2# ------------------------------------------------------------------------------ 3# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are met: 8# * Redistributions of source code must retain the above copyright 9# notice, this list of conditions and the following disclaimer. 10# * Redistributions in binary form must reproduce the above copyright 11# notice, this list of conditions and the following disclaimer in the 12# documentation and/or other materials provided with the distribution. 13# * Neither the name of the zsh-users nor the 14# names of its contributors may be used to endorse or promote products 15# derived from this software without specific prior written permission. 16# 17# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27# ------------------------------------------------------------------------------ 28# Description 29# ----------- 30# 31# Completion script for the optirun command from bumblebee 32# (https://github.com/Bumblebee-Project/Bumblebee). 33# 34# ------------------------------------------------------------------------------ 35# Authors 36# ------- 37# 38# * Christophe-Marie Duquesne <chm.duquesne@gmail.com> 39# 40# ------------------------------------------------------------------------------ 41 42local curcontext="$curcontext" state line 43typeset -A opt_args 44 45local -a arguments 46 47arguments=( 48 '--version[output version information]' 49 '(-h --help)'{-h,--help}'[show help]' 50 '(-c --vgl-compress)'{-c,--vgl-compress}'[image transport method]:method:(proxy jpeg rgb xb yuv)' 51 '--failsafe[run a program even if the nvidia card is unavailable]:boolean:(true false)' 52 '--no-failsafe[do not run a program if the nvidia card is unavailable]' 53 '--vgl-options[options to be passed to vglrun (example: +tr)]' 54 '(-q --quiet --silent)'{-q,--quiet,--silent}'[suppress all logging messages]' 55 '(-v --verbose)'{-v,--verbose}'[increase the verbosity level of log messages]' 56 '--debug[set the verbosity level to the maximum]' 57 '(-b --bridge)'{-b,--bridge}'[specify bridge library to use: VirtualGL, Primus or auto]:method:(auto primus virtualgl none)' 58 '(-d --display)'{-d,--display}'[the X display number to use]' 59 '(-C --config)'{-C,--config}'[retrieve settings for Bumblebee from FILE]:file:_files' 60 '(-l --ldpath)'{-l,--ldpath}'[PATH the libraries like libGL.so are searched in]:file:_files' 61 '--primus-ldpath[a colon-separated list of paths which are searched for the primus libGL.so.1]:file:_files' 62 '(-s --socket)'{-s,--socket}'[use FILE for communication with the daemon]:file:_files' 63 '--no-xorg[do not start secondary X server (implies -b none)]' 64 '*::arguments: _normal' 65) 66 67_arguments $arguments 68 69# Local Variables: 70# mode: Shell-Script 71# sh-indentation: 2 72# indent-tabs-mode: nil 73# sh-basic-offset: 2 74# End: 75# vim: ft=zsh sw=2 ts=2 et 76