Fix tab completion erroring with spack unit-test (#29405)

This commit is contained in:
百地 希留耶
2022-03-10 00:09:57 +09:00
committed by Massimiliano Culpo
parent 9edfd25134
commit d4f2326824
3 changed files with 6 additions and 6 deletions

View File

@@ -117,7 +117,7 @@ def format(self, cmd):
'virtual': '_providers',
'namespace': '_repos',
'hash': '_all_resource_hashes',
'pytest': '_tests',
'pytest': '_unit_tests',
}

View File

@@ -208,10 +208,10 @@ _repos() {
SPACK_COMPREPLY="$SPACK_REPOS"
}
_tests() {
_unit_tests() {
if [[ -z "${SPACK_TESTS:-}" ]]
then
SPACK_TESTS="$(spack test -l)"
SPACK_TESTS="$(spack unit-test -l)"
fi
SPACK_COMPREPLY="$SPACK_TESTS"
}

View File

@@ -208,10 +208,10 @@ _repos() {
SPACK_COMPREPLY="$SPACK_REPOS"
}
_tests() {
_unit_tests() {
if [[ -z "${SPACK_TESTS:-}" ]]
then
SPACK_TESTS="$(spack test -l)"
SPACK_TESTS="$(spack unit-test -l)"
fi
SPACK_COMPREPLY="$SPACK_TESTS"
}
@@ -1780,7 +1780,7 @@ _spack_unit_test() {
then
SPACK_COMPREPLY="-h --help -H --pytest-help -l --list -L --list-long -N --list-names --extension -s -k --showlocals"
else
_tests
_unit_tests
fi
}