From af02774b3ef1ed2cce63a7fba12877744c911371 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 16 Aug 2017 15:58:09 -0500 Subject: Add tab completion & update docs for buildcache This adds tab completion and fixes some formatting issues in the documentation for the "spack buildcache" command. --- share/spack/spack-completion.bash | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'share') diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 46070d68cc..408aaf61ac 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -152,6 +152,50 @@ function _spack_build { fi } +function _spack_buildcache { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "create install keys list" -- "$cur" + fi +} + +function _spack_buildcache_create { + if $list_options + then + compgen -W "-h --help -r --rel -f --force -y --yes-to-all -k --key + -d --directory" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_buildcache_install { + if $list_options + then + compgen -W "-h --help -f --force -y --yes-to-all" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_buildcache_keys { + if $list_options + then + compgen -W "-h --help -i --install -y --yes-to-all" -- "$cur" + fi +} + +function _spack_buildcache_list { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + function _spack_cd { if $list_options then -- cgit v1.2.3-70-g09d2