summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2018-07-23 08:05:55 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2018-07-24 11:27:17 -0700
commit5b8b7a5873672170ce57a84e5d1ca0b0e065d933 (patch)
tree81f3e66e3c22fe14dfcf1cd2bd642f4e22dc84c1 /share
parent6bb2256043e5d19dd2eb3e06e9ca30b4604fd374 (diff)
downloadspack-5b8b7a5873672170ce57a84e5d1ca0b0e065d933.tar.gz
spack-5b8b7a5873672170ce57a84e5d1ca0b0e065d933.tar.bz2
spack-5b8b7a5873672170ce57a84e5d1ca0b0e065d933.tar.xz
spack-5b8b7a5873672170ce57a84e5d1ca0b0e065d933.zip
The auto-completion file is now consistent with `spack module`
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/spack-completion.bash134
1 files changed, 124 insertions, 10 deletions
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash
index e562248d9d..e5de003814 100755
--- a/share/spack/spack-completion.bash
+++ b/share/spack/spack-completion.bash
@@ -647,44 +647,158 @@ function _spack_module {
then
compgen -W "-h --help" -- "$cur"
else
- compgen -W "find loads refresh rm" -- "$cur"
+ compgen -W "lmod tcl dotkit" -- "$cur"
fi
}
-function _spack_module_find {
+function _spack_module_tcl {
if $list_options
then
- compgen -W "-h --help --full-path -m --module-type" -- "$cur"
+ compgen -W "-h --help" -- "$cur"
+ else
+ compgen -W "refresh find rm loads" -- "$cur"
+ fi
+}
+
+
+function _spack_module_tcl_find {
+ if $list_options
+ then
+ compgen -W "-h --help --full-path -r --dependencies" -- "$cur"
else
compgen -W "$(_installed_packages)" -- "$cur"
fi
}
-function _spack_module_loads {
+function _spack_module_tcl_loads {
if $list_options
then
compgen -W "-h --help --input-only -p --prefix -x --exclude
- -m --module-type -r --dependencies" -- "$cur"
+ -r --dependencies" -- "$cur"
else
compgen -W "$(_installed_packages)" -- "$cur"
fi
}
-function _spack_module_refresh {
+function _spack_module_tcl_refresh {
if $list_options
then
- compgen -W "-h --help --delete-tree -m --module-type
- -y --yes-to-all" -- "$cur"
+ compgen -W "-h --help --delete-tree -y --yes-to-all" -- "$cur"
+ else
+ compgen -W "$(_installed_packages)" -- "$cur"
+ fi
+}
+
+function _spack_module_tcl_rm {
+ if $list_options
+ then
+ compgen -W "-h --help -y --yes-to-all" -- "$cur"
+ else
+ compgen -W "$(_installed_packages)" -- "$cur"
+ fi
+}
+
+function _spack_module_dotkit {
+ if $list_options
+ then
+ compgen -W "-h --help" -- "$cur"
+ else
+ compgen -W "refresh find rm loads" -- "$cur"
+ fi
+}
+
+
+function _spack_module_dotkit_find {
+ if $list_options
+ then
+ compgen -W "-h --help --full-path -r --dependencies" -- "$cur"
+ else
+ compgen -W "$(_installed_packages)" -- "$cur"
+ fi
+}
+
+function _spack_module_dotkit_loads {
+ if $list_options
+ then
+ compgen -W "-h --help --input-only -p --prefix -x --exclude
+ -r --dependencies" -- "$cur"
+ else
+ compgen -W "$(_installed_packages)" -- "$cur"
+ fi
+
+}
+
+function _spack_module_dotkit_refresh {
+ if $list_options
+ then
+ compgen -W "-h --help --delete-tree -y --yes-to-all" -- "$cur"
else
compgen -W "$(_installed_packages)" -- "$cur"
fi
}
-function _spack_module_rm {
+function _spack_module_dotkit_rm {
if $list_options
then
- compgen -W "-h --help -m --module-type -y --yes-to-all" -- "$cur"
+ compgen -W "-h --help -y --yes-to-all" -- "$cur"
+ else
+ compgen -W "$(_installed_packages)" -- "$cur"
+ fi
+}
+
+function _spack_module_lmod {
+ if $list_options
+ then
+ compgen -W "-h --help" -- "$cur"
+ else
+ compgen -W "refresh find rm loads setdefault" -- "$cur"
+ fi
+}
+
+
+function _spack_module_lmod_find {
+ if $list_options
+ then
+ compgen -W "-h --help --full-path -r --dependencies" -- "$cur"
+ else
+ compgen -W "$(_installed_packages)" -- "$cur"
+ fi
+}
+
+function _spack_module_lmod_loads {
+ if $list_options
+ then
+ compgen -W "-h --help --input-only -p --prefix -x --exclude
+ -r --dependencies" -- "$cur"
+ else
+ compgen -W "$(_installed_packages)" -- "$cur"
+ fi
+
+}
+
+function _spack_module_lmod_refresh {
+ if $list_options
+ then
+ compgen -W "-h --help --delete-tree -y --yes-to-all" -- "$cur"
+ else
+ compgen -W "$(_installed_packages)" -- "$cur"
+ fi
+}
+
+function _spack_module_lmod_rm {
+ if $list_options
+ then
+ compgen -W "-h --help -y --yes-to-all" -- "$cur"
+ else
+ compgen -W "$(_installed_packages)" -- "$cur"
+ fi
+}
+
+function _spack_module_lmod_setdefault {
+ if $list_options
+ then
+ compgen -W "-h --help" -- "$cur"
else
compgen -W "$(_installed_packages)" -- "$cur"
fi