Feature: add option to create view by copying/relocating files (#16480)

* add subcommand `spack view copy/relocate`

* update bash completions

* add copy/relocate commands to view tests

* allow copied views to be removed
This commit is contained in:
Greg Becker
2020-06-03 09:45:13 -07:00
committed by GitHub
parent 7aa9cb0f7a
commit 3347ef2de4
6 changed files with 108 additions and 17 deletions

View File

@@ -1521,7 +1521,7 @@ _spack_view() {
then
SPACK_COMPREPLY="-h --help -v --verbose -e --exclude -d --dependencies"
else
SPACK_COMPREPLY="symlink add soft hardlink hard remove rm statlink status check"
SPACK_COMPREPLY="symlink add soft hardlink hard copy relocate remove rm statlink status check"
fi
}
@@ -1570,6 +1570,24 @@ _spack_view_hard() {
fi
}
_spack_view_copy() {
if $list_options
then
SPACK_COMPREPLY="-h --help --projection-file -i --ignore-conflicts"
else
_all_packages
fi
}
_spack_view_relocate() {
if $list_options
then
SPACK_COMPREPLY="-h --help --projection-file -i --ignore-conflicts"
else
_all_packages
fi
}
_spack_view_remove() {
if $list_options
then