diff options
author | 2014-12-19 18:56:16 -0800 | |
---|---|---|
committer | 2014-12-19 18:56:56 -0800 | |
commit | 708df14d7aa473c8eafdccadc71ab557146646b4 (patch) | |
tree | d8e382cb632599617641eb634f04016ef91add0b | |
parent | drop unnecessary softtabstop setting for vim (diff) | |
download | zsh-completion-708df14d7aa473c8eafdccadc71ab557146646b4.tar.gz zsh-completion-708df14d7aa473c8eafdccadc71ab557146646b4.tar.bz2 zsh-completion-708df14d7aa473c8eafdccadc71ab557146646b4.zip |
_binutils-config: add initial completions for binutils-config
Mostly based off _gcc-config.
-rw-r--r-- | src/_binutils-config | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/_binutils-config b/src/_binutils-config new file mode 100644 index 0000000..30064b3 --- /dev/null +++ b/src/_binutils-config @@ -0,0 +1,23 @@ +#compdef binutils-config + +local arguments + +arguments=( + '(- :)'{--get-current-profile,-c}'[print current profile]' + '(- :)'{--list-profiles,-l}'[print a list of available profiles]' + '(- :)'{--uninstall,-u}'[remove all signs of specified target]' + '(- :)'{--debug,-d}'[execute with debug output]' + '(- :)'{--help,-h}'[show help]' + '(- :):profiles:_binutils_profiles' +) + +_binutils_profiles() { + local profiles + profiles=(${(f)"$(_call_program binutils-installed RC_NOCOLOR=yes binutils-config --list-profiles)"}) + profiles=${${profiles/\[([^]]*)\]/}/\*} + _tags profiles && { compadd "$@" -k profiles || compadd "$@" ${(kv)=profiles} } +} + +_arguments $arguments + +# vim: set et sw=2 ts=2 ft=zsh: |