Skip to content

Commit

Permalink
Add -t short option for spack --backtrace (spack#47227)
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Gamblin <[email protected]>
  • Loading branch information
tgamblin authored Oct 26, 2024
1 parent 61d2d21 commit c8bebff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions lib/spack/spack/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ def make_argument_parser(**kwargs):
help="add stacktraces to all printed statements",
)
parser.add_argument(
"-t",
"--backtrace",
action="store_true",
default="SPACK_BACKTRACE" in os.environ,
Expand Down
2 changes: 1 addition & 1 deletion share/spack/spack-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ SPACK_ALIASES="concretise:concretize;containerise:containerize;rm:remove"
_spack() {
if $list_options
then
SPACK_COMPREPLY="-h --help -H --all-help --color -c --config -C --config-scope -d --debug --timestamp --pdb -e --env -D --env-dir -E --no-env --use-env-repo -k --insecure -l --enable-locks -L --disable-locks -m --mock -b --bootstrap -p --profile --sorted-profile --lines -v --verbose --stacktrace --backtrace -V --version --print-shell-vars"
SPACK_COMPREPLY="-h --help -H --all-help --color -c --config -C --config-scope -d --debug --timestamp --pdb -e --env -D --env-dir -E --no-env --use-env-repo -k --insecure -l --enable-locks -L --disable-locks -m --mock -b --bootstrap -p --profile --sorted-profile --lines -v --verbose --stacktrace -t --backtrace -V --version --print-shell-vars"
else
SPACK_COMPREPLY="add arch audit blame bootstrap build-env buildcache cd change checksum ci clean clone commands compiler compilers concretize concretise config containerize containerise create debug deconcretize dependencies dependents deprecate dev-build develop diff docs edit env extensions external fetch find gc gpg graph help info install license list load location log-parse logs maintainers make-installer mark mirror module patch pkg providers pydoc python reindex remove rm repo resource restage solve spec stage style tags test test-env tutorial undevelop uninstall unit-test unload url verify versions view"
fi
Expand Down
6 changes: 3 additions & 3 deletions share/spack/spack-completion.fish
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ complete -c spack --erase
# Everything below here is auto-generated.

# spack
set -g __fish_spack_optspecs_spack h/help H/all-help color= c/config= C/config-scope= d/debug timestamp pdb e/env= D/env-dir= E/no-env use-env-repo k/insecure l/enable-locks L/disable-locks m/mock b/bootstrap p/profile sorted-profile= lines= v/verbose stacktrace backtrace V/version print-shell-vars=
set -g __fish_spack_optspecs_spack h/help H/all-help color= c/config= C/config-scope= d/debug timestamp pdb e/env= D/env-dir= E/no-env use-env-repo k/insecure l/enable-locks L/disable-locks m/mock b/bootstrap p/profile sorted-profile= lines= v/verbose stacktrace t/backtrace V/version print-shell-vars=
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a add -d 'add a spec to an environment'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a arch -d 'print architecture information about this machine'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a audit -d 'audit configuration files, packages, etc.'
Expand Down Expand Up @@ -473,8 +473,8 @@ complete -c spack -n '__fish_spack_using_command ' -s v -l verbose -f -a verbose
complete -c spack -n '__fish_spack_using_command ' -s v -l verbose -d 'print additional output during builds'
complete -c spack -n '__fish_spack_using_command ' -l stacktrace -f -a stacktrace
complete -c spack -n '__fish_spack_using_command ' -l stacktrace -d 'add stacktraces to all printed statements'
complete -c spack -n '__fish_spack_using_command ' -l backtrace -f -a backtrace
complete -c spack -n '__fish_spack_using_command ' -l backtrace -d 'always show backtraces for exceptions'
complete -c spack -n '__fish_spack_using_command ' -s t -l backtrace -f -a backtrace
complete -c spack -n '__fish_spack_using_command ' -s t -l backtrace -d 'always show backtraces for exceptions'
complete -c spack -n '__fish_spack_using_command ' -s V -l version -f -a version
complete -c spack -n '__fish_spack_using_command ' -s V -l version -d 'show version number and exit'
complete -c spack -n '__fish_spack_using_command ' -l print-shell-vars -r -f -a print_shell_vars
Expand Down

0 comments on commit c8bebff

Please sign in to comment.