summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2023-12-19 16:37:44 -0800
committerGitHub <noreply@github.com>2023-12-19 16:37:44 -0800
commit5d50ad3941ebeee95d972baff265e31be22a380a (patch)
tree8b9bd1c15f21bcaf46c79b5862dc0031d4e500e1 /share
parenta43156a86131a0b138f356a2721709a2070665ca (diff)
downloadspack-5d50ad3941ebeee95d972baff265e31be22a380a.tar.gz
spack-5d50ad3941ebeee95d972baff265e31be22a380a.tar.bz2
spack-5d50ad3941ebeee95d972baff265e31be22a380a.tar.xz
spack-5d50ad3941ebeee95d972baff265e31be22a380a.zip
"spack diff": add ignore option for dependencies (#41711)
* add trim function to `Spec` and `--ignore` option to 'spack diff' Allows user to compare two specs while ignoring the sub-DAG of a particular dependency, e.g. spack diff --ignore=mpi --ignore=zlib trilinos/abcdef trilinos/fedcba to focus on differences closer to the root of the software stack
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/spack-completion.bash2
-rwxr-xr-xshare/spack/spack-completion.fish4
2 files changed, 4 insertions, 2 deletions
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash
index 85358fbdcc..6ebba8e1ee 100755
--- a/share/spack/spack-completion.bash
+++ b/share/spack/spack-completion.bash
@@ -999,7 +999,7 @@ _spack_develop() {
_spack_diff() {
if $list_options
then
- SPACK_COMPREPLY="-h --help --json --first -a --attribute"
+ SPACK_COMPREPLY="-h --help --json --first -a --attribute --ignore"
else
_all_packages
fi
diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish
index a05cb6c658..cce1622217 100755
--- a/share/spack/spack-completion.fish
+++ b/share/spack/spack-completion.fish
@@ -1405,7 +1405,7 @@ complete -c spack -n '__fish_spack_using_command develop' -s f -l force -r -f -a
complete -c spack -n '__fish_spack_using_command develop' -s f -l force -r -d 'remove any files or directories that block cloning source code'
# spack diff
-set -g __fish_spack_optspecs_spack_diff h/help json first a/attribute=
+set -g __fish_spack_optspecs_spack_diff h/help json first a/attribute= ignore=
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 diff' -f -a '(__fish_spack_installed_specs)'
complete -c spack -n '__fish_spack_using_command diff' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command diff' -s h -l help -d 'show this help message and exit'
@@ -1415,6 +1415,8 @@ complete -c spack -n '__fish_spack_using_command diff' -l first -f -a load_first
complete -c spack -n '__fish_spack_using_command diff' -l first -d 'load the first match if multiple packages match the spec'
complete -c spack -n '__fish_spack_using_command diff' -s a -l attribute -r -f -a attribute
complete -c spack -n '__fish_spack_using_command diff' -s a -l attribute -r -d 'select the attributes to show (defaults to all)'
+complete -c spack -n '__fish_spack_using_command diff' -l ignore -r -f -a ignore
+complete -c spack -n '__fish_spack_using_command diff' -l ignore -r -d 'omit diffs related to these dependencies'
# spack docs
set -g __fish_spack_optspecs_spack_docs h/help