diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2023-08-09 08:28:55 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-09 08:28:55 -0500 |
commit | 39d4c402d568c520377378e4246c198f2f07de06 (patch) | |
tree | 9043e4fd9316eead037dfe93cb8a4ee2ac4f3db5 /lib | |
parent | e51748ee8f89e0d3db4e426e3d04157129a45622 (diff) | |
download | spack-39d4c402d568c520377378e4246c198f2f07de06.tar.gz spack-39d4c402d568c520377378e4246c198f2f07de06.tar.bz2 spack-39d4c402d568c520377378e4246c198f2f07de06.tar.xz spack-39d4c402d568c520377378e4246c198f2f07de06.zip |
Fix suffix of tab completion scripts (#39154)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/commands.py | 4 | ||||
-rw-r--r-- | lib/spack/spack/test/cmd/commands.py | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/spack/spack/cmd/commands.py b/lib/spack/spack/cmd/commands.py index a65031387d..61be25f036 100644 --- a/lib/spack/spack/cmd/commands.py +++ b/lib/spack/spack/cmd/commands.py @@ -36,13 +36,13 @@ update_completion_args: Dict[str, Dict[str, Any]] = { "bash": { "aliases": True, "format": "bash", - "header": os.path.join(spack.paths.share_path, "bash", "spack-completion.in"), + "header": os.path.join(spack.paths.share_path, "bash", "spack-completion.bash"), "update": os.path.join(spack.paths.share_path, "spack-completion.bash"), }, "fish": { "aliases": True, "format": "fish", - "header": os.path.join(spack.paths.share_path, "fish", "spack-completion.in"), + "header": os.path.join(spack.paths.share_path, "fish", "spack-completion.fish"), "update": os.path.join(spack.paths.share_path, "spack-completion.fish"), }, } diff --git a/lib/spack/spack/test/cmd/commands.py b/lib/spack/spack/test/cmd/commands.py index 7a531b4f91..5bd0e20e60 100644 --- a/lib/spack/spack/test/cmd/commands.py +++ b/lib/spack/spack/test/cmd/commands.py @@ -219,7 +219,8 @@ def test_fish_completion(): def test_update_completion_arg(shell, tmpdir, monkeypatch): """Test the update completion flag.""" - mock_infile = tmpdir.join("spack-completion.in") + tmpdir.join(shell).mkdir() + mock_infile = tmpdir.join(shell).join(f"spack-completion.{shell}") mock_outfile = tmpdir.join(f"spack-completion.{shell}") mock_args = { @@ -267,7 +268,7 @@ def test_updated_completion_scripts(shell, tmpdir): "and adding the changed files to your pull request." ) - header = os.path.join(spack.paths.share_path, shell, "spack-completion.in") + header = os.path.join(spack.paths.share_path, shell, f"spack-completion.{shell}") script = "spack-completion.{0}".format(shell) old_script = os.path.join(spack.paths.share_path, script) new_script = str(tmpdir.join(script)) |