diff options
Diffstat (limited to 'share/spack/qa/update-completion-scripts.sh')
-rwxr-xr-x | share/spack/qa/update-completion-scripts.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/share/spack/qa/update-completion-scripts.sh b/share/spack/qa/update-completion-scripts.sh new file mode 100755 index 0000000000..8fcd321457 --- /dev/null +++ b/share/spack/qa/update-completion-scripts.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +# Updates Spack's shell tab completion scripts + +# Switch to parent directory +QA_DIR="$(dirname "${BASH_SOURCE[0]}")" +cd "$QA_DIR/.." + +# Update each shell +for shell in bash # zsh fish +do + header=$shell/spack-completion.in + script=spack-completion.$shell + + rm -f $script + spack commands --aliases --format=$shell --header=$header --update=$script + chmod +x $script +done |