Fix suffix of tab completion scripts (#39154)

pull/39359/head
Adam J. Stewart 2023-08-09 08:28:55 -05:00 committed by GitHub
parent e51748ee8f
commit 39d4c402d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 8 deletions

View File

@ -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"),
},
}

View File

@ -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))

View File

@ -7,7 +7,7 @@
# NOTE: spack-completion.bash is auto-generated by:
#
# $ spack commands --aliases --format=bash
# --header=bash/spack-completion.in --update=spack-completion.bash
# --header=bash/spack-completion.bash --update=spack-completion.bash
#
# Please do not manually modify this file.

View File

@ -6,7 +6,7 @@
# NOTE: spack-completion.fish is auto-generated by:
#
# $ spack commands --aliases --format=fish
# --header=fish/spack-completion.in --update=spack-completion.fish
# --header=fish/spack-completion.fish --update=spack-completion.fish
#
# Please do not manually modify this file.

View File

@ -7,7 +7,7 @@
# NOTE: spack-completion.bash is auto-generated by:
#
# $ spack commands --aliases --format=bash
# --header=bash/spack-completion.in --update=spack-completion.bash
# --header=bash/spack-completion.bash --update=spack-completion.bash
#
# Please do not manually modify this file.

View File

@ -6,7 +6,7 @@
# NOTE: spack-completion.fish is auto-generated by:
#
# $ spack commands --aliases --format=fish
# --header=fish/spack-completion.in --update=spack-completion.fish
# --header=fish/spack-completion.fish --update=spack-completion.fish
#
# Please do not manually modify this file.