diff options
author | Tim Harder <radhermit@gentoo.org> | 2014-12-19 19:05:04 -0800 |
---|---|---|
committer | Tim Harder <radhermit@gentoo.org> | 2014-12-19 19:07:51 -0800 |
commit | 524e4a3e05aebb8aa7aab93468178ad599291fbd (patch) | |
tree | c57e6116ee6f5a2fc21f182c92c1265f4041c0d6 | |
parent | _binutils-config: add initial completions for binutils-config (diff) | |
download | zsh-completion-524e4a3e05aebb8aa7aab93468178ad599291fbd.tar.gz zsh-completion-524e4a3e05aebb8aa7aab93468178ad599291fbd.tar.bz2 zsh-completion-524e4a3e05aebb8aa7aab93468178ad599291fbd.zip |
_gcc-config: update for gcc-config-1.8 options
-rw-r--r-- | src/_gcc-config | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/_gcc-config b/src/_gcc-config index 4f89485..e4dfb51 100644 --- a/src/_gcc-config +++ b/src/_gcc-config @@ -1,28 +1,27 @@ #compdef gcc-config - -# Author oberyno <oberyno@gmail.com> +# gcc-config-1.8 local arguments arguments=( + '(- :)'{--nocolor,-C}'[disable colored output]' '(- :)'{--use-old,-O}'[use the old profile if one was selected]' - '(- :)'{--use-portage-chost,-P}'[only set profile if its CHOST matches /etc/{portage/}make.conf]:profiles:_gcc_profile' + '(- :)'{--force,-f}'[make sure all config files are regenerated]' '(- :)'{--get-current-profile,-c}'[print current used gcc profile]' '(- :)'{--list-profiles,-l}'[print a list of available profiles]' - '(- :)'{--print-environ,-E}'[print environment of the given/current profile]:profiles:_gcc_profile' - '(- :)'{--get-bin-path,-B}'[print binary path of given/current profile]:profiles:_gcc_profile' - '(- :)'{--get-lib-path,-L}'[print library path of given/current profile]:profiles:_gcc_profile' - '(- :)'{--get-stdcxx-incdir,-X}'[print g++ include path of given/current profile]:profiles:_gcc_profile' + '(- :)'{--split-profile,-S}'[split profiles into their components]' + '(- :)'{--print-environ,-E}'[print environment of the given/current profile]:profiles:_gcc_profiles' + '(- :)'{--get-bin-path,-B}'[print binary path of given/current profile]:profiles:_gcc_profiles' + '(- :)'{--get-lib-path,-L}'[print library path of given/current profile]:profiles:_gcc_profiles' '(- :)'{--help,-h}'[show help]' - '(- :)'{--version,-v}'[show version info]' - '(- :):profiles:_gcc_profile' + '(- :):profiles:_gcc_profiles' ) -_gcc_profile(){ - local profile - profile=(${(f)"$(_call_program gcc-installed RC_NOCOLOR=yes gcc-config --list-profiles)"}) - profile=${${profile/\[([^]]*)\]/}/\*} - _tags profile && { compadd "$@" -k profile || compadd "$@" ${(kv)=profile} } +_gcc_profiles(){ + local profiles + profiles=(${(f)"$(_call_program gcc-installed RC_NOCOLOR=yes gcc-config --list-profiles)"}) + profiles=${${profiles/\[([^]]*)\]/}/\*} + _tags profiles && { compadd "$@" -k profiles || compadd "$@" ${(kv)=profiles} } } _arguments $arguments |