From 37d227ce42880bf55261fe7ba8e594156daee425 Mon Sep 17 00:00:00 2001 From: Limao Luo Date: Sat, 9 Mar 2013 18:59:15 -0500 Subject: [PATCH 1/6] primus completion for primusrun --- src/_primus | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/_primus diff --git a/src/_primus b/src/_primus new file mode 100644 index 0000000..b67befe --- /dev/null +++ b/src/_primus @@ -0,0 +1,29 @@ +#compdef primus + +local curcontext="$curcontext" state line +typeset -A opt_args + +args=( +# '--version[output version information]' +# '(-h --help)'{-h,--help}'[show help]' +# '(-c --vgl-compress)'{-c,--vgl-compress}'[image transport method]:method:(proxy jpeg rgb xb yuv)' +# '--failsafe[run a program even if the nvidia card is unavailable]' +# '--no-failsafe[do not run a program if the nvidia card is unavailable]' +# '--vgl-options[options to be passed to vglrun (example: +tr)]' +# '(-q --quiet --silent)'{-q,--quiet,--silent}'[supress all logging messages]' +# '(-v --verbose)'{-v,--verbose}'[increase the verbosity level of log messages]' +# '--debug[set the verbosity level to the maximum]' +# '(-d --display)'{-d,--display}'[the X display number to use]' +# '(-C --config)'{-C,--config}'[retrieve settings for Bumblebee from FILE]:file:_files' +# '(-l --ldpath)'{-l,--ldpath}'[PATH the libraries like libGL.so are searched in]:file:_files' +# '(-s --socket)'{-s,--socket}'[use FILE for communication with the daemon]:file:_files' + '*::arguments: _normal' +) + +_arguments $args +# -c, --vgl-compress METHOD image compression or transport to use with +# VirtualGL. Valid values for METHOD are proxy, +# jpeg, rgb, xv and yuv. Changing this setting +# may affect performance, CPU usage and image +# quality +# -d, --display DISPLAY the X display number to use From aa58f2f8b93ded268e44d29764e1f90a846765e0 Mon Sep 17 00:00:00 2001 From: Limao Luo Date: Sat, 11 May 2013 11:27:21 -0400 Subject: [PATCH 2/6] added new opts --- src/_yaourt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/_yaourt b/src/_yaourt index ef2b027..278a9ac 100644 --- a/src/_yaourt +++ b/src/_yaourt @@ -223,6 +223,8 @@ _yaourt() { '-v[Be more verbose]' '--cachedir[Alternate package cache location]:cache_location:_files -/' '--config[An alternate configuration file]:config file:_files' + '--debug[Display debug messages]' + '--gpgdir[Alternate GnuPG home directory]:gpg_directory:_files -/' '--logfile[An alternate log file]:config file:_files' '--noconfirm[Do not ask for confirmation]' '--noprogressbar[Do not show a progress bar when downloading files]' @@ -301,6 +303,7 @@ _yaourt() { _yaourt_completions_all_groups' '--asdeps[Install packages as non-explicitly installed]' '--asexplicit[Install packages as explicitly installed]' + '--needed[Do not reinstall up to date packages]' ) case $words[2] in From 1f177e56803eb2eebed04d17ccbcd0f24e1ed0a3 Mon Sep 17 00:00:00 2001 From: Limao Luo Date: Sat, 11 May 2013 11:28:19 -0400 Subject: [PATCH 3/6] more consistent completion messages --- src/_yaourt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/_yaourt b/src/_yaourt index 278a9ac..0dc5455 100644 --- a/src/_yaourt +++ b/src/_yaourt @@ -219,13 +219,13 @@ _yaourt() { _yaourt_opts_common=( '-b[Alternate database location]:database_location:_files -/' '-h[Display syntax for the given operation]' - '-r[Set alternate installation root]:installation root:_files -/' + '-r[Alternate installation root]:installation root:_files -/' '-v[Be more verbose]' '--cachedir[Alternate package cache location]:cache_location:_files -/' - '--config[An alternate configuration file]:config file:_files' + '--config[Alternate configuration file]:config file:_files' '--debug[Display debug messages]' '--gpgdir[Alternate GnuPG home directory]:gpg_directory:_files -/' - '--logfile[An alternate log file]:config file:_files' + '--logfile[Alternate log file]:config file:_files' '--noconfirm[Do not ask for confirmation]' '--noprogressbar[Do not show a progress bar when downloading files]' '--noscriptlet[Do not execute the install scriptlet if one exists]' From 1afcc0825bc42ee5ebca88ade6a0ceffadfda6af Mon Sep 17 00:00:00 2001 From: Limao Luo Date: Sat, 11 May 2013 11:32:29 -0400 Subject: [PATCH 4/6] separate branches --- src/_yaourt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/_yaourt b/src/_yaourt index 0dc5455..ef2b027 100644 --- a/src/_yaourt +++ b/src/_yaourt @@ -219,13 +219,11 @@ _yaourt() { _yaourt_opts_common=( '-b[Alternate database location]:database_location:_files -/' '-h[Display syntax for the given operation]' - '-r[Alternate installation root]:installation root:_files -/' + '-r[Set alternate installation root]:installation root:_files -/' '-v[Be more verbose]' '--cachedir[Alternate package cache location]:cache_location:_files -/' - '--config[Alternate configuration file]:config file:_files' - '--debug[Display debug messages]' - '--gpgdir[Alternate GnuPG home directory]:gpg_directory:_files -/' - '--logfile[Alternate log file]:config file:_files' + '--config[An alternate configuration file]:config file:_files' + '--logfile[An alternate log file]:config file:_files' '--noconfirm[Do not ask for confirmation]' '--noprogressbar[Do not show a progress bar when downloading files]' '--noscriptlet[Do not execute the install scriptlet if one exists]' @@ -303,7 +301,6 @@ _yaourt() { _yaourt_completions_all_groups' '--asdeps[Install packages as non-explicitly installed]' '--asexplicit[Install packages as explicitly installed]' - '--needed[Do not reinstall up to date packages]' ) case $words[2] in From 6c69ad9f7b5acfaff92653ca514eb65c9cc5321c Mon Sep 17 00:00:00 2001 From: Limao Luo Date: Sat, 11 May 2013 11:45:43 -0400 Subject: [PATCH 5/6] enabled completions, added header --- src/_primus | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/src/_primus b/src/_primus index b67befe..f400783 100644 --- a/src/_primus +++ b/src/_primus @@ -1,23 +1,36 @@ #compdef primus +# ------------------------------------------------------------------------------ +# Description +# ----------- +# +# Completion script for ack 1.94 (http://betterthangrep.com). +# +# ------------------------------------------------------------------------------ +# Authors +# ------- +# +# * Christophe-Marie Duquesne +# +# ------------------------------------------------------------------------------ + local curcontext="$curcontext" state line typeset -A opt_args args=( -# '--version[output version information]' -# '(-h --help)'{-h,--help}'[show help]' -# '(-c --vgl-compress)'{-c,--vgl-compress}'[image transport method]:method:(proxy jpeg rgb xb yuv)' -# '--failsafe[run a program even if the nvidia card is unavailable]' -# '--no-failsafe[do not run a program if the nvidia card is unavailable]' -# '--vgl-options[options to be passed to vglrun (example: +tr)]' -# '(-q --quiet --silent)'{-q,--quiet,--silent}'[supress all logging messages]' -# '(-v --verbose)'{-v,--verbose}'[increase the verbosity level of log messages]' -# '--debug[set the verbosity level to the maximum]' -# '(-d --display)'{-d,--display}'[the X display number to use]' -# '(-C --config)'{-C,--config}'[retrieve settings for Bumblebee from FILE]:file:_files' -# '(-l --ldpath)'{-l,--ldpath}'[PATH the libraries like libGL.so are searched in]:file:_files' -# '(-s --socket)'{-s,--socket}'[use FILE for communication with the daemon]:file:_files' - '*::arguments: _normal' + '--version[output version information]' + '(-h --help)'{-h,--help}'[show help]' + '(-c --vgl-compress)'{-c,--vgl-compress}'[image transport method]:method:(proxy jpeg rgb xb yuv)' + '--failsafe[run a program even if the nvidia card is unavailable]' + '--no-failsafe[do not run a program if the nvidia card is unavailable]' + '--vgl-options[options to be passed to vglrun (example: +tr)]' + '(-q --quiet --silent)'{-q,--quiet,--silent}'[supress all logging messages]' + '(-v --verbose)'{-v,--verbose}'[increase the verbosity level of log messages]' + '--debug[set the verbosity level to the maximum]' + '(-d --display)'{-d,--display}'[the X display number to use]' + '(-C --config)'{-C,--config}'[retrieve settings for Bumblebee from FILE]:file:_files' + '(-l --ldpath)'{-l,--ldpath}'[PATH the libraries like libGL.so are searched in]:file:_files -/' + '(-s --socket)'{-s,--socket}'[use FILE for communication with the daemon]:file:_files' ) _arguments $args From 2b4c36125b71b1c807ee083469a680eaa861fbdd Mon Sep 17 00:00:00 2001 From: Limao Luo Date: Sat, 11 May 2013 11:55:25 -0400 Subject: [PATCH 6/6] fixed description --- src/_primus | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_primus b/src/_primus index f400783..5eae43f 100644 --- a/src/_primus +++ b/src/_primus @@ -1,9 +1,9 @@ -#compdef primus +# compdef primus # ------------------------------------------------------------------------------ # Description # ----------- # -# Completion script for ack 1.94 (http://betterthangrep.com). +# Completion script for primus (https://github.com/amonakov/primus). # # ------------------------------------------------------------------------------ # Authors