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

This commit is contained in:
百地 希留耶 2022-03-10 00:09:57 +09:00 committed by GitHub
parent 3df90e3e33
commit 3370d3f57e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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"
}
@ -1793,7 +1793,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
}