From 90ac0ef66e3458dd022b78825637dd0d927e36ec Mon Sep 17 00:00:00 2001 From: 百地 希留耶 <65301509+KiruyaMomochi@users.noreply.github.com> Date: Sat, 22 Jul 2023 21:55:12 +0800 Subject: Implement fish completion (#29549) * commands: provide more information to Command * fish: Add script to generate fish completion * fish: auto prepend `spack` command to avoid duplication * fish: impove completion generation code readability * commands: replace match-case with if-else * fish: fix optspec variable name prefix * fish: fix return value in get_optspecs * fish: fix return value in get_optspecs * format: split long line and trim trailing space * bugfix: replace f-string with interpolation * fish: compete more specs and some fixes * fish: complete hash spec starts with / * fish: improve compatibility * style: trim trailing whitespace * commands: add fish to update args and update tests * commands: add fish completion file * style: merge imports * fish: source completion in setup-env * fish: caret only completes dependencies * fish: make sure we always get same order of output * fish: spack activate only show installed packages that have extensions * fish: update completion file * fish: make dict keys sorted * Blacken code * Fix bad merge * Undo style changes to setup-env.fish * Fix unit tests * Style fix * Compatible with fish_indent * Use list for stability of order * Sort one more place * Sort more things * Sorting unneeded * Unsort * Print difference * Style fix * Help messages need quotes * Arguments to -a must be quoted * Update types * Update types * Update types * Add type hints * Change order of positionals * Always expand help * Remove shared base class * Fix type hints * Remove platform-specific choices * First line of help only * Remove unused maps * Remove suppress * Remove debugging comments * Better quoting * Fish completions have no double dash * Remove test for deleted class * Fix grammar in header file * Use single quotes in most places * Better support for remainder nargs * No magic strings * * and + can also complete multiple * lower case, no period --------- Co-authored-by: Adam J. Stewart --- lib/spack/llnl/util/argparsewriter.py | 167 +- lib/spack/spack/cmd/commands.py | 472 +++- lib/spack/spack/cmd/mirror.py | 4 +- lib/spack/spack/test/cmd/commands.py | 75 +- lib/spack/spack/test/llnl/util/argparsewriter.py | 10 - share/spack/fish/spack-completion.in | 347 +++ share/spack/setup-env.fish | 8 + share/spack/spack-completion.fish | 3029 ++++++++++++++++++++++ 8 files changed, 3947 insertions(+), 165 deletions(-) create mode 100644 share/spack/fish/spack-completion.in create mode 100755 share/spack/spack-completion.fish diff --git a/lib/spack/llnl/util/argparsewriter.py b/lib/spack/llnl/util/argparsewriter.py index dfd602bb34..60a404abd4 100644 --- a/lib/spack/llnl/util/argparsewriter.py +++ b/lib/spack/llnl/util/argparsewriter.py @@ -9,7 +9,7 @@ import io import re import sys from argparse import ArgumentParser -from typing import IO, Optional, Sequence, Tuple +from typing import IO, Any, Iterable, List, Optional, Sequence, Tuple, Union class Command: @@ -25,9 +25,9 @@ class Command: prog: str, description: Optional[str], usage: str, - positionals: Sequence[Tuple[str, str]], - optionals: Sequence[Tuple[Sequence[str], str, str]], - subcommands: Sequence[Tuple[ArgumentParser, str]], + positionals: List[Tuple[str, Optional[Iterable[Any]], Union[int, str, None], str]], + optionals: List[Tuple[Sequence[str], List[str], str, Union[int, str, None], str]], + subcommands: List[Tuple[ArgumentParser, str, str]], ) -> None: """Initialize a new Command instance. @@ -96,13 +96,30 @@ class ArgparseWriter(argparse.HelpFormatter, abc.ABC): if action.option_strings: flags = action.option_strings dest_flags = fmt._format_action_invocation(action) - help = self._expand_help(action) if action.help else "" - help = help.replace("\n", " ") - optionals.append((flags, dest_flags, help)) + nargs = action.nargs + help = ( + self._expand_help(action) + if action.help and action.help != argparse.SUPPRESS + else "" + ) + help = help.split("\n")[0] + + if action.choices is not None: + dest = [str(choice) for choice in action.choices] + else: + dest = [action.dest] + + optionals.append((flags, dest, dest_flags, nargs, help)) elif isinstance(action, argparse._SubParsersAction): for subaction in action._choices_actions: subparser = action._name_parser_map[subaction.dest] - subcommands.append((subparser, subaction.dest)) + help = ( + self._expand_help(subaction) + if subaction.help and action.help != argparse.SUPPRESS + else "" + ) + help = help.split("\n")[0] + subcommands.append((subparser, subaction.dest, help)) # Look for aliases of the form 'name (alias, ...)' if self.aliases and isinstance(subaction.metavar, str): @@ -111,12 +128,22 @@ class ArgparseWriter(argparse.HelpFormatter, abc.ABC): aliases = match.group(2).split(", ") for alias in aliases: subparser = action._name_parser_map[alias] - subcommands.append((subparser, alias)) + help = ( + self._expand_help(subaction) + if subaction.help and action.help != argparse.SUPPRESS + else "" + ) + help = help.split("\n")[0] + subcommands.append((subparser, alias, help)) else: args = fmt._format_action_invocation(action) - help = self._expand_help(action) if action.help else "" - help = help.replace("\n", " ") - positionals.append((args, help)) + help = ( + self._expand_help(action) + if action.help and action.help != argparse.SUPPRESS + else "" + ) + help = help.split("\n")[0] + positionals.append((args, action.choices, action.nargs, help)) return Command(prog, description, usage, positionals, optionals, subcommands) @@ -146,7 +173,7 @@ class ArgparseWriter(argparse.HelpFormatter, abc.ABC): cmd = self.parse(parser, prog) self.out.write(self.format(cmd)) - for subparser, prog in cmd.subcommands: + for subparser, prog, help in cmd.subcommands: self._write(subparser, prog, level=level + 1) def write(self, parser: ArgumentParser) -> None: @@ -205,13 +232,13 @@ class ArgparseRstWriter(ArgparseWriter): if cmd.positionals: string.write(self.begin_positionals()) - for args, help in cmd.positionals: + for args, choices, nargs, help in cmd.positionals: string.write(self.positional(args, help)) string.write(self.end_positionals()) if cmd.optionals: string.write(self.begin_optionals()) - for flags, dest_flags, help in cmd.optionals: + for flags, dest, dest_flags, nargs, help in cmd.optionals: string.write(self.optional(dest_flags, help)) string.write(self.end_optionals()) @@ -338,7 +365,7 @@ class ArgparseRstWriter(ArgparseWriter): """ return "" - def begin_subcommands(self, subcommands: Sequence[Tuple[ArgumentParser, str]]) -> str: + def begin_subcommands(self, subcommands: List[Tuple[ArgumentParser, str, str]]) -> str: """Table with links to other subcommands. Arguments: @@ -355,114 +382,8 @@ class ArgparseRstWriter(ArgparseWriter): """ - for cmd, _ in subcommands: + for cmd, _, _ in subcommands: prog = re.sub(r"^[^ ]* ", "", cmd.prog) string += " * :ref:`{0} <{1}>`\n".format(prog, cmd.prog.replace(" ", "-")) return string + "\n" - - -class ArgparseCompletionWriter(ArgparseWriter): - """Write argparse output as shell programmable tab completion functions.""" - - def format(self, cmd: Command) -> str: - """Return the string representation of a single node in the parser tree. - - Args: - cmd: Parsed information about a command or subcommand. - - Returns: - String representation of this subcommand. - """ - - assert cmd.optionals # we should always at least have -h, --help - assert not (cmd.positionals and cmd.subcommands) # one or the other - - # We only care about the arguments/flags, not the help messages - positionals: Tuple[str, ...] = () - if cmd.positionals: - positionals, _ = zip(*cmd.positionals) - optionals, _, _ = zip(*cmd.optionals) - subcommands: Tuple[str, ...] = () - if cmd.subcommands: - _, subcommands = zip(*cmd.subcommands) - - # Flatten lists of lists - optionals = [x for xx in optionals for x in xx] - - return ( - self.start_function(cmd.prog) - + self.body(positionals, optionals, subcommands) - + self.end_function(cmd.prog) - ) - - def start_function(self, prog: str) -> str: - """Return the syntax needed to begin a function definition. - - Args: - prog: Program name. - - Returns: - Function definition beginning. - """ - name = prog.replace("-", "_").replace(" ", "_") - return "\n_{0}() {{".format(name) - - def end_function(self, prog: str) -> str: - """Return the syntax needed to end a function definition. - - Args: - prog: Program name - - Returns: - Function definition ending. - """ - return "}\n" - - def body( - self, positionals: Sequence[str], optionals: Sequence[str], subcommands: Sequence[str] - ) -> str: - """Return the body of the function. - - Args: - positionals: List of positional arguments. - optionals: List of optional arguments. - subcommands: List of subcommand parsers. - - Returns: - Function body. - """ - return "" - - def positionals(self, positionals: Sequence[str]) -> str: - """Return the syntax for reporting positional arguments. - - Args: - positionals: List of positional arguments. - - Returns: - Syntax for positional arguments. - """ - return "" - - def optionals(self, optionals: Sequence[str]) -> str: - """Return the syntax for reporting optional flags. - - Args: - optionals: List of optional arguments. - - Returns: - Syntax for optional flags. - """ - return "" - - def subcommands(self, subcommands: Sequence[str]) -> str: - """Return the syntax for reporting subcommands. - - Args: - subcommands: List of subcommand parsers. - - Returns: - Syntax for subcommand parsers - """ - return "" diff --git a/lib/spack/spack/cmd/commands.py b/lib/spack/spack/cmd/commands.py index 6af7bb54e8..a65031387d 100644 --- a/lib/spack/spack/cmd/commands.py +++ b/lib/spack/spack/cmd/commands.py @@ -9,16 +9,11 @@ import os import re import sys from argparse import ArgumentParser, Namespace -from typing import IO, Any, Callable, Dict, Sequence, Set +from typing import IO, Any, Callable, Dict, Iterable, List, Optional, Sequence, Set, Tuple, Union import llnl.util.filesystem as fs import llnl.util.tty as tty -from llnl.util.argparsewriter import ( - ArgparseCompletionWriter, - ArgparseRstWriter, - ArgparseWriter, - Command, -) +from llnl.util.argparsewriter import ArgparseRstWriter, ArgparseWriter, Command from llnl.util.tty.colify import colify import spack.cmd @@ -43,7 +38,13 @@ update_completion_args: Dict[str, Dict[str, Any]] = { "format": "bash", "header": os.path.join(spack.paths.share_path, "bash", "spack-completion.in"), "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"), + "update": os.path.join(spack.paths.share_path, "spack-completion.fish"), + }, } @@ -178,9 +179,63 @@ _positional_to_subroutine: Dict[str, str] = { } -class BashCompletionWriter(ArgparseCompletionWriter): +class BashCompletionWriter(ArgparseWriter): """Write argparse output as bash programmable tab completion.""" + def format(self, cmd: Command) -> str: + """Return the string representation of a single node in the parser tree. + + Args: + cmd: Parsed information about a command or subcommand. + + Returns: + String representation of this subcommand. + """ + + assert cmd.optionals # we should always at least have -h, --help + assert not (cmd.positionals and cmd.subcommands) # one or the other + + # We only care about the arguments/flags, not the help messages + positionals: Tuple[str, ...] = () + if cmd.positionals: + positionals, _, _, _ = zip(*cmd.positionals) + optionals, _, _, _, _ = zip(*cmd.optionals) + subcommands: Tuple[str, ...] = () + if cmd.subcommands: + _, subcommands, _ = zip(*cmd.subcommands) + + # Flatten lists of lists + optionals = [x for xx in optionals for x in xx] + + return ( + self.start_function(cmd.prog) + + self.body(positionals, optionals, subcommands) + + self.end_function(cmd.prog) + ) + + def start_function(self, prog: str) -> str: + """Return the syntax needed to begin a function definition. + + Args: + prog: Program name. + + Returns: + Function definition beginning. + """ + name = prog.replace("-", "_").replace(" ", "_") + return "\n_{0}() {{".format(name) + + def end_function(self, prog: str) -> str: + """Return the syntax needed to end a function definition. + + Args: + prog: Program name + + Returns: + Function definition ending. + """ + return "}\n" + def body( self, positionals: Sequence[str], optionals: Sequence[str], subcommands: Sequence[str] ) -> str: @@ -264,6 +319,396 @@ class BashCompletionWriter(ArgparseCompletionWriter): return 'SPACK_COMPREPLY="{0}"'.format(" ".join(subcommands)) +# Map argument destination names to their complete commands +# Earlier items in the list have higher precedence +_dest_to_fish_complete = { + ("activate", "view"): "-f -a '(__fish_complete_directories)'", + ("bootstrap root", "path"): "-f -a '(__fish_complete_directories)'", + ("mirror add", "mirror"): "-f", + ("repo add", "path"): "-f -a '(__fish_complete_directories)'", + ("test find", "filter"): "-f -a '(__fish_spack_tests)'", + ("bootstrap", "name"): "-f -a '(__fish_spack_bootstrap_names)'", + ("buildcache create", "key"): "-f -a '(__fish_spack_gpg_keys)'", + ("build-env", r"spec \[--\].*"): "-f -a '(__fish_spack_build_env_spec)'", + ("checksum", "package"): "-f -a '(__fish_spack_packages)'", + ( + "checksum", + "versions", + ): "-f -a '(__fish_spack_package_versions $__fish_spack_argparse_argv[1])'", + ("config", "path"): "-f -a '(__fish_spack_colon_path)'", + ("config", "section"): "-f -a '(__fish_spack_config_sections)'", + ("develop", "specs?"): "-f -k -a '(__fish_spack_specs_or_id)'", + ("diff", "specs?"): "-f -a '(__fish_spack_installed_specs)'", + ("gpg sign", "output"): "-f -a '(__fish_complete_directories)'", + ("gpg", "keys?"): "-f -a '(__fish_spack_gpg_keys)'", + ("graph", "specs?"): "-f -k -a '(__fish_spack_specs_or_id)'", + ("help", "help_command"): "-f -a '(__fish_spack_commands)'", + ("list", "filter"): "-f -a '(__fish_spack_packages)'", + ("mirror", "mirror"): "-f -a '(__fish_spack_mirrors)'", + ("pkg", "package"): "-f -a '(__fish_spack_pkg_packages)'", + ("remove", "specs?"): "-f -a '(__fish_spack_installed_specs)'", + ("repo", "namespace_or_path"): "$__fish_spack_force_files -a '(__fish_spack_repos)'", + ("restage", "specs?"): "-f -k -a '(__fish_spack_specs_or_id)'", + ("rm", "specs?"): "-f -a '(__fish_spack_installed_specs)'", + ("solve", "specs?"): "-f -k -a '(__fish_spack_specs_or_id)'", + ("spec", "specs?"): "-f -k -a '(__fish_spack_specs_or_id)'", + ("stage", "specs?"): "-f -k -a '(__fish_spack_specs_or_id)'", + ("test-env", r"spec \[--\].*"): "-f -a '(__fish_spack_build_env_spec)'", + ("test", r"\[?name.*"): "-f -a '(__fish_spack_tests)'", + ("undevelop", "specs?"): "-f -k -a '(__fish_spack_specs_or_id)'", + ("verify", "specs_or_files"): "$__fish_spack_force_files -a '(__fish_spack_installed_specs)'", + ("view", "path"): "-f -a '(__fish_complete_directories)'", + ("", "comment"): "-f", + ("", "compiler_spec"): "-f -a '(__fish_spack_installed_compilers)'", + ("", "config_scopes"): "-f -a '(__fish_complete_directories)'", + ("", "extendable"): "-f -a '(__fish_spack_extensions)'", + ("", "installed_specs?"): "-f -a '(__fish_spack_installed_specs)'", + ("", "job_url"): "-f", + ("", "location_env"): "-f -a '(__fish_complete_directories)'", + ("", "pytest_args"): "-f -a '(__fish_spack_unit_tests)'", + ("", "package_or_file"): "$__fish_spack_force_files -a '(__fish_spack_packages)'", + ("", "package_or_user"): "-f -a '(__fish_spack_packages)'", + ("", "package"): "-f -a '(__fish_spack_packages)'", + ("", "PKG"): "-f -a '(__fish_spack_packages)'", + ("", "prefix"): "-f -a '(__fish_complete_directories)'", + ("", r"rev\d?"): "-f -a '(__fish_spack_git_rev)'", + ("", "specs?"): "-f -k -a '(__fish_spack_specs)'", + ("", "tags?"): "-f -a '(__fish_spack_tags)'", + ("", "virtual_package"): "-f -a '(__fish_spack_providers)'", + ("", "working_dir"): "-f -a '(__fish_complete_directories)'", + ("", r"(\w*_)?env"): "-f -a '(__fish_spack_environments)'", + ("", r"(\w*_)?dir(ectory)?"): "-f -a '(__fish_spack_environments)'", + ("", r"(\w*_)?mirror_name"): "-f -a '(__fish_spack_mirrors)'", +} + + +def _fish_dest_get_complete(prog: str, dest: str) -> Optional[str]: + """Map from subcommand to autocompletion argument. + + Args: + prog: Program name. + dest: Destination. + + Returns: + Autocompletion argument. + """ + s = prog.split(None, 1) + subcmd = s[1] if len(s) == 2 else "" + + for (prog_key, pos_key), value in _dest_to_fish_complete.items(): + if subcmd.startswith(prog_key) and re.match("^" + pos_key + "$", dest): + return value + return None + + +class FishCompletionWriter(ArgparseWriter): + """Write argparse output as bash programmable tab completion.""" + + def format(self, cmd: Command) -> str: + """Return the string representation of a single node in the parser tree. + + Args: + cmd: Parsed information about a command or subcommand. + + Returns: + String representation of a node. + """ + assert cmd.optionals # we should always at least have -h, --help + assert not (cmd.positionals and cmd.subcommands) # one or the other + + # We also need help messages and how arguments are used + # So we pass everything to completion writer + positionals = cmd.positionals + optionals = cmd.optionals + subcommands = cmd.subcommands + + return ( + self.prog_comment(cmd.prog) + + self.optspecs(cmd.prog, optionals) + + self.complete(cmd.prog, positionals, optionals, subcommands) + ) + + def _quote(self, string: str) -> str: + """Quote string and escape special characters if necessary. + + Args: + string: Input string. + + Returns: + Quoted string. + """ + # Goal here is to match fish_indent behavior + + # Strings without spaces (or other special characters) do not need to be escaped + if not any([sub in string for sub in [" ", "'", '"']]): + return string + + string = string.replace("'", r"\'") + return f"'{string}'" + + def optspecs( + self, + prog: str, + optionals: List[Tuple[Sequence[str], List[str], str, Union[int, str, None], str]], + ) -> str: + """Read the optionals and return the command to set optspec. + + Args: + prog: Program name. + optionals: List of optional arguments. + + Returns: + Command to set optspec variable. + """ + # Variables of optspecs + optspec_var = "__fish_spack_optspecs_" + prog.replace(" ", "_").replace("-", "_") + + if optionals is None: + return "set -g %s\n" % optspec_var + + # Build optspec by iterating over options + args = [] + + for flags, dest, _, nargs, _ in optionals: + if len(flags) == 0: + continue + + required = "" + + # Because nargs '?' is treated differently in fish, we treat it as required. + # Because multi-argument options are not supported, we treat it like one argument. + required = "=" + if nargs == 0: + required = "" + + # Pair short options with long options + + # We need to do this because fish doesn't support multiple short + # or long options. + # However, since we are paring options only, this is fine + + short = [f[1:] for f in flags if f.startswith("-") and len(f) == 2] + long = [f[2:] for f in flags if f.startswith("--")] + + while len(short) > 0 and len(long) > 0: + arg = "%s/%s%s" % (short.pop(), long.pop(), required) + while len(short) > 0: + arg = "%s/%s" % (short.pop(), required) + while len(long) > 0: + arg = "%s%s" % (long.pop(), required) + + args.append(arg) + + # Even if there is no option, we still set variable. + # In fish such variable is an empty array, we use it to + # indicate that such subcommand exists. + args = " ".join(args) + + return "set -g %s %s\n" % (optspec_var, args) + + @staticmethod + def complete_head( + prog: str, index: Optional[int] = None, nargs: Optional[Union[int, str]] = None + ) -> str: + """Return the head of the completion command. + + Args: + prog: Program name. + index: Index of positional argument. + nargs: Number of arguments. + + Returns: + Head of the completion command. + """ + # Split command and subcommand + s = prog.split(None, 1) + subcmd = s[1] if len(s) == 2 else "" + + if index is None: + return "complete -c %s -n '__fish_spack_using_command %s'" % (s[0], subcmd) + elif nargs in [argparse.ZERO_OR_MORE, argparse.ONE_OR_MORE, argparse.REMAINDER]: + head = "complete -c %s -n '__fish_spack_using_command_pos_remainder %d %s'" + else: + head = "complete -c %s -n '__fish_spack_using_command_pos %d %s'" + return head % (s[0], index, subcmd) + + def complete( + self, + prog: str, + positionals: List[Tuple[str, Optional[Iterable[Any]], Union[int, str, None], str]], + optionals: List[Tuple[Sequence[str], List[str], str, Union[int, str, None], str]], + subcommands: List[Tuple[ArgumentParser, str, str]], + ) -> str: + """Return all the completion commands. + + Args: + prog: Program name. + positionals: List of positional arguments. + optionals: List of optional arguments. + subcommands: List of subcommand parsers. + + Returns: + Completion command. + """ + commands = [] + + if positionals: + commands.append(self.positionals(prog, positionals)) + + if subcommands: + commands.append(self.subcommands(prog, subcommands)) + + if optionals: + commands.append(self.optionals(prog, optionals)) + + return "".join(commands) + + def positionals( + self, + prog: str, + positionals: List[Tuple[str, Optional[Iterable[Any]], Union[int, str, None], str]], + ) -> str: + """Return the completion for positional arguments. + + Args: + prog: Program name. + positionals: List of positional arguments. + + Returns: + Completion command. + """ + commands = [] + + for idx, (args, choices, nargs, help) in enumerate(positionals): + # Make sure we always get same order of output + if isinstance(choices, dict): + choices = sorted(choices.keys()) + elif isinstance(choices, (set, frozenset)): + choices = sorted(choices) + + # Remove platform-specific choices to avoid hard-coding the platform. + if choices is not None: + valid_choices = [] + for choice in choices: + if spack.platforms.host().name not in choice: + valid_choices.append(choice) + choices = valid_choices + + head = self.complete_head(prog, idx, nargs) + + if choices is not None: + # If there are choices, we provide a completion for all possible values. + commands.append(head + " -f -a %s" % self._quote(" ".join(choices))) + else: + # Otherwise, we try to find a predefined completion for it + value = _fish_dest_get_complete(prog, args) + if value is not None: + commands.append(head + " " + value) + + return "\n".join(commands) + "\n" + + def prog_comment(self, prog: str) -> str: + """Return a comment line for the command. + + Args: + prog: Program name. + + Returns: + Comment line. + """ + return "\n# %s\n" % prog + + def optionals( + self, + prog: str, + optionals: List[Tuple[Sequence[str], List[str], str, Union[int, str, None], str]], + ) -> str: + """Return the completion for optional arguments. + + Args: + prog: Program name. + optionals: List of optional arguments. + + Returns: + Completion command. + """ + commands = [] + head = self.complete_head(prog) + + for flags, dest, _, nargs, help in optionals: + # Make sure we always get same order of output + if isinstance(dest, dict): + dest = sorted(dest.keys()) + elif isinstance(dest, (set, frozenset)): + dest = sorted(dest) + + # Remove platform-specific choices to avoid hard-coding the platform. + if dest is not None: + valid_choices = [] + for choice in dest: + if spack.platforms.host().name not in choice: + valid_choices.append(choice) + dest = valid_choices + + # To provide description for optionals, and also possible values, + # we need to use two split completion command. + # Otherwise, each option will have same description. + prefix = head + + # Add all flags to the completion + for f in flags: + if f.startswith("--"): + long = f[2:] + prefix += " -l %s" % long + elif f.startswith("-"): + short = f[1:] + assert len(short) == 1 + prefix += " -s %s" % short + + # Check if option require argument. + # Currently multi-argument options are not supported, so we treat it like one argument. + if nargs != 0: + prefix += " -r" + + if dest is not None: + # If there are choices, we provide a completion for all possible values. + commands.append(prefix + " -f -a %s" % self._quote(" ".join(dest))) + else: + # Otherwise, we try to find a predefined completion for it + value = _fish_dest_get_complete(prog, dest) + if value is not None: + commands.append(prefix + " " + value) + + if help: + commands.append(prefix + " -d %s" % self._quote(help)) + + return "\n".join(commands) + "\n" + + def subcommands(self, prog: str, subcommands: List[Tuple[ArgumentParser, str, str]]) -> str: + """Return the completion for subcommands. + + Args: + prog: Program name. + subcommands: List of subcommand parsers. + + Returns: + Completion command. + """ + commands = [] + head = self.complete_head(prog, 0) + + for _, subcommand, help in subcommands: + command = head + " -f -a %s" % self._quote(subcommand) + + if help is not None and len(help) > 0: + help = help.split("\n")[0] + command += " -d %s" % self._quote(help) + + commands.append(command) + + return "\n".join(commands) + "\n" + + @formatter def subcommands(args: Namespace, out: IO) -> None: """Hierarchical tree of subcommands. @@ -371,6 +816,15 @@ def bash(args: Namespace, out: IO) -> None: writer.write(parser) +@formatter +def fish(args, out): + parser = spack.main.make_argument_parser() + spack.main.add_all_commands(parser) + + writer = FishCompletionWriter(parser.prog, out, args.aliases) + writer.write(parser) + + def prepend_header(args: Namespace, out: IO) -> None: """Prepend header text at the beginning of a file. diff --git a/lib/spack/spack/cmd/mirror.py b/lib/spack/spack/cmd/mirror.py index 4b853c1bc0..15181d4ce6 100644 --- a/lib/spack/spack/cmd/mirror.py +++ b/lib/spack/spack/cmd/mirror.py @@ -253,12 +253,12 @@ def _configure_mirror(args): def mirror_set(args): - """Configure the connection details of a mirror""" + """configure the connection details of a mirror""" _configure_mirror(args) def mirror_set_url(args): - """Change the URL of a mirror.""" + """change the URL of a mirror""" _configure_mirror(args) diff --git a/lib/spack/spack/test/cmd/commands.py b/lib/spack/spack/test/cmd/commands.py index 1477aa4859..7a531b4f91 100644 --- a/lib/spack/spack/test/cmd/commands.py +++ b/lib/spack/spack/test/cmd/commands.py @@ -14,7 +14,7 @@ import pytest import spack.cmd import spack.main import spack.paths -from spack.cmd.commands import _positional_to_subroutine +from spack.cmd.commands import _dest_to_fish_complete, _positional_to_subroutine commands = spack.main.SpackCommand("commands", subprocess=True) @@ -185,26 +185,59 @@ def test_bash_completion(): assert "_spack_compiler_add() {" in out2 -def test_update_completion_arg(tmpdir, monkeypatch): +def test_fish_completion(): + """Test the fish completion writer.""" + out1 = commands("--format=fish") + + # Make sure header not included + assert "function __fish_spack_argparse" not in out1 + assert "complete -c spack --erase" not in out1 + + # Make sure subcommands appear + assert "__fish_spack_using_command remove" in out1 + assert "__fish_spack_using_command compiler find" in out1 + + # Make sure aliases don't appear + assert "__fish_spack_using_command rm" not in out1 + assert "__fish_spack_using_command compiler add" not in out1 + + # Make sure options appear + assert "-s h -l help" in out1 + + # Make sure subcommands are called + for complete_cmd in _dest_to_fish_complete.values(): + assert complete_cmd in out1 + + out2 = commands("--aliases", "--format=fish") + + # Make sure aliases appear + assert "__fish_spack_using_command rm" in out2 + assert "__fish_spack_using_command compiler add" in out2 + + +@pytest.mark.parametrize("shell", ["bash", "fish"]) +def test_update_completion_arg(shell, tmpdir, monkeypatch): + """Test the update completion flag.""" + mock_infile = tmpdir.join("spack-completion.in") - mock_bashfile = tmpdir.join("spack-completion.bash") + mock_outfile = tmpdir.join(f"spack-completion.{shell}") mock_args = { - "bash": { + shell: { "aliases": True, - "format": "bash", + "format": shell, "header": str(mock_infile), - "update": str(mock_bashfile), + "update": str(mock_outfile), } } # make a mock completion file missing the --update-completion argument real_args = spack.cmd.commands.update_completion_args - shutil.copy(real_args["bash"]["header"], mock_args["bash"]["header"]) - with open(real_args["bash"]["update"]) as old: + shutil.copy(real_args[shell]["header"], mock_args[shell]["header"]) + with open(real_args[shell]["update"]) as old: old_file = old.read() - with open(mock_args["bash"]["update"], "w") as mock: - mock.write(old_file.replace("--update-completion", "")) + with open(mock_args[shell]["update"], "w") as mock: + mock.write(old_file.replace("update-completion", "")) monkeypatch.setattr(spack.cmd.commands, "update_completion_args", mock_args) @@ -214,16 +247,17 @@ def test_update_completion_arg(tmpdir, monkeypatch): local_commands("--update-completion", "-a") # ensure arg is restored - assert "--update-completion" not in mock_bashfile.read() + assert "update-completion" not in mock_outfile.read() local_commands("--update-completion") - assert "--update-completion" in mock_bashfile.read() + assert "update-completion" in mock_outfile.read() # Note: this test is never expected to be supported on Windows @pytest.mark.skipif( - sys.platform == "win32", reason="bash completion script generator fails on windows" + sys.platform == "win32", reason="shell completion script generator fails on windows" ) -def test_updated_completion_scripts(tmpdir): +@pytest.mark.parametrize("shell", ["bash", "fish"]) +def test_updated_completion_scripts(shell, tmpdir): """Make sure our shell tab completion scripts remain up-to-date.""" msg = ( @@ -233,12 +267,11 @@ def test_updated_completion_scripts(tmpdir): "and adding the changed files to your pull request." ) - for shell in ["bash"]: # 'zsh', 'fish']: - header = os.path.join(spack.paths.share_path, shell, "spack-completion.in") - script = "spack-completion.{0}".format(shell) - old_script = os.path.join(spack.paths.share_path, script) - new_script = str(tmpdir.join(script)) + header = os.path.join(spack.paths.share_path, shell, "spack-completion.in") + script = "spack-completion.{0}".format(shell) + old_script = os.path.join(spack.paths.share_path, script) + new_script = str(tmpdir.join(script)) - commands("--aliases", "--format", shell, "--header", header, "--update", new_script) + commands("--aliases", "--format", shell, "--header", header, "--update", new_script) - assert filecmp.cmp(old_script, new_script), msg + assert filecmp.cmp(old_script, new_script), msg diff --git a/lib/spack/spack/test/llnl/util/argparsewriter.py b/lib/spack/spack/test/llnl/util/argparsewriter.py index a2455e0303..433833c6a2 100644 --- a/lib/spack/spack/test/llnl/util/argparsewriter.py +++ b/lib/spack/spack/test/llnl/util/argparsewriter.py @@ -22,13 +22,3 @@ spack.main.add_all_commands(parser) def test_format_not_overridden(): with pytest.raises(TypeError): aw.ArgparseWriter("spack") - - -def test_completion_format_not_overridden(): - writer = aw.ArgparseCompletionWriter("spack") - - assert writer.positionals([]) == "" - assert writer.optionals([]) == "" - assert writer.subcommands([]) == "" - - writer.write(parser) diff --git a/share/spack/fish/spack-completion.in b/share/spack/fish/spack-completion.in new file mode 100644 index 0000000000..f08c8b1f11 --- /dev/null +++ b/share/spack/fish/spack-completion.in @@ -0,0 +1,347 @@ +# Copyright 2013-2023 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) + +# NOTE: spack-completion.fish is auto-generated by: +# +# $ spack commands --aliases --format=fish +# --header=fish/spack-completion.in --update=spack-completion.fish +# +# Please do not manually modify this file. + +# Check fish version before proceeding +set -l fish_version (string split '.' $FISH_VERSION) +if test $fish_version[1] -lt 3 + if test $fish_version[1] -eq 3 + and test $fish_version[2] -lt 2 + echo 'Fish version is older than 3.2.0. Some completion features may not work' + set -g __fish_spack_force_files + else + echo 'This script requires fish version 3.0 or later' + exit 1 + end +else + set -g __fish_spack_force_files -F +end + +# The following global variables are used as a cache of `__fish_spack_argparse` + +# Cached command line +set -g __fish_spack_argparse_cache_line +# Parsed command +set -g __fish_spack_argparse_command +# Remaining arguments +set -g __fish_spack_argparse_argv +# Return value +set -g __fish_spack_argparse_return + +# Spack command generates an optspec variable $__fish_spack_optspecs_. +# We check if this command exists, and echo the optspec variable name. +function __fish_spack_get_optspecs -d 'Get optspecs of spack command' + # Convert arguments to replace ' ' and '-' by '_' + set -l cmd_var (string replace -ra -- '[ -]' '_' $argv | string join '_') + # Set optspec variable name + set -l optspecs_var __fish_spack_optspecs_$cmd_var + # Query if variable $$optspecs_var exists + set -q $optspecs_var; or return 1 + # If it exists, echo all optspecs line by line. + # String join returns 1 if no join was performed, so we return 0 in such case. + string join \n $$optspecs_var; or return 0 +end + +# Parse command-line arguments, save results to global variables, +# and add found flags to __fish_spack_flag_. +# Returns 1 if help flag is found. +function __fish_spack_argparse + # Figure out if the current invocation already has a command. + set -l args $argv + set -l commands + + # Return cached result if arguments haven't changed + if test "$__fish_spack_argparse_cache_line" = "$args" + return $__fish_spack_argparse_return + end + + # Clear all flags found in last run + set -g | string replace -rf -- '^(__fish_spack_flag_\w+)(.*?)$' 'set -ge $1' | source + + # Set default return value to 0, indicating success + set -g __fish_spack_argparse_return 0 + # Set command line to current arguments + set -g __fish_spack_argparse_cache_line $argv + + # Recursively check arguments for commands + while set -q args[1] + # Get optspecs of current command + set -l optspecs (__fish_spack_get_optspecs $commands $args[1]) + or break + + # If command exists, shift arguments + set -a commands $args[1] + set -e args[1] + + # If command has no arguments, continue + set -q optspecs[1]; or continue + + # Parse arguments. Set variable _flag_ if flag is found. + # We find all these variables and set them to the global variable __fish_spack_flag_. + argparse -i -s $optspecs -- $args 2>/dev/null; or break + set -l | string replace -rf -- '^(_flag_.*)$' 'set -g __fish_spack$1' | source + + # Set args to not parsed arguments + set args $argv + + # If command has help flag, we don't need to parse more so short circuit + if set -q _flag_help + set -g __fish_spack_argparse_return 1 + break + end + end + + # Set cached variables + set -g __fish_spack_argparse_command $commands + set -g __fish_spack_argparse_argv $args + + return $__fish_spack_argparse_return +end + +# Check if current commandline's command is "spack $argv" +function __fish_spack_using_command + set -l line (commandline -opc) + __fish_spack_argparse $line; or return 1 + + set -p argv spack + test "$__fish_spack_argparse_command" = "$argv" +end + +# Check if current commandline's command is "spack $argv[2..-1]", +# and cursor is at $argv[1]-th positional argument +function __fish_spack_using_command_pos + __fish_spack_using_command $argv[2..-1] + or return + + test (count $__fish_spack_argparse_argv) -eq $argv[1] +end + +function __fish_spack_using_command_pos_remainder + __fish_spack_using_command $argv[2..-1] + or return + + test (count $__fish_spack_argparse_argv) -ge $argv[1] +end + +# Helper functions for subcommands + +function __fish_spack_bootstrap_names + if set -q __fish_spack_flag_scope + spack bootstrap list --scope $__fish_spack_flag_scope | string replace -rf -- '^Name: (\w+).*?$' '$1' + else + spack bootstrap list | string replace -rf -- '^Name: (\w+).*?$' '$1' + end +end + +# Reference: sudo's fish completion +function __fish_spack_build_env_spec + set token (commandline -opt) + + set -l index (contains -- -- $__fish_spack_argparse_argv) + if set -q index[1] + __fish_complete_subcommand --commandline $__fish_spack_argparse_argv[(math $index + 1)..-1] + else if set -q __fish_spack_argparse_argv[1] + __fish_complete_subcommand --commandline "$__fish_spack_argparse_argv[2..-1] $token" + else + __fish_spack_specs + end +end + +function __fish_spack_commands + spack commands +end + +function __fish_spack_colon_path + set token (string split -rm1 ':' (commandline -opt)) + + if test (count $token) -lt 2 + __fish_complete_path $token[1] + else + __fish_complete_path $token[2] | string replace -r -- '^' "$token[1]:" + end +end + +function __fish_spack_config_sections + if set -q __fish_spack_flag_scope + spack config --scope $__fish_spack_flag_scope list | string split ' ' + else + spack config list | string split ' ' + end +end + +function __fish_spack_environments + string trim (spack env list) +end + +function __fish_spack_extensions + # Skip optional flags, or it will be really slow + string match -q -- '-*' (commandline -opt) + and return + + comm -1 -2 (spack extensions | string trim | psub) (__fish_spack_installed_packages | sort | psub) +end + +function __fish_spack_gpg_keys + spack gpg list +end + +function __fish_spack_installed_compilers + spack compilers | grep -v '^[=-]\|^$' +end + +function __fish_spack_installed_packages + spack find --no-groups --format '{name}' | uniq +end + +function __fish_spack_installed_specs + # Try match local hash first + __fish_spack_installed_specs_id + and return + + spack find --no-groups --format '{name}@{version}' +end + +function __fish_spack_installed_specs_id + set -l token (commandline -opt) + string match -q -- '/*' $token + or return 1 + + spack find --format '/{hash:7}'\t'{name}{@version}' +end + +function __fish_spack_git_rev + type -q __fish_git_ranges + and __fish_git_ranges +end + +function __fish_spack_mirrors + spack mirror list | awk {'printf ("%s\t%s", $1, $2)'} +end + +function __fish_spack_package_versions + string trim (spack versions $argv) +end + +function __fish_spack_packages + spack list +end + +function __fish_spack_pkg_packages + spack pkg list +end + +function __fish_spack_providers + string trim (spack providers | grep -v '^$') +end + +function __fish_spack_repos + spack repo list | awk {'printf ("%s\t%s", $1, $2)'} +end + +function __fish_spack_scopes + # TODO: how to list all scopes? + set -l scope system site user defaults + set -l platform cray darwin linux test + + string join \n $scope +end + +function __fish_spack_specs + set -l token (commandline -opt) + + # Complete compilers + if string match -rq -- '^(?
.*%)[\w-]*(@[\w\.+~-]*)?$' $token
+        __fish_spack_installed_compilers | string replace -r -- '^' "$pre"
+        return
+    end
+
+    # Try to complete spec version
+    # Currently we can only match '@' after a package name
+    set -l package
+
+    # Match ^ following package name
+    if string match -rq -- '^(?
.*?\^)[\w\.+~-]*$' $token
+        # Package name is the nearest, assuming first character is always a letter or digit
+        set packages (string match -ar -- '^[\w-]+' $__fish_spack_argparse_argv $token)
+        set package $packages[-1]
+
+        if test -n "$package"
+            spack dependencies $package | string replace -r -- '^' "$pre"
+            return
+        end
+    end
+
+    # Match @ following package name
+    if string match -rq -- '^(?
.*?\^?(?[\w\.+~-]*)@)[\w\.]*$' $token
+        set package $packages[-1]
+
+        # Matched @ starting at next token
+        if test -z "$package"
+            string match -arq -- '(^|\^)(?[\w\.+~-]*)$' $__fish_spack_argparse_argv[-1]
+            if test -n "$inners[1]"
+                set package $inners[-1]
+            end
+        end
+    end
+
+    # Complete version if package found
+    if test -n "$package"
+        # Only list safe versions for speed
+        string trim (spack versions --safe $package) | string replace -r -- '^' "$pre"
+        return
+    end
+
+    # Else complete package name
+    __fish_spack_installed_packages | string replace -r -- '$' \t"installed"
+    spack list
+end
+
+function __fish_spack_specs_or_id
+    # Try to match local hash first
+    __fish_spack_installed_specs_id
+    and return
+
+    __fish_spack_specs
+end
+
+function __fish_spack_tags
+    string trim (spack tags)
+end
+
+function __fish_spack_tests
+    spack test list | grep -v '^[=-]'
+end
+
+function __fish_spack_unit_tests
+    # Skip optional flags, or it will be really slow
+    string match -q -- '-*' (commandline -opt)
+    and return
+
+    spack unit-test -l
+end
+
+function __fish_spack_yamls
+    # Trim flag from current token
+    string match -rq -- '(?
-.)?(?.*)' (commandline -opt)
+
+    if test -n "$token"
+        find $token* -type f '(' -iname '*.yaml' -or -iname '*.yml' ')'
+    else
+        find -maxdepth 2 -type f '(' -iname '*.yaml' -or -iname '*.yml' ')' | cut -c 3-
+    end
+end
+
+# Reset existing completions
+complete -c spack --erase
+
+# Spack commands
+#
+# Everything below here is auto-generated.
diff --git a/share/spack/setup-env.fish b/share/spack/setup-env.fish
index 901ffe129f..482c3eaa68 100755
--- a/share/spack/setup-env.fish
+++ b/share/spack/setup-env.fish
@@ -785,7 +785,15 @@ if test -z "$SPACK_SKIP_MODULES"
     sp_multi_pathadd MODULEPATH $_sp_tcl_roots
 end
 
+# Add programmable tab completion for fish
+#
+set -l fish_version (string split '.' $FISH_VERSION)
+if test $fish_version[1] -gt 3
+    or test $fish_version[1] -eq 3
+    and test $fish_version[2] -ge 2
 
+    source $sp_share_dir/spack-completion.fish
+end
 
 #
 # NOTES
diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish
new file mode 100755
index 0000000000..79af365c25
--- /dev/null
+++ b/share/spack/spack-completion.fish
@@ -0,0 +1,3029 @@
+# Copyright 2013-2023 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)
+
+# NOTE: spack-completion.fish is auto-generated by:
+#
+#   $ spack commands --aliases --format=fish
+#       --header=fish/spack-completion.in --update=spack-completion.fish
+#
+# Please do not manually modify this file.
+
+# Check fish version before proceeding
+set -l fish_version (string split '.' $FISH_VERSION)
+if test $fish_version[1] -lt 3
+    if test $fish_version[1] -eq 3
+        and test $fish_version[2] -lt 2
+        echo 'Fish version is older than 3.2.0. Some completion features may not work'
+        set -g __fish_spack_force_files
+    else
+        echo 'This script requires fish version 3.0 or later'
+        exit 1
+    end
+else
+    set -g __fish_spack_force_files -F
+end
+
+# The following global variables are used as a cache of `__fish_spack_argparse`
+
+# Cached command line
+set -g __fish_spack_argparse_cache_line
+# Parsed command
+set -g __fish_spack_argparse_command
+# Remaining arguments
+set -g __fish_spack_argparse_argv
+# Return value
+set -g __fish_spack_argparse_return
+
+# Spack command generates an optspec variable $__fish_spack_optspecs_.
+# We check if this command exists, and echo the optspec variable name.
+function __fish_spack_get_optspecs -d 'Get optspecs of spack command'
+    # Convert arguments to replace ' ' and '-' by '_'
+    set -l cmd_var (string replace -ra -- '[ -]' '_' $argv | string join '_')
+    # Set optspec variable name
+    set -l optspecs_var __fish_spack_optspecs_$cmd_var
+    # Query if variable $$optspecs_var exists
+    set -q $optspecs_var; or return 1
+    # If it exists, echo all optspecs line by line.
+    # String join returns 1 if no join was performed, so we return 0 in such case.
+    string join \n $$optspecs_var; or return 0
+end
+
+# Parse command-line arguments, save results to global variables,
+# and add found flags to __fish_spack_flag_.
+# Returns 1 if help flag is found.
+function __fish_spack_argparse
+    # Figure out if the current invocation already has a command.
+    set -l args $argv
+    set -l commands
+
+    # Return cached result if arguments haven't changed
+    if test "$__fish_spack_argparse_cache_line" = "$args"
+        return $__fish_spack_argparse_return
+    end
+
+    # Clear all flags found in last run
+    set -g | string replace -rf -- '^(__fish_spack_flag_\w+)(.*?)$' 'set -ge $1' | source
+
+    # Set default return value to 0, indicating success
+    set -g __fish_spack_argparse_return 0
+    # Set command line to current arguments
+    set -g __fish_spack_argparse_cache_line $argv
+
+    # Recursively check arguments for commands
+    while set -q args[1]
+        # Get optspecs of current command
+        set -l optspecs (__fish_spack_get_optspecs $commands $args[1])
+        or break
+
+        # If command exists, shift arguments
+        set -a commands $args[1]
+        set -e args[1]
+
+        # If command has no arguments, continue
+        set -q optspecs[1]; or continue
+
+        # Parse arguments. Set variable _flag_ if flag is found.
+        # We find all these variables and set them to the global variable __fish_spack_flag_.
+        argparse -i -s $optspecs -- $args 2>/dev/null; or break
+        set -l | string replace -rf -- '^(_flag_.*)$' 'set -g __fish_spack$1' | source
+
+        # Set args to not parsed arguments
+        set args $argv
+
+        # If command has help flag, we don't need to parse more so short circuit
+        if set -q _flag_help
+            set -g __fish_spack_argparse_return 1
+            break
+        end
+    end
+
+    # Set cached variables
+    set -g __fish_spack_argparse_command $commands
+    set -g __fish_spack_argparse_argv $args
+
+    return $__fish_spack_argparse_return
+end
+
+# Check if current commandline's command is "spack $argv"
+function __fish_spack_using_command
+    set -l line (commandline -opc)
+    __fish_spack_argparse $line; or return 1
+
+    set -p argv spack
+    test "$__fish_spack_argparse_command" = "$argv"
+end
+
+# Check if current commandline's command is "spack $argv[2..-1]",
+# and cursor is at $argv[1]-th positional argument
+function __fish_spack_using_command_pos
+    __fish_spack_using_command $argv[2..-1]
+    or return
+
+    test (count $__fish_spack_argparse_argv) -eq $argv[1]
+end
+
+function __fish_spack_using_command_pos_remainder
+    __fish_spack_using_command $argv[2..-1]
+    or return
+
+    test (count $__fish_spack_argparse_argv) -ge $argv[1]
+end
+
+# Helper functions for subcommands
+
+function __fish_spack_bootstrap_names
+    if set -q __fish_spack_flag_scope
+        spack bootstrap list --scope $__fish_spack_flag_scope | string replace -rf -- '^Name: (\w+).*?$' '$1'
+    else
+        spack bootstrap list | string replace -rf -- '^Name: (\w+).*?$' '$1'
+    end
+end
+
+# Reference: sudo's fish completion
+function __fish_spack_build_env_spec
+    set token (commandline -opt)
+
+    set -l index (contains -- -- $__fish_spack_argparse_argv)
+    if set -q index[1]
+        __fish_complete_subcommand --commandline $__fish_spack_argparse_argv[(math $index + 1)..-1]
+    else if set -q __fish_spack_argparse_argv[1]
+        __fish_complete_subcommand --commandline "$__fish_spack_argparse_argv[2..-1] $token"
+    else
+        __fish_spack_specs
+    end
+end
+
+function __fish_spack_commands
+    spack commands
+end
+
+function __fish_spack_colon_path
+    set token (string split -rm1 ':' (commandline -opt))
+
+    if test (count $token) -lt 2
+        __fish_complete_path $token[1]
+    else
+        __fish_complete_path $token[2] | string replace -r -- '^' "$token[1]:"
+    end
+end
+
+function __fish_spack_config_sections
+    if set -q __fish_spack_flag_scope
+        spack config --scope $__fish_spack_flag_scope list | string split ' '
+    else
+        spack config list | string split ' '
+    end
+end
+
+function __fish_spack_environments
+    string trim (spack env list)
+end
+
+function __fish_spack_extensions
+    # Skip optional flags, or it will be really slow
+    string match -q -- '-*' (commandline -opt)
+    and return
+
+    comm -1 -2 (spack extensions | string trim | psub) (__fish_spack_installed_packages | sort | psub)
+end
+
+function __fish_spack_gpg_keys
+    spack gpg list
+end
+
+function __fish_spack_installed_compilers
+    spack compilers | grep -v '^[=-]\|^$'
+end
+
+function __fish_spack_installed_packages
+    spack find --no-groups --format '{name}' | uniq
+end
+
+function __fish_spack_installed_specs
+    # Try match local hash first
+    __fish_spack_installed_specs_id
+    and return
+
+    spack find --no-groups --format '{name}@{version}'
+end
+
+function __fish_spack_installed_specs_id
+    set -l token (commandline -opt)
+    string match -q -- '/*' $token
+    or return 1
+
+    spack find --format '/{hash:7}'\t'{name}{@version}'
+end
+
+function __fish_spack_git_rev
+    type -q __fish_git_ranges
+    and __fish_git_ranges
+end
+
+function __fish_spack_mirrors
+    spack mirror list | awk {'printf ("%s\t%s", $1, $2)'}
+end
+
+function __fish_spack_package_versions
+    string trim (spack versions $argv)
+end
+
+function __fish_spack_packages
+    spack list
+end
+
+function __fish_spack_pkg_packages
+    spack pkg list
+end
+
+function __fish_spack_providers
+    string trim (spack providers | grep -v '^$')
+end
+
+function __fish_spack_repos
+    spack repo list | awk {'printf ("%s\t%s", $1, $2)'}
+end
+
+function __fish_spack_scopes
+    # TODO: how to list all scopes?
+    set -l scope system site user defaults
+    set -l platform cray darwin linux test
+
+    string join \n $scope
+end
+
+function __fish_spack_specs
+    set -l token (commandline -opt)
+
+    # Complete compilers
+    if string match -rq -- '^(?
.*%)[\w-]*(@[\w\.+~-]*)?$' $token
+        __fish_spack_installed_compilers | string replace -r -- '^' "$pre"
+        return
+    end
+
+    # Try to complete spec version
+    # Currently we can only match '@' after a package name
+    set -l package
+
+    # Match ^ following package name
+    if string match -rq -- '^(?
.*?\^)[\w\.+~-]*$' $token
+        # Package name is the nearest, assuming first character is always a letter or digit
+        set packages (string match -ar -- '^[\w-]+' $__fish_spack_argparse_argv $token)
+        set package $packages[-1]
+
+        if test -n "$package"
+            spack dependencies $package | string replace -r -- '^' "$pre"
+            return
+        end
+    end
+
+    # Match @ following package name
+    if string match -rq -- '^(?
.*?\^?(?[\w\.+~-]*)@)[\w\.]*$' $token
+        set package $packages[-1]
+
+        # Matched @ starting at next token
+        if test -z "$package"
+            string match -arq -- '(^|\^)(?[\w\.+~-]*)$' $__fish_spack_argparse_argv[-1]
+            if test -n "$inners[1]"
+                set package $inners[-1]
+            end
+        end
+    end
+
+    # Complete version if package found
+    if test -n "$package"
+        # Only list safe versions for speed
+        string trim (spack versions --safe $package) | string replace -r -- '^' "$pre"
+        return
+    end
+
+    # Else complete package name
+    __fish_spack_installed_packages | string replace -r -- '$' \t"installed"
+    spack list
+end
+
+function __fish_spack_specs_or_id
+    # Try to match local hash first
+    __fish_spack_installed_specs_id
+    and return
+
+    __fish_spack_specs
+end
+
+function __fish_spack_tags
+    string trim (spack tags)
+end
+
+function __fish_spack_tests
+    spack test list | grep -v '^[=-]'
+end
+
+function __fish_spack_unit_tests
+    # Skip optional flags, or it will be really slow
+    string match -q -- '-*' (commandline -opt)
+    and return
+
+    spack unit-test -l
+end
+
+function __fish_spack_yamls
+    # Trim flag from current token
+    string match -rq -- '(?
-.)?(?.*)' (commandline -opt)
+
+    if test -n "$token"
+        find $token* -type f '(' -iname '*.yaml' -or -iname '*.yml' ')'
+    else
+        find -maxdepth 2 -type f '(' -iname '*.yaml' -or -iname '*.yml' ')' | cut -c 3-
+    end
+end
+
+# Reset existing completions
+complete -c spack --erase
+
+# Spack commands
+#
+# Everything below here is auto-generated.
+
+# spack
+set -g __fish_spack_optspecs_spack h/help H/all-help color= c/config= C/config-scope= d/debug timestamp pdb e/env= D/env-dir= E/no-env use-env-repo k/insecure l/enable-locks L/disable-locks m/mock b/bootstrap p/profile sorted-profile= lines= v/verbose stacktrace backtrace V/version print-shell-vars=
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a add -d 'add a spec to an environment'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a arch -d 'print architecture information about this machine'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a audit -d 'audit configuration files, packages, etc.'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a blame -d 'show contributors to packages'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a bootstrap -d 'manage bootstrap configuration'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a build-env -d 'run a command in a spec\'s install environment, or dump its environment to screen or file'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a buildcache -d 'create, download and install binary packages'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a cd -d 'cd to spack directories in the shell'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a change -d 'change an existing spec in an environment'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a checksum -d 'checksum available versions of a package'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a ci -d 'manage continuous integration pipelines'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a clean -d 'remove temporary build files and/or downloaded archives'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a clone -d 'create a new installation of spack in another prefix'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a commands -d 'list available spack commands'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a compiler -d 'manage compilers'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a compilers -d 'list available compilers'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a concretize -d 'concretize an environment and write a lockfile'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a config -d 'get and set configuration options'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a containerize -d 'creates recipes to build images for different container runtimes'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a create -d 'create a new package file'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a debug -d 'debugging commands for troubleshooting Spack'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a dependencies -d 'show dependencies of a package'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a dependents -d 'show packages that depend on another'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a deprecate -d 'replace one package with another via symlinks'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a dev-build -d 'developer build: build from code in current working directory'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a develop -d 'add a spec to an environment\'s dev-build information'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a diff -d 'compare two specs'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a docs -d 'open spack documentation in a web browser'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a edit -d 'open package files in $EDITOR'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a env -d 'manage virtual environments'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a extensions -d 'list extensions for package'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a external -d 'manage external packages in Spack configuration'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a fetch -d 'fetch archives for packages'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a find -d 'list and search installed packages'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a gc -d 'remove specs that are now no longer needed'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a gpg -d 'handle GPG actions for spack'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a graph -d 'generate graphs of package dependency relationships'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a help -d 'get help on spack and its commands'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a info -d 'get detailed information on a particular package'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a install -d 'build and install packages'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a license -d 'list and check license headers on files in spack'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a list -d 'list and search available packages'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a load -d 'add package to the user environment'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a location -d 'print out locations of packages and spack directories'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a log-parse -d 'filter errors and warnings from build logs'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a maintainers -d 'get information about package maintainers'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a make-installer -d 'generate Windows installer'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a mark -d 'mark packages as explicitly or implicitly installed'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a mirror -d 'manage mirrors (source and binary)'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a module -d 'generate/manage module files'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a patch -d 'patch expanded archive sources in preparation for install'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a pkg -d 'query packages associated with particular git revisions'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a providers -d 'list packages that provide a particular virtual package'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a pydoc -d 'run pydoc from within spack'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a python -d 'launch an interpreter as spack would launch a command'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a reindex -d 'rebuild Spack\'s package database'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a remove -d 'remove specs from an environment'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a rm -d 'remove specs from an environment'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a repo -d 'manage package source repositories'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a resource -d 'list downloadable resources (tarballs, repos, patches, etc.)'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a restage -d 'revert checked out package source code'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a solve -d 'concretize a specs using an ASP solver'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a spec -d 'show what would be installed, given a spec'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a stage -d 'expand downloaded archive in preparation for install'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a style -d 'runs source code style checks on spack'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a tags -d 'show package tags and associated packages'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a test -d 'run spack\'s tests for an install'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a test-env -d 'run a command in a spec\'s test environment, or dump its environment to screen or file'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a tutorial -d 'set up spack for our tutorial (WARNING: modifies config!)'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a undevelop -d 'remove specs from an environment'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a uninstall -d 'remove installed packages'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a unit-test -d 'run spack\'s unit tests (wrapper around pytest)'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a unload -d 'remove package from the user environment'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a url -d 'debugging tool for url parsing'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a verify -d 'check that all spack packages are on disk as installed'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a versions -d 'list available versions of a package'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a view -d 'project packages to a compact naming scheme on the filesystem'
+complete -c spack -n '__fish_spack_using_command ' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command ' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command ' -s H -l all-help -f -a help
+complete -c spack -n '__fish_spack_using_command ' -s H -l all-help -d 'show help for all commands (same as spack help --all)'
+complete -c spack -n '__fish_spack_using_command ' -l color -r -f -a 'always never auto'
+complete -c spack -n '__fish_spack_using_command ' -l color -r -d 'when to colorize output (default: auto)'
+complete -c spack -n '__fish_spack_using_command ' -s c -l config -r -f -a config_vars
+complete -c spack -n '__fish_spack_using_command ' -s c -l config -r -d 'add one or more custom, one off config settings'
+complete -c spack -n '__fish_spack_using_command ' -s C -l config-scope -r -f -a config_scopes
+complete -c spack -n '__fish_spack_using_command ' -s C -l config-scope -r -d 'add a custom configuration scope'
+complete -c spack -n '__fish_spack_using_command ' -s d -l debug -f -a debug
+complete -c spack -n '__fish_spack_using_command ' -s d -l debug -d 'write out debug messages'
+complete -c spack -n '__fish_spack_using_command ' -l timestamp -f -a timestamp
+complete -c spack -n '__fish_spack_using_command ' -l timestamp -d 'add a timestamp to tty output'
+complete -c spack -n '__fish_spack_using_command ' -l pdb -f -a pdb
+complete -c spack -n '__fish_spack_using_command ' -l pdb -d 'run spack under the pdb debugger'
+complete -c spack -n '__fish_spack_using_command ' -s e -l env -r -f -a env
+complete -c spack -n '__fish_spack_using_command ' -s e -l env -r -d 'run with a specific environment (see spack env)'
+complete -c spack -n '__fish_spack_using_command ' -s D -l env-dir -r -f -a env_dir
+complete -c spack -n '__fish_spack_using_command ' -s D -l env-dir -r -d 'run with an environment directory (ignore managed environments)'
+complete -c spack -n '__fish_spack_using_command ' -s E -l no-env -f -a no_env
+complete -c spack -n '__fish_spack_using_command ' -s E -l no-env -d 'run without any environments activated (see spack env)'
+complete -c spack -n '__fish_spack_using_command ' -l use-env-repo -f -a use_env_repo
+complete -c spack -n '__fish_spack_using_command ' -l use-env-repo -d 'when running in an environment, use its package repository'
+complete -c spack -n '__fish_spack_using_command ' -s k -l insecure -f -a insecure
+complete -c spack -n '__fish_spack_using_command ' -s k -l insecure -d 'do not check ssl certificates when downloading'
+complete -c spack -n '__fish_spack_using_command ' -s l -l enable-locks -f -a locks
+complete -c spack -n '__fish_spack_using_command ' -s l -l enable-locks -d 'use filesystem locking (default)'
+complete -c spack -n '__fish_spack_using_command ' -s L -l disable-locks -f -a locks
+complete -c spack -n '__fish_spack_using_command ' -s L -l disable-locks -d 'do not use filesystem locking (unsafe)'
+complete -c spack -n '__fish_spack_using_command ' -s m -l mock -f -a mock
+complete -c spack -n '__fish_spack_using_command ' -s m -l mock -d 'use mock packages instead of real ones'
+complete -c spack -n '__fish_spack_using_command ' -s b -l bootstrap -f -a bootstrap
+complete -c spack -n '__fish_spack_using_command ' -s b -l bootstrap -d 'use bootstrap configuration (bootstrap store, config, externals)'
+complete -c spack -n '__fish_spack_using_command ' -s p -l profile -f -a spack_profile
+complete -c spack -n '__fish_spack_using_command ' -s p -l profile -d 'profile execution using cProfile'
+complete -c spack -n '__fish_spack_using_command ' -l sorted-profile -r -f -a sorted_profile
+complete -c spack -n '__fish_spack_using_command ' -l sorted-profile -r -d 'profile and sort'
+complete -c spack -n '__fish_spack_using_command ' -l lines -r -f -a lines
+complete -c spack -n '__fish_spack_using_command ' -l lines -r -d 'lines of profile output or \'all\' (default: 20)'
+complete -c spack -n '__fish_spack_using_command ' -s v -l verbose -f -a verbose
+complete -c spack -n '__fish_spack_using_command ' -s v -l verbose -d 'print additional output during builds'
+complete -c spack -n '__fish_spack_using_command ' -l stacktrace -f -a stacktrace
+complete -c spack -n '__fish_spack_using_command ' -l stacktrace -d 'add stacktraces to all printed statements'
+complete -c spack -n '__fish_spack_using_command ' -l backtrace -f -a backtrace
+complete -c spack -n '__fish_spack_using_command ' -l backtrace -d 'always show backtraces for exceptions'
+complete -c spack -n '__fish_spack_using_command ' -s V -l version -f -a version
+complete -c spack -n '__fish_spack_using_command ' -s V -l version -d 'show version number and exit'
+complete -c spack -n '__fish_spack_using_command ' -l print-shell-vars -r -f -a print_shell_vars
+complete -c spack -n '__fish_spack_using_command ' -l print-shell-vars -r -d 'print info needed by setup-env.*sh'
+
+# spack add
+set -g __fish_spack_optspecs_spack_add h/help l/list-name=
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 add' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command add' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command add' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command add' -s l -l list-name -r -f -a list_name
+complete -c spack -n '__fish_spack_using_command add' -s l -l list-name -r -d 'name of the list to add specs to'
+
+# spack arch
+set -g __fish_spack_optspecs_spack_arch h/help g/generic-target known-targets p/platform o/operating-system t/target f/frontend b/backend
+complete -c spack -n '__fish_spack_using_command arch' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command arch' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command arch' -s g -l generic-target -f -a generic_target
+complete -c spack -n '__fish_spack_using_command arch' -s g -l generic-target -d 'show the best generic target'
+complete -c spack -n '__fish_spack_using_command arch' -l known-targets -f -a known_targets
+complete -c spack -n '__fish_spack_using_command arch' -l known-targets -d 'show a list of all known targets and exit'
+complete -c spack -n '__fish_spack_using_command arch' -s p -l platform -f -a platform
+complete -c spack -n '__fish_spack_using_command arch' -s p -l platform -d 'print only the platform'
+complete -c spack -n '__fish_spack_using_command arch' -s o -l operating-system -f -a operating_system
+complete -c spack -n '__fish_spack_using_command arch' -s o -l operating-system -d 'print only the operating system'
+complete -c spack -n '__fish_spack_using_command arch' -s t -l target -f -a target
+complete -c spack -n '__fish_spack_using_command arch' -s t -l target -d 'print only the target'
+complete -c spack -n '__fish_spack_using_command arch' -s f -l frontend -f -a frontend
+complete -c spack -n '__fish_spack_using_command arch' -s f -l frontend -d 'print frontend'
+complete -c spack -n '__fish_spack_using_command arch' -s b -l backend -f -a backend
+complete -c spack -n '__fish_spack_using_command arch' -s b -l backend -d 'print backend'
+
+# spack audit
+set -g __fish_spack_optspecs_spack_audit h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 audit' -f -a configs -d 'audit configuration files'
+complete -c spack -n '__fish_spack_using_command_pos 0 audit' -f -a packages-https -d 'check https in packages'
+complete -c spack -n '__fish_spack_using_command_pos 0 audit' -f -a packages -d 'audit package recipes'
+complete -c spack -n '__fish_spack_using_command_pos 0 audit' -f -a list -d 'list available checks and exits'
+complete -c spack -n '__fish_spack_using_command audit' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command audit' -s h -l help -d 'show this help message and exit'
+
+# spack audit configs
+set -g __fish_spack_optspecs_spack_audit_configs h/help
+complete -c spack -n '__fish_spack_using_command audit configs' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command audit configs' -s h -l help -d 'show this help message and exit'
+
+# spack audit packages-https
+set -g __fish_spack_optspecs_spack_audit_packages_https h/help all
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 audit packages-https' -f -a '(__fish_spack_packages)'
+complete -c spack -n '__fish_spack_using_command audit packages-https' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command audit packages-https' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command audit packages-https' -l all -f -a check_all
+complete -c spack -n '__fish_spack_using_command audit packages-https' -l all -d 'audit all packages'
+
+# spack audit packages
+set -g __fish_spack_optspecs_spack_audit_packages h/help
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 audit packages' -f -a '(__fish_spack_packages)'
+complete -c spack -n '__fish_spack_using_command audit packages' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command audit packages' -s h -l help -d 'show this help message and exit'
+
+# spack audit list
+set -g __fish_spack_optspecs_spack_audit_list h/help
+complete -c spack -n '__fish_spack_using_command audit list' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command audit list' -s h -l help -d 'show this help message and exit'
+
+# spack blame
+set -g __fish_spack_optspecs_spack_blame h/help t/time p/percent g/git json
+complete -c spack -n '__fish_spack_using_command_pos 0 blame' $__fish_spack_force_files -a '(__fish_spack_packages)'
+complete -c spack -n '__fish_spack_using_command blame' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command blame' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command blame' -s t -l time -f -a view
+complete -c spack -n '__fish_spack_using_command blame' -s t -l time -d 'sort by last modification date (default)'
+complete -c spack -n '__fish_spack_using_command blame' -s p -l percent -f -a view
+complete -c spack -n '__fish_spack_using_command blame' -s p -l percent -d 'sort by percent of code'
+complete -c spack -n '__fish_spack_using_command blame' -s g -l git -f -a view
+complete -c spack -n '__fish_spack_using_command blame' -s g -l git -d 'show git blame output instead of summary'
+complete -c spack -n '__fish_spack_using_command blame' -l json -f -a json
+complete -c spack -n '__fish_spack_using_command blame' -l json -d 'output blame as machine-readable json records'
+
+# spack bootstrap
+set -g __fish_spack_optspecs_spack_bootstrap h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 bootstrap' -f -a now -d 'Spack ready, right now!'
+complete -c spack -n '__fish_spack_using_command_pos 0 bootstrap' -f -a status -d 'get the status of Spack'
+complete -c spack -n '__fish_spack_using_command_pos 0 bootstrap' -f -a enable -d 'enable bootstrapping'
+complete -c spack -n '__fish_spack_using_command_pos 0 bootstrap' -f -a disable -d 'disable bootstrapping'
+complete -c spack -n '__fish_spack_using_command_pos 0 bootstrap' -f -a reset -d 'reset bootstrapping configuration to Spack defaults'
+complete -c spack -n '__fish_spack_using_command_pos 0 bootstrap' -f -a root -d 'get/set the root bootstrap directory'
+complete -c spack -n '__fish_spack_using_command_pos 0 bootstrap' -f -a list -d 'list all the sources of software to bootstrap Spack'
+complete -c spack -n '__fish_spack_using_command_pos 0 bootstrap' -f -a add -d 'add a new source for bootstrapping'
+complete -c spack -n '__fish_spack_using_command_pos 0 bootstrap' -f -a remove -d 'remove a bootstrapping source'
+complete -c spack -n '__fish_spack_using_command_pos 0 bootstrap' -f -a mirror -d 'create a local mirror to bootstrap Spack'
+complete -c spack -n '__fish_spack_using_command bootstrap' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command bootstrap' -s h -l help -d 'show this help message and exit'
+
+# spack bootstrap now
+set -g __fish_spack_optspecs_spack_bootstrap_now h/help dev
+complete -c spack -n '__fish_spack_using_command bootstrap now' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command bootstrap now' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command bootstrap now' -l dev -f -a dev
+complete -c spack -n '__fish_spack_using_command bootstrap now' -l dev -d 'bootstrap dev dependencies too'
+
+# spack bootstrap status
+set -g __fish_spack_optspecs_spack_bootstrap_status h/help optional dev
+complete -c spack -n '__fish_spack_using_command bootstrap status' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command bootstrap status' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command bootstrap status' -l optional -f -a optional
+complete -c spack -n '__fish_spack_using_command bootstrap status' -l optional -d 'show the status of rarely used optional dependencies'
+complete -c spack -n '__fish_spack_using_command bootstrap status' -l dev -f -a dev
+complete -c spack -n '__fish_spack_using_command bootstrap status' -l dev -d 'show the status of dependencies needed to develop Spack'
+
+# spack bootstrap enable
+set -g __fish_spack_optspecs_spack_bootstrap_enable h/help scope=
+complete -c spack -n '__fish_spack_using_command_pos 0 bootstrap enable' -f -a '(__fish_spack_bootstrap_names)'
+complete -c spack -n '__fish_spack_using_command bootstrap enable' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command bootstrap enable' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command bootstrap enable' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command bootstrap enable' -l scope -r -d 'configuration scope to read/modify'
+
+# spack bootstrap disable
+set -g __fish_spack_optspecs_spack_bootstrap_disable h/help scope=
+complete -c spack -n '__fish_spack_using_command_pos 0 bootstrap disable' -f -a '(__fish_spack_bootstrap_names)'
+complete -c spack -n '__fish_spack_using_command bootstrap disable' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command bootstrap disable' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command bootstrap disable' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command bootstrap disable' -l scope -r -d 'configuration scope to read/modify'
+
+# spack bootstrap reset
+set -g __fish_spack_optspecs_spack_bootstrap_reset h/help y/yes-to-all
+complete -c spack -n '__fish_spack_using_command bootstrap reset' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command bootstrap reset' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command bootstrap reset' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command bootstrap reset' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+
+# spack bootstrap root
+set -g __fish_spack_optspecs_spack_bootstrap_root h/help scope=
+complete -c spack -n '__fish_spack_using_command_pos 0 bootstrap root' -f -a '(__fish_complete_directories)'
+complete -c spack -n '__fish_spack_using_command bootstrap root' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command bootstrap root' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command bootstrap root' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command bootstrap root' -l scope -r -d 'configuration scope to read/modify'
+
+# spack bootstrap list
+set -g __fish_spack_optspecs_spack_bootstrap_list h/help scope=
+complete -c spack -n '__fish_spack_using_command bootstrap list' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command bootstrap list' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command bootstrap list' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command bootstrap list' -l scope -r -d 'configuration scope to read/modify'
+
+# spack bootstrap add
+set -g __fish_spack_optspecs_spack_bootstrap_add h/help scope= trust
+complete -c spack -n '__fish_spack_using_command_pos 0 bootstrap add' -f -a '(__fish_spack_bootstrap_names)'
+complete -c spack -n '__fish_spack_using_command_pos 1 bootstrap add' -f -a '(__fish_spack_environments)'
+complete -c spack -n '__fish_spack_using_command bootstrap add' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command bootstrap add' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command bootstrap add' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command bootstrap add' -l scope -r -d 'configuration scope to read/modify'
+complete -c spack -n '__fish_spack_using_command bootstrap add' -l trust -f -a trust
+complete -c spack -n '__fish_spack_using_command bootstrap add' -l trust -d 'enable the source immediately upon addition'
+
+# spack bootstrap remove
+set -g __fish_spack_optspecs_spack_bootstrap_remove h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 bootstrap remove' -f -a '(__fish_spack_bootstrap_names)'
+complete -c spack -n '__fish_spack_using_command bootstrap remove' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command bootstrap remove' -s h -l help -d 'show this help message and exit'
+
+# spack bootstrap mirror
+set -g __fish_spack_optspecs_spack_bootstrap_mirror h/help binary-packages dev
+
+complete -c spack -n '__fish_spack_using_command bootstrap mirror' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command bootstrap mirror' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command bootstrap mirror' -l binary-packages -f -a binary_packages
+complete -c spack -n '__fish_spack_using_command bootstrap mirror' -l binary-packages -d 'download public binaries in the mirror'
+complete -c spack -n '__fish_spack_using_command bootstrap mirror' -l dev -f -a dev
+complete -c spack -n '__fish_spack_using_command bootstrap mirror' -l dev -d 'download dev dependencies too'
+
+# spack build-env
+set -g __fish_spack_optspecs_spack_build_env h/help clean dirty U/fresh reuse reuse-deps dump= pickle=
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 build-env' -f -a '(__fish_spack_build_env_spec)'
+complete -c spack -n '__fish_spack_using_command build-env' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command build-env' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command build-env' -l clean -f -a dirty
+complete -c spack -n '__fish_spack_using_command build-env' -l clean -d 'unset harmful variables in the build environment (default)'
+complete -c spack -n '__fish_spack_using_command build-env' -l dirty -f -a dirty
+complete -c spack -n '__fish_spack_using_command build-env' -l dirty -d 'preserve user environment in spack\'s build environment (danger!)'
+complete -c spack -n '__fish_spack_using_command build-env' -s U -l fresh -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command build-env' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
+complete -c spack -n '__fish_spack_using_command build-env' -l reuse -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command build-env' -l reuse -d 'reuse installed packages/buildcaches when possible'
+complete -c spack -n '__fish_spack_using_command build-env' -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command build-env' -l reuse-deps -d 'reuse installed dependencies only'
+complete -c spack -n '__fish_spack_using_command build-env' -l dump -r -f -a dump
+complete -c spack -n '__fish_spack_using_command build-env' -l dump -r -d 'dump a source-able environment to FILE'
+complete -c spack -n '__fish_spack_using_command build-env' -l pickle -r -f -a pickle
+complete -c spack -n '__fish_spack_using_command build-env' -l pickle -r -d 'dump a pickled source-able environment to FILE'
+
+# spack buildcache
+set -g __fish_spack_optspecs_spack_buildcache h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a push -d 'create a binary package and push it to a mirror'
+complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a create -d 'create a binary package and push it to a mirror'
+complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a install -d 'install from a binary package'
+complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a list -d 'list binary packages available from mirrors'
+complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a keys -d 'get public keys available on mirrors'
+complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a preview -d 'analyze an installed spec and reports whether executables and libraries are relocatable'
+complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a check -d 'check specs against remote binary mirror(s) to see if any need to be rebuilt'
+complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a download -d 'download buildcache entry from a remote mirror to local folder'
+complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a get-buildcache-name -d 'get name (prefix) of buildcache entries for this spec'
+complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a save-specfile -d 'get full spec for dependencies and write them to files in the specified output directory'
+complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a sync -d 'sync binaries (and associated metadata) from one mirror to another'
+complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a update-index -d 'update a buildcache index'
+complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a rebuild-index -d 'update a buildcache index'
+complete -c spack -n '__fish_spack_using_command buildcache' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command buildcache' -s h -l help -d 'show this help message and exit'
+
+# spack buildcache push
+set -g __fish_spack_optspecs_spack_buildcache_push h/help f/force a/allow-root u/unsigned k/key= update-index spec-file= only=
+complete -c spack -n '__fish_spack_using_command_pos_remainder 1 buildcache push' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command buildcache push' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command buildcache push' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command buildcache push' -s f -l force -f -a force
+complete -c spack -n '__fish_spack_using_command buildcache push' -s f -l force -d 'overwrite tarball if it exists'
+complete -c spack -n '__fish_spack_using_command buildcache push' -l allow-root -s a -f -a allow_root
+complete -c spack -n '__fish_spack_using_command buildcache push' -l allow-root -s a -d 'allow install root string in binary files after RPATH substitution'
+complete -c spack -n '__fish_spack_using_command buildcache push' -l unsigned -s u -f -a unsigned
+complete -c spack -n '__fish_spack_using_command buildcache push' -l unsigned -s u -d 'push unsigned buildcache tarballs'
+complete -c spack -n '__fish_spack_using_command buildcache push' -l key -s k -r -f -a key
+complete -c spack -n '__fish_spack_using_command buildcache push' -l key -s k -r -d 'key for signing'
+complete -c spack -n '__fish_spack_using_command buildcache push' -l update-index -l rebuild-index -f -a update_index
+complete -c spack -n '__fish_spack_using_command buildcache push' -l update-index -l rebuild-index -d 'regenerate buildcache index after building package(s)'
+complete -c spack -n '__fish_spack_using_command buildcache push' -l spec-file -r -f -a spec_file
+complete -c spack -n '__fish_spack_using_command buildcache push' -l spec-file -r -d 'create buildcache entry for spec from json or yaml file'
+complete -c spack -n '__fish_spack_using_command buildcache push' -l only -r -f -a 'package dependencies'
+complete -c spack -n '__fish_spack_using_command buildcache push' -l only -r -d 'select the buildcache mode. The default is to build a cache for the package along with all its dependencies. Alternatively, one can decide to build a cache for only the package or only the dependencies'
+
+# spack buildcache create
+set -g __fish_spack_optspecs_spack_buildcache_create h/help f/force a/allow-root u/unsigned k/key= update-index spec-file= only=
+complete -c spack -n '__fish_spack_using_command_pos_remainder 1 buildcache create' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command buildcache create' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command buildcache create' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command buildcache create' -s f -l force -f -a force
+complete -c spack -n '__fish_spack_using_command buildcache create' -s f -l force -d 'overwrite tarball if it exists'
+complete -c spack -n '__fish_spack_using_command buildcache create' -l allow-root -s a -f -a allow_root
+complete -c spack -n '__fish_spack_using_command buildcache create' -l allow-root -s a -d 'allow install root string in binary files after RPATH substitution'
+complete -c spack -n '__fish_spack_using_command buildcache create' -l unsigned -s u -f -a unsigned
+complete -c spack -n '__fish_spack_using_command buildcache create' -l unsigned -s u -d 'push unsigned buildcache tarballs'
+complete -c spack -n '__fish_spack_using_command buildcache create' -l key -s k -r -f -a key
+complete -c spack -n '__fish_spack_using_command buildcache create' -l key -s k -r -d 'key for signing'
+complete -c spack -n '__fish_spack_using_command buildcache create' -l update-index -l rebuild-index -f -a update_index
+complete -c spack -n '__fish_spack_using_command buildcache create' -l update-index -l rebuild-index -d 'regenerate buildcache index after building package(s)'
+complete -c spack -n '__fish_spack_using_command buildcache create' -l spec-file -r -f -a spec_file
+complete -c spack -n '__fish_spack_using_command buildcache create' -l spec-file -r -d 'create buildcache entry for spec from json or yaml file'
+complete -c spack -n '__fish_spack_using_command buildcache create' -l only -r -f -a 'package dependencies'
+complete -c spack -n '__fish_spack_using_command buildcache create' -l only -r -d 'select the buildcache mode. The default is to build a cache for the package along with all its dependencies. Alternatively, one can decide to build a cache for only the package or only the dependencies'
+
+# spack buildcache install
+set -g __fish_spack_optspecs_spack_buildcache_install h/help f/force m/multiple u/unsigned o/otherarch
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 buildcache install' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command buildcache install' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command buildcache install' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command buildcache install' -s f -l force -f -a force
+complete -c spack -n '__fish_spack_using_command buildcache install' -s f -l force -d 'overwrite install directory if it exists'
+complete -c spack -n '__fish_spack_using_command buildcache install' -s m -l multiple -f -a multiple
+complete -c spack -n '__fish_spack_using_command buildcache install' -s m -l multiple -d 'allow all matching packages'
+complete -c spack -n '__fish_spack_using_command buildcache install' -s u -l unsigned -f -a unsigned
+complete -c spack -n '__fish_spack_using_command buildcache install' -s u -l unsigned -d 'install unsigned buildcache tarballs for testing'
+complete -c spack -n '__fish_spack_using_command buildcache install' -s o -l otherarch -f -a otherarch
+complete -c spack -n '__fish_spack_using_command buildcache install' -s o -l otherarch -d 'install specs from other architectures instead of default platform and OS'
+
+# spack buildcache list
+set -g __fish_spack_optspecs_spack_buildcache_list h/help l/long L/very-long v/variants a/allarch
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 buildcache list' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command buildcache list' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command buildcache list' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command buildcache list' -s l -l long -f -a long
+complete -c spack -n '__fish_spack_using_command buildcache list' -s l -l long -d 'show dependency hashes as well as versions'
+complete -c spack -n '__fish_spack_using_command buildcache list' -s L -l very-long -f -a very_long
+complete -c spack -n '__fish_spack_using_command buildcache list' -s L -l very-long -d 'show full dependency hashes as well as versions'
+complete -c spack -n '__fish_spack_using_command buildcache list' -s v -l variants -f -a variants
+complete -c spack -n '__fish_spack_using_command buildcache list' -s v -l variants -d 'show variants in output (can be long)'
+complete -c spack -n '__fish_spack_using_command buildcache list' -s a -l allarch -f -a allarch
+complete -c spack -n '__fish_spack_using_command buildcache list' -s a -l allarch -d 'list specs for all available architectures instead of default platform and OS'
+
+# spack buildcache keys
+set -g __fish_spack_optspecs_spack_buildcache_keys h/help i/install t/trust f/force
+complete -c spack -n '__fish_spack_using_command buildcache keys' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command buildcache keys' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command buildcache keys' -s i -l install -f -a install
+complete -c spack -n '__fish_spack_using_command buildcache keys' -s i -l install -d 'install Keys pulled from mirror'
+complete -c spack -n '__fish_spack_using_command buildcache keys' -s t -l trust -f -a trust
+complete -c spack -n '__fish_spack_using_command buildcache keys' -s t -l trust -d 'trust all downloaded keys'
+complete -c spack -n '__fish_spack_using_command buildcache keys' -s f -l force -f -a force
+complete -c spack -n '__fish_spack_using_command buildcache keys' -s f -l force -d 'force new download of keys'
+
+# spack buildcache preview
+set -g __fish_spack_optspecs_spack_buildcache_preview h/help
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 buildcache preview' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command buildcache preview' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command buildcache preview' -s h -l help -d 'show this help message and exit'
+
+# spack buildcache check
+set -g __fish_spack_optspecs_spack_buildcache_check h/help m/mirror-url= o/output-file= scope= s/spec= spec-file=
+complete -c spack -n '__fish_spack_using_command buildcache check' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command buildcache check' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command buildcache check' -s m -l mirror-url -r -f -a mirror_url
+complete -c spack -n '__fish_spack_using_command buildcache check' -s m -l mirror-url -r -d 'override any configured mirrors with this mirror URL'
+complete -c spack -n '__fish_spack_using_command buildcache check' -s o -l output-file -r -f -a output_file
+complete -c spack -n '__fish_spack_using_command buildcache check' -s o -l output-file -r -d 'file where rebuild info should be written'
+complete -c spack -n '__fish_spack_using_command buildcache check' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command buildcache check' -l scope -r -d 'configuration scope containing mirrors to check'
+complete -c spack -n '__fish_spack_using_command buildcache check' -s s -l spec -r -f -a spec
+complete -c spack -n '__fish_spack_using_command buildcache check' -s s -l spec -r -d 'check single spec instead of release specs file'
+complete -c spack -n '__fish_spack_using_command buildcache check' -l spec-file -r -f -a spec_file
+complete -c spack -n '__fish_spack_using_command buildcache check' -l spec-file -r -d 'check single spec from json or yaml file instead of release specs file'
+
+# spack buildcache download
+set -g __fish_spack_optspecs_spack_buildcache_download h/help s/spec= spec-file= p/path=
+complete -c spack -n '__fish_spack_using_command buildcache download' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command buildcache download' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command buildcache download' -s s -l spec -r -f -a spec
+complete -c spack -n '__fish_spack_using_command buildcache download' -s s -l spec -r -d 'download built tarball for spec from mirror'
+complete -c spack -n '__fish_spack_using_command buildcache download' -l spec-file -r -f -a spec_file
+complete -c spack -n '__fish_spack_using_command buildcache download' -l spec-file -r -d 'download built tarball for spec (from json or yaml file) from mirror'
+complete -c spack -n '__fish_spack_using_command buildcache download' -s p -l path -r -f -a path
+complete -c spack -n '__fish_spack_using_command buildcache download' -s p -l path -r -d 'path to directory where tarball should be downloaded'
+
+# spack buildcache get-buildcache-name
+set -g __fish_spack_optspecs_spack_buildcache_get_buildcache_name h/help s/spec= spec-file=
+complete -c spack -n '__fish_spack_using_command buildcache get-buildcache-name' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command buildcache get-buildcache-name' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command buildcache get-buildcache-name' -s s -l spec -r -f -a spec
+complete -c spack -n '__fish_spack_using_command buildcache get-buildcache-name' -s s -l spec -r -d 'spec string for which buildcache name is desired'
+complete -c spack -n '__fish_spack_using_command buildcache get-buildcache-name' -l spec-file -r -f -a spec_file
+complete -c spack -n '__fish_spack_using_command buildcache get-buildcache-name' -l spec-file -r -d 'path to spec json or yaml file for which buildcache name is desired'
+
+# spack buildcache save-specfile
+set -g __fish_spack_optspecs_spack_buildcache_save_specfile h/help root-spec= root-specfile= s/specs= specfile-dir=
+complete -c spack -n '__fish_spack_using_command buildcache save-specfile' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command buildcache save-specfile' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command buildcache save-specfile' -l root-spec -r -f -a root_spec
+complete -c spack -n '__fish_spack_using_command buildcache save-specfile' -l root-spec -r -d 'root spec of dependent spec'
+complete -c spack -n '__fish_spack_using_command buildcache save-specfile' -l root-specfile -r -f -a root_specfile
+complete -c spack -n '__fish_spack_using_command buildcache save-specfile' -l root-specfile -r -d 'path to json or yaml file containing root spec of dependent spec'
+complete -c spack -n '__fish_spack_using_command buildcache save-specfile' -s s -l specs -r -f -a specs
+complete -c spack -n '__fish_spack_using_command buildcache save-specfile' -s s -l specs -r -d 'list of dependent specs for which saved yaml is desired'
+complete -c spack -n '__fish_spack_using_command buildcache save-specfile' -l specfile-dir -r -f -a specfile_dir
+complete -c spack -n '__fish_spack_using_command buildcache save-specfile' -l specfile-dir -r -d 'path to directory where spec yamls should be saved'
+
+# spack buildcache sync
+set -g __fish_spack_optspecs_spack_buildcache_sync h/help manifest-glob=
+
+complete -c spack -n '__fish_spack_using_command buildcache sync' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command buildcache sync' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command buildcache sync' -l manifest-glob -r -f -a manifest_glob
+complete -c spack -n '__fish_spack_using_command buildcache sync' -l manifest-glob -r -d 'a quoted glob pattern identifying copy manifest files'
+
+# spack buildcache update-index
+set -g __fish_spack_optspecs_spack_buildcache_update_index h/help k/keys
+
+complete -c spack -n '__fish_spack_using_command buildcache update-index' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command buildcache update-index' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command buildcache update-index' -s k -l keys -f -a keys
+complete -c spack -n '__fish_spack_using_command buildcache update-index' -s k -l keys -d 'if provided, key index will be updated as well as package index'
+
+# spack buildcache rebuild-index
+set -g __fish_spack_optspecs_spack_buildcache_rebuild_index h/help k/keys
+
+complete -c spack -n '__fish_spack_using_command buildcache rebuild-index' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command buildcache rebuild-index' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command buildcache rebuild-index' -s k -l keys -f -a keys
+complete -c spack -n '__fish_spack_using_command buildcache rebuild-index' -s k -l keys -d 'if provided, key index will be updated as well as package index'
+
+# spack cd
+set -g __fish_spack_optspecs_spack_cd h/help m/module-dir r/spack-root i/install-dir p/package-dir P/packages s/stage-dir S/stages source-dir b/build-dir e/env= first
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 cd' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command cd' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command cd' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command cd' -s m -l module-dir -f -a module_dir
+complete -c spack -n '__fish_spack_using_command cd' -s m -l module-dir -d 'spack python module directory'
+complete -c spack -n '__fish_spack_using_command cd' -s r -l spack-root -f -a spack_root
+complete -c spack -n '__fish_spack_using_command cd' -s r -l spack-root -d 'spack installation root'
+complete -c spack -n '__fish_spack_using_command cd' -s i -l install-dir -f -a install_dir
+complete -c spack -n '__fish_spack_using_command cd' -s i -l install-dir -d 'install prefix for spec (spec need not be installed)'
+complete -c spack -n '__fish_spack_using_command cd' -s p -l package-dir -f -a package_dir
+complete -c spack -n '__fish_spack_using_command cd' -s p -l package-dir -d 'directory enclosing a spec\'s package.py file'
+complete -c spack -n '__fish_spack_using_command cd' -s P -l packages -f -a packages
+complete -c spack -n '__fish_spack_using_command cd' -s P -l packages -d 'top-level packages directory for Spack'
+complete -c spack -n '__fish_spack_using_command cd' -s s -l stage-dir -f -a stage_dir
+complete -c spack -n '__fish_spack_using_command cd' -s s -l stage-dir -d 'stage directory for a spec'
+complete -c spack -n '__fish_spack_using_command cd' -s S -l stages -f -a stages
+complete -c spack -n '__fish_spack_using_command cd' -s S -l stages -d 'top level stage directory'
+complete -c spack -n '__fish_spack_using_command cd' -l source-dir -f -a source_dir
+complete -c spack -n '__fish_spack_using_command cd' -l source-dir -d 'source directory for a spec (requires it to be staged first)'
+complete -c spack -n '__fish_spack_using_command cd' -s b -l build-dir -f -a build_dir
+complete -c spack -n '__fish_spack_using_command cd' -s b -l build-dir -d 'build directory for a spec (requires it to be staged first)'
+complete -c spack -n '__fish_spack_using_command cd' -s e -l env -r -f -a location_env
+complete -c spack -n '__fish_spack_using_command cd' -s e -l env -r -d 'location of the named or current environment'
+complete -c spack -n '__fish_spack_using_command cd' -l first -f -a find_first
+complete -c spack -n '__fish_spack_using_command cd' -l first -d 'use the first match if multiple packages match the spec'
+
+# spack change
+set -g __fish_spack_optspecs_spack_change h/help l/list-name= match-spec= a/all
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 change' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command change' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command change' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command change' -s l -l list-name -r -f -a list_name
+complete -c spack -n '__fish_spack_using_command change' -s l -l list-name -r -d 'name of the list to remove specs from'
+complete -c spack -n '__fish_spack_using_command change' -l match-spec -r -f -a match_spec
+complete -c spack -n '__fish_spack_using_command change' -l match-spec -r -d 'if name is ambiguous, supply a spec to match'
+complete -c spack -n '__fish_spack_using_command change' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command change' -s a -l all -d 'change all matching specs (allow changing more than one spec)'
+
+# spack checksum
+set -g __fish_spack_optspecs_spack_checksum h/help keep-stage b/batch l/latest p/preferred a/add-to-package
+complete -c spack -n '__fish_spack_using_command_pos 0 checksum' -f -a '(__fish_spack_packages)'
+complete -c spack -n '__fish_spack_using_command_pos_remainder 1 checksum' -f -a '(__fish_spack_package_versions $__fish_spack_argparse_argv[1])'
+complete -c spack -n '__fish_spack_using_command checksum' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command checksum' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command checksum' -l keep-stage -f -a keep_stage
+complete -c spack -n '__fish_spack_using_command checksum' -l keep-stage -d 'don\'t clean up staging area when command completes'
+complete -c spack -n '__fish_spack_using_command checksum' -s b -l batch -f -a batch
+complete -c spack -n '__fish_spack_using_command checksum' -s b -l batch -d 'don\'t ask which versions to checksum'
+complete -c spack -n '__fish_spack_using_command checksum' -s l -l latest -f -a latest
+complete -c spack -n '__fish_spack_using_command checksum' -s l -l latest -d 'checksum the latest available version only'
+complete -c spack -n '__fish_spack_using_command checksum' -s p -l preferred -f -a preferred
+complete -c spack -n '__fish_spack_using_command checksum' -s p -l preferred -d 'checksum the preferred version only'
+complete -c spack -n '__fish_spack_using_command checksum' -s a -l add-to-package -f -a add_to_package
+complete -c spack -n '__fish_spack_using_command checksum' -s a -l add-to-package -d 'add new versions to package'
+
+# spack ci
+set -g __fish_spack_optspecs_spack_ci h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 ci' -f -a generate -d 'generate jobs file from a CI-aware spack file'
+complete -c spack -n '__fish_spack_using_command_pos 0 ci' -f -a rebuild-index -d 'rebuild the buildcache index for the remote mirror'
+complete -c spack -n '__fish_spack_using_command_pos 0 ci' -f -a rebuild -d 'rebuild a spec if it is not on the remote mirror'
+complete -c spack -n '__fish_spack_using_command_pos 0 ci' -f -a reproduce-build -d 'generate instructions for reproducing the spec rebuild job'
+complete -c spack -n '__fish_spack_using_command ci' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command ci' -s h -l help -d 'show this help message and exit'
+
+# spack ci generate
+set -g __fish_spack_optspecs_spack_ci_generate h/help output-file= copy-to= optimize dependencies buildcache-destination= prune-dag no-prune-dag check-index-only artifacts-root=
+complete -c spack -n '__fish_spack_using_command ci generate' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command ci generate' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command ci generate' -l output-file -r -f -a output_file
+complete -c spack -n '__fish_spack_using_command ci generate' -l output-file -r -d 'pathname for the generated gitlab ci yaml file'
+complete -c spack -n '__fish_spack_using_command ci generate' -l copy-to -r -f -a copy_to
+complete -c spack -n '__fish_spack_using_command ci generate' -l copy-to -r -d 'path to additional directory for job files'
+complete -c spack -n '__fish_spack_using_command ci generate' -l optimize -f -a optimize
+complete -c spack -n '__fish_spack_using_command ci generate' -l optimize -d '(experimental) optimize the gitlab yaml file for size'
+complete -c spack -n '__fish_spack_using_command ci generate' -l dependencies -f -a dependencies
+complete -c spack -n '__fish_spack_using_command ci generate' -l dependencies -d '(experimental) disable DAG scheduling (use \'plain\' dependencies)'
+complete -c spack -n '__fish_spack_using_command ci generate' -l buildcache-destination -r -f -a buildcache_destination
+complete -c spack -n '__fish_spack_using_command ci generate' -l buildcache-destination -r -d 'override the mirror configured in the environment'
+complete -c spack -n '__fish_spack_using_command ci generate' -l prune-dag -f -a prune_dag
+complete -c spack -n '__fish_spack_using_command ci generate' -l prune-dag -d 'skip up-to-date specs'
+complete -c spack -n '__fish_spack_using_command ci generate' -l no-prune-dag -f -a prune_dag
+complete -c spack -n '__fish_spack_using_command ci generate' -l no-prune-dag -d 'process up-to-date specs'
+complete -c spack -n '__fish_spack_using_command ci generate' -l check-index-only -f -a index_only
+complete -c spack -n '__fish_spack_using_command ci generate' -l check-index-only -d 'only check spec state from buildcache indices'
+complete -c spack -n '__fish_spack_using_command ci generate' -l artifacts-root -r -f -a artifacts_root
+complete -c spack -n '__fish_spack_using_command ci generate' -l artifacts-root -r -d 'path to the root of the artifacts directory'
+
+# spack ci rebuild-index
+set -g __fish_spack_optspecs_spack_ci_rebuild_index h/help
+complete -c spack -n '__fish_spack_using_command ci rebuild-index' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command ci rebuild-index' -s h -l help -d 'show this help message and exit'
+
+# spack ci rebuild
+set -g __fish_spack_optspecs_spack_ci_rebuild h/help t/tests fail-fast
+complete -c spack -n '__fish_spack_using_command ci rebuild' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command ci rebuild' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command ci rebuild' -s t -l tests -f -a tests
+complete -c spack -n '__fish_spack_using_command ci rebuild' -s t -l tests -d 'run stand-alone tests after the build'
+complete -c spack -n '__fish_spack_using_command ci rebuild' -l fail-fast -f -a fail_fast
+complete -c spack -n '__fish_spack_using_command ci rebuild' -l fail-fast -d 'stop stand-alone tests after the first failure'
+
+# spack ci reproduce-build
+set -g __fish_spack_optspecs_spack_ci_reproduce_build h/help working-dir=
+complete -c spack -n '__fish_spack_using_command_pos 0 ci reproduce-build' -f
+complete -c spack -n '__fish_spack_using_command ci reproduce-build' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command ci reproduce-build' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command ci reproduce-build' -l working-dir -r -f -a working_dir
+complete -c spack -n '__fish_spack_using_command ci reproduce-build' -l working-dir -r -d 'where to unpack artifacts'
+
+# spack clean
+set -g __fish_spack_optspecs_spack_clean h/help s/stage d/downloads f/failures m/misc-cache p/python-cache b/bootstrap a/all
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 clean' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command clean' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command clean' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command clean' -s s -l stage -f -a stage
+complete -c spack -n '__fish_spack_using_command clean' -s s -l stage -d 'remove all temporary build stages (default)'
+complete -c spack -n '__fish_spack_using_command clean' -s d -l downloads -f -a downloads
+complete -c spack -n '__fish_spack_using_command clean' -s d -l downloads -d 'remove cached downloads'
+complete -c spack -n '__fish_spack_using_command clean' -s f -l failures -f -a failures
+complete -c spack -n '__fish_spack_using_command clean' -s f -l failures -d 'force removal of all install failure tracking markers'
+complete -c spack -n '__fish_spack_using_command clean' -s m -l misc-cache -f -a misc_cache
+complete -c spack -n '__fish_spack_using_command clean' -s m -l misc-cache -d 'remove long-lived caches, like the virtual package index'
+complete -c spack -n '__fish_spack_using_command clean' -s p -l python-cache -f -a python_cache
+complete -c spack -n '__fish_spack_using_command clean' -s p -l python-cache -d 'remove .pyc, .pyo files and __pycache__ folders'
+complete -c spack -n '__fish_spack_using_command clean' -s b -l bootstrap -f -a bootstrap
+complete -c spack -n '__fish_spack_using_command clean' -s b -l bootstrap -d 'remove software and configuration needed to bootstrap Spack'
+complete -c spack -n '__fish_spack_using_command clean' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command clean' -s a -l all -d 'equivalent to -sdfmp (does not include --bootstrap)'
+
+# spack clone
+set -g __fish_spack_optspecs_spack_clone h/help r/remote=
+complete -c spack -n '__fish_spack_using_command_pos 0 clone' -f -a '(__fish_complete_directories)'
+complete -c spack -n '__fish_spack_using_command clone' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command clone' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command clone' -s r -l remote -r -f -a remote
+complete -c spack -n '__fish_spack_using_command clone' -s r -l remote -r -d 'name of the remote to clone from'
+
+# spack commands
+set -g __fish_spack_optspecs_spack_commands h/help update-completion a/aliases format= header= update=
+
+complete -c spack -n '__fish_spack_using_command commands' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command commands' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command commands' -l update-completion -f -a update_completion
+complete -c spack -n '__fish_spack_using_command commands' -l update-completion -d 'regenerate spack\'s tab completion scripts'
+complete -c spack -n '__fish_spack_using_command commands' -s a -l aliases -f -a aliases
+complete -c spack -n '__fish_spack_using_command commands' -s a -l aliases -d 'include command aliases'
+complete -c spack -n '__fish_spack_using_command commands' -l format -r -f -a 'subcommands rst names bash fish'
+complete -c spack -n '__fish_spack_using_command commands' -l format -r -d 'format to be used to print the output (default: names)'
+complete -c spack -n '__fish_spack_using_command commands' -l header -r -f -a header
+complete -c spack -n '__fish_spack_using_command commands' -l header -r -d 'prepend contents of FILE to the output (useful for rst format)'
+complete -c spack -n '__fish_spack_using_command commands' -l update -r -f -a update
+complete -c spack -n '__fish_spack_using_command commands' -l update -r -d 'write output to the specified file, if any command is newer'
+
+# spack compiler
+set -g __fish_spack_optspecs_spack_compiler h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 compiler' -f -a find -d 'search the system for compilers to add to Spack configuration'
+complete -c spack -n '__fish_spack_using_command_pos 0 compiler' -f -a add -d 'search the system for compilers to add to Spack configuration'
+complete -c spack -n '__fish_spack_using_command_pos 0 compiler' -f -a remove -d 'remove compiler by spec'
+complete -c spack -n '__fish_spack_using_command_pos 0 compiler' -f -a rm -d 'remove compiler by spec'
+complete -c spack -n '__fish_spack_using_command_pos 0 compiler' -f -a list -d 'list available compilers'
+complete -c spack -n '__fish_spack_using_command_pos 0 compiler' -f -a info -d 'show compiler paths'
+complete -c spack -n '__fish_spack_using_command compiler' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command compiler' -s h -l help -d 'show this help message and exit'
+
+# spack compiler find
+set -g __fish_spack_optspecs_spack_compiler_find h/help scope=
+
+complete -c spack -n '__fish_spack_using_command compiler find' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command compiler find' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command compiler find' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command compiler find' -l scope -r -d 'configuration scope to modify'
+
+# spack compiler add
+set -g __fish_spack_optspecs_spack_compiler_add h/help scope=
+
+complete -c spack -n '__fish_spack_using_command compiler add' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command compiler add' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command compiler add' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command compiler add' -l scope -r -d 'configuration scope to modify'
+
+# spack compiler remove
+set -g __fish_spack_optspecs_spack_compiler_remove h/help a/all scope=
+complete -c spack -n '__fish_spack_using_command_pos 0 compiler remove' -f -a '(__fish_spack_installed_compilers)'
+complete -c spack -n '__fish_spack_using_command compiler remove' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command compiler remove' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command compiler remove' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command compiler remove' -s a -l all -d 'remove ALL compilers that match spec'
+complete -c spack -n '__fish_spack_using_command compiler remove' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command compiler remove' -l scope -r -d 'configuration scope to modify'
+
+# spack compiler rm
+set -g __fish_spack_optspecs_spack_compiler_rm h/help a/all scope=
+complete -c spack -n '__fish_spack_using_command_pos 0 compiler rm' -f -a '(__fish_spack_installed_compilers)'
+complete -c spack -n '__fish_spack_using_command compiler rm' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command compiler rm' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command compiler rm' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command compiler rm' -s a -l all -d 'remove ALL compilers that match spec'
+complete -c spack -n '__fish_spack_using_command compiler rm' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command compiler rm' -l scope -r -d 'configuration scope to modify'
+
+# spack compiler list
+set -g __fish_spack_optspecs_spack_compiler_list h/help scope=
+complete -c spack -n '__fish_spack_using_command compiler list' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command compiler list' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command compiler list' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command compiler list' -l scope -r -d 'configuration scope to read from'
+
+# spack compiler info
+set -g __fish_spack_optspecs_spack_compiler_info h/help scope=
+complete -c spack -n '__fish_spack_using_command_pos 0 compiler info' -f -a '(__fish_spack_installed_compilers)'
+complete -c spack -n '__fish_spack_using_command compiler info' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command compiler info' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command compiler info' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command compiler info' -l scope -r -d 'configuration scope to read from'
+
+# spack compilers
+set -g __fish_spack_optspecs_spack_compilers h/help scope=
+complete -c spack -n '__fish_spack_using_command compilers' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command compilers' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command compilers' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command compilers' -l scope -r -d 'configuration scope to read/modify'
+
+# spack concretize
+set -g __fish_spack_optspecs_spack_concretize h/help f/force test= q/quiet U/fresh reuse reuse-deps j/jobs=
+complete -c spack -n '__fish_spack_using_command concretize' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command concretize' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command concretize' -s f -l force -f -a force
+complete -c spack -n '__fish_spack_using_command concretize' -s f -l force -d 're-concretize even if already concretized'
+complete -c spack -n '__fish_spack_using_command concretize' -l test -r -f -a 'root all'
+complete -c spack -n '__fish_spack_using_command concretize' -l test -r -d 'concretize with test dependencies of only root packages or all packages'
+complete -c spack -n '__fish_spack_using_command concretize' -s q -l quiet -f -a quiet
+complete -c spack -n '__fish_spack_using_command concretize' -s q -l quiet -d 'don\'t print concretized specs'
+complete -c spack -n '__fish_spack_using_command concretize' -s U -l fresh -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command concretize' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
+complete -c spack -n '__fish_spack_using_command concretize' -l reuse -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command concretize' -l reuse -d 'reuse installed packages/buildcaches when possible'
+complete -c spack -n '__fish_spack_using_command concretize' -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command concretize' -l reuse-deps -d 'reuse installed dependencies only'
+complete -c spack -n '__fish_spack_using_command concretize' -s j -l jobs -r -f -a jobs
+complete -c spack -n '__fish_spack_using_command concretize' -s j -l jobs -r -d 'explicitly set number of parallel jobs'
+
+# spack config
+set -g __fish_spack_optspecs_spack_config h/help scope=
+complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a get -d 'print configuration values'
+complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a blame -d 'print configuration annotated with source file:line'
+complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a edit -d 'edit configuration file'
+complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a list -d 'list configuration sections'
+complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a add -d 'add configuration parameters'
+complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a prefer-upstream -d 'set package preferences from upstream'
+complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a remove -d 'remove configuration parameters'
+complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a rm -d 'remove configuration parameters'
+complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a update -d 'update configuration files to the latest format'
+complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a revert -d 'revert configuration files to their state before update'
+complete -c spack -n '__fish_spack_using_command config' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command config' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command config' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command config' -l scope -r -d 'configuration scope to read/modify'
+
+# spack config get
+set -g __fish_spack_optspecs_spack_config_get h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 config get' -f -a 'bootstrap cdash ci compilers concretizer config mirrors modules packages repos upstreams'
+complete -c spack -n '__fish_spack_using_command config get' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command config get' -s h -l help -d 'show this help message and exit'
+
+# spack config blame
+set -g __fish_spack_optspecs_spack_config_blame h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 config blame' -f -a 'bootstrap cdash ci compilers concretizer config mirrors modules packages repos upstreams'
+complete -c spack -n '__fish_spack_using_command config blame' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command config blame' -s h -l help -d 'show this help message and exit'
+
+# spack config edit
+set -g __fish_spack_optspecs_spack_config_edit h/help print-file
+complete -c spack -n '__fish_spack_using_command_pos 0 config edit' -f -a 'bootstrap cdash ci compilers concretizer config mirrors modules packages repos upstreams'
+complete -c spack -n '__fish_spack_using_command config edit' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command config edit' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command config edit' -l print-file -f -a print_file
+complete -c spack -n '__fish_spack_using_command config edit' -l print-file -d 'print the file name that would be edited'
+
+# spack config list
+set -g __fish_spack_optspecs_spack_config_list h/help
+complete -c spack -n '__fish_spack_using_command config list' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command config list' -s h -l help -d 'show this help message and exit'
+
+# spack config add
+set -g __fish_spack_optspecs_spack_config_add h/help f/file=
+complete -c spack -n '__fish_spack_using_command_pos 0 config add' -f -a '(__fish_spack_colon_path)'
+complete -c spack -n '__fish_spack_using_command config add' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command config add' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command config add' -s f -l file -r -f -a file
+complete -c spack -n '__fish_spack_using_command config add' -s f -l file -r -d 'file from which to set all config values'
+
+# spack config prefer-upstream
+set -g __fish_spack_optspecs_spack_config_prefer_upstream h/help local
+complete -c spack -n '__fish_spack_using_command config prefer-upstream' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command config prefer-upstream' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command config prefer-upstream' -l local -f -a local
+complete -c spack -n '__fish_spack_using_command config prefer-upstream' -l local -d 'set packages preferences based on local installs, rather than upstream'
+
+# spack config remove
+set -g __fish_spack_optspecs_spack_config_remove h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 config remove' -f -a '(__fish_spack_colon_path)'
+complete -c spack -n '__fish_spack_using_command config remove' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command config remove' -s h -l help -d 'show this help message and exit'
+
+# spack config rm
+set -g __fish_spack_optspecs_spack_config_rm h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 config rm' -f -a '(__fish_spack_colon_path)'
+complete -c spack -n '__fish_spack_using_command config rm' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command config rm' -s h -l help -d 'show this help message and exit'
+
+# spack config update
+set -g __fish_spack_optspecs_spack_config_update h/help y/yes-to-all
+complete -c spack -n '__fish_spack_using_command_pos 0 config update' -f -a '(__fish_spack_config_sections)'
+complete -c spack -n '__fish_spack_using_command config update' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command config update' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command config update' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command config update' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+
+# spack config revert
+set -g __fish_spack_optspecs_spack_config_revert h/help y/yes-to-all
+complete -c spack -n '__fish_spack_using_command_pos 0 config revert' -f -a '(__fish_spack_config_sections)'
+complete -c spack -n '__fish_spack_using_command config revert' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command config revert' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command config revert' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command config revert' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+
+# spack containerize
+set -g __fish_spack_optspecs_spack_containerize h/help list-os last-stage=
+complete -c spack -n '__fish_spack_using_command containerize' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command containerize' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command containerize' -l list-os -f -a list_os
+complete -c spack -n '__fish_spack_using_command containerize' -l list-os -d 'list all the OS that can be used in the bootstrap phase and exit'
+complete -c spack -n '__fish_spack_using_command containerize' -l last-stage -r -f -a 'bootstrap build final'
+complete -c spack -n '__fish_spack_using_command containerize' -l last-stage -r -d 'last stage in the container recipe'
+
+# spack create
+set -g __fish_spack_optspecs_spack_create h/help keep-stage n/name= t/template= r/repo= N/namespace= f/force skip-editor b/batch
+
+complete -c spack -n '__fish_spack_using_command create' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command create' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command create' -l keep-stage -f -a keep_stage
+complete -c spack -n '__fish_spack_using_command create' -l keep-stage -d 'don\'t clean up staging area when command completes'
+complete -c spack -n '__fish_spack_using_command create' -s n -l name -r -f -a name
+complete -c spack -n '__fish_spack_using_command create' -s n -l name -r -d 'name of the package to create'
+complete -c spack -n '__fish_spack_using_command create' -s t -l template -r -f -a 'autoreconf autotools bazel bundle cmake generic intel lua makefile maven meson octave perlbuild perlmake python qmake r racket ruby scons sip waf'
+complete -c spack -n '__fish_spack_using_command create' -s t -l template -r -d 'build system template to use'
+complete -c spack -n '__fish_spack_using_command create' -s r -l repo -r -f -a repo
+complete -c spack -n '__fish_spack_using_command create' -s r -l repo -r -d 'path to a repository where the package should be created'
+complete -c spack -n '__fish_spack_using_command create' -s N -l namespace -r -f -a namespace
+complete -c spack -n '__fish_spack_using_command create' -s N -l namespace -r -d 'specify a namespace for the package'
+complete -c spack -n '__fish_spack_using_command create' -s f -l force -f -a force
+complete -c spack -n '__fish_spack_using_command create' -s f -l force -d 'overwrite any existing package file with the same name'
+complete -c spack -n '__fish_spack_using_command create' -l skip-editor -f -a skip_editor
+complete -c spack -n '__fish_spack_using_command create' -l skip-editor -d 'skip the edit session for the package (e.g., automation)'
+complete -c spack -n '__fish_spack_using_command create' -s b -l batch -f -a batch
+complete -c spack -n '__fish_spack_using_command create' -s b -l batch -d 'don\'t ask which versions to checksum'
+
+# spack debug
+set -g __fish_spack_optspecs_spack_debug h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 debug' -f -a create-db-tarball -d 'create a tarball of Spack\'s installation metadata'
+complete -c spack -n '__fish_spack_using_command_pos 0 debug' -f -a report -d 'print information useful for bug reports'
+complete -c spack -n '__fish_spack_using_command debug' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command debug' -s h -l help -d 'show this help message and exit'
+
+# spack debug create-db-tarball
+set -g __fish_spack_optspecs_spack_debug_create_db_tarball h/help
+complete -c spack -n '__fish_spack_using_command debug create-db-tarball' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command debug create-db-tarball' -s h -l help -d 'show this help message and exit'
+
+# spack debug report
+set -g __fish_spack_optspecs_spack_debug_report h/help
+complete -c spack -n '__fish_spack_using_command debug report' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command debug report' -s h -l help -d 'show this help message and exit'
+
+# spack dependencies
+set -g __fish_spack_optspecs_spack_dependencies h/help i/installed t/transitive deptype= V/no-expand-virtuals
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 dependencies' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command dependencies' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command dependencies' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command dependencies' -s i -l installed -f -a installed
+complete -c spack -n '__fish_spack_using_command dependencies' -s i -l installed -d 'list installed dependencies of an installed spec instead of possible dependencies of a package'
+complete -c spack -n '__fish_spack_using_command dependencies' -s t -l transitive -f -a transitive
+complete -c spack -n '__fish_spack_using_command dependencies' -s t -l transitive -d 'show all transitive dependencies'
+complete -c spack -n '__fish_spack_using_command dependencies' -l deptype -r -f -a deptype
+complete -c spack -n '__fish_spack_using_command dependencies' -l deptype -r -d 'comma-separated list of deptypes to traverse'
+complete -c spack -n '__fish_spack_using_command dependencies' -s V -l no-expand-virtuals -f -a expand_virtuals
+complete -c spack -n '__fish_spack_using_command dependencies' -s V -l no-expand-virtuals -d 'do not expand virtual dependencies'
+
+# spack dependents
+set -g __fish_spack_optspecs_spack_dependents h/help i/installed t/transitive
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 dependents' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command dependents' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command dependents' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command dependents' -s i -l installed -f -a installed
+complete -c spack -n '__fish_spack_using_command dependents' -s i -l installed -d 'list installed dependents of an installed spec instead of possible dependents of a package'
+complete -c spack -n '__fish_spack_using_command dependents' -s t -l transitive -f -a transitive
+complete -c spack -n '__fish_spack_using_command dependents' -s t -l transitive -d 'show all transitive dependents'
+
+# spack deprecate
+set -g __fish_spack_optspecs_spack_deprecate h/help y/yes-to-all d/dependencies D/no-dependencies i/install-deprecator I/no-install-deprecator l/link-type=
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 deprecate' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command deprecate' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command deprecate' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command deprecate' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command deprecate' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+complete -c spack -n '__fish_spack_using_command deprecate' -s d -l dependencies -f -a dependencies
+complete -c spack -n '__fish_spack_using_command deprecate' -s d -l dependencies -d 'deprecate dependencies (default)'
+complete -c spack -n '__fish_spack_using_command deprecate' -s D -l no-dependencies -f -a dependencies
+complete -c spack -n '__fish_spack_using_command deprecate' -s D -l no-dependencies -d 'do not deprecate dependencies'
+complete -c spack -n '__fish_spack_using_command deprecate' -s i -l install-deprecator -f -a install
+complete -c spack -n '__fish_spack_using_command deprecate' -s i -l install-deprecator -d 'concretize and install deprecator spec'
+complete -c spack -n '__fish_spack_using_command deprecate' -s I -l no-install-deprecator -f -a install
+complete -c spack -n '__fish_spack_using_command deprecate' -s I -l no-install-deprecator -d 'deprecator spec must already be installed (default)'
+complete -c spack -n '__fish_spack_using_command deprecate' -s l -l link-type -r -f -a 'soft hard'
+complete -c spack -n '__fish_spack_using_command deprecate' -s l -l link-type -r -d 'type of filesystem link to use for deprecation (default soft)'
+
+# spack dev-build
+set -g __fish_spack_optspecs_spack_dev_build h/help j/jobs= d/source-path= i/ignore-dependencies n/no-checksum deprecated keep-prefix skip-patch q/quiet drop-in= test= b/before= u/until= clean dirty U/fresh reuse reuse-deps
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 dev-build' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command dev-build' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command dev-build' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command dev-build' -s j -l jobs -r -f -a jobs
+complete -c spack -n '__fish_spack_using_command dev-build' -s j -l jobs -r -d 'explicitly set number of parallel jobs'
+complete -c spack -n '__fish_spack_using_command dev-build' -s d -l source-path -r -f -a source_path
+complete -c spack -n '__fish_spack_using_command dev-build' -s d -l source-path -r -d 'path to source directory (defaults to the current directory)'
+complete -c spack -n '__fish_spack_using_command dev-build' -s i -l ignore-dependencies -f -a ignore_deps
+complete -c spack -n '__fish_spack_using_command dev-build' -s i -l ignore-dependencies -d 'do not try to install dependencies of requested packages'
+complete -c spack -n '__fish_spack_using_command dev-build' -s n -l no-checksum -f -a no_checksum
+complete -c spack -n '__fish_spack_using_command dev-build' -s n -l no-checksum -d 'do not use checksums to verify downloaded files (unsafe)'
+complete -c spack -n '__fish_spack_using_command dev-build' -l deprecated -f -a deprecated
+complete -c spack -n '__fish_spack_using_command dev-build' -l deprecated -d 'fetch deprecated versions without warning'
+complete -c spack -n '__fish_spack_using_command dev-build' -l keep-prefix -f -a keep_prefix
+complete -c spack -n '__fish_spack_using_command dev-build' -l keep-prefix -d 'do not remove the install prefix if installation fails'
+complete -c spack -n '__fish_spack_using_command dev-build' -l skip-patch -f -a skip_patch
+complete -c spack -n '__fish_spack_using_command dev-build' -l skip-patch -d 'skip patching for the developer build'
+complete -c spack -n '__fish_spack_using_command dev-build' -s q -l quiet -f -a quiet
+complete -c spack -n '__fish_spack_using_command dev-build' -s q -l quiet -d 'do not display verbose build output while installing'
+complete -c spack -n '__fish_spack_using_command dev-build' -l drop-in -r -f -a shell
+complete -c spack -n '__fish_spack_using_command dev-build' -l drop-in -r -d 'drop into a build environment in a new shell, e.g., bash'
+complete -c spack -n '__fish_spack_using_command dev-build' -l test -r -f -a 'root all'
+complete -c spack -n '__fish_spack_using_command dev-build' -l test -r -d 'run tests on only root packages or all packages'
+complete -c spack -n '__fish_spack_using_command dev-build' -s b -l before -r -f -a before
+complete -c spack -n '__fish_spack_using_command dev-build' -s b -l before -r -d 'phase to stop before when installing (default None)'
+complete -c spack -n '__fish_spack_using_command dev-build' -s u -l until -r -f -a until
+complete -c spack -n '__fish_spack_using_command dev-build' -s u -l until -r -d 'phase to stop after when installing (default None)'
+complete -c spack -n '__fish_spack_using_command dev-build' -l clean -f -a dirty
+complete -c spack -n '__fish_spack_using_command dev-build' -l clean -d 'unset harmful variables in the build environment (default)'
+complete -c spack -n '__fish_spack_using_command dev-build' -l dirty -f -a dirty
+complete -c spack -n '__fish_spack_using_command dev-build' -l dirty -d 'preserve user environment in spack\'s build environment (danger!)'
+complete -c spack -n '__fish_spack_using_command dev-build' -s U -l fresh -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command dev-build' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
+complete -c spack -n '__fish_spack_using_command dev-build' -l reuse -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command dev-build' -l reuse -d 'reuse installed packages/buildcaches when possible'
+complete -c spack -n '__fish_spack_using_command dev-build' -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command dev-build' -l reuse-deps -d 'reuse installed dependencies only'
+
+# spack develop
+set -g __fish_spack_optspecs_spack_develop h/help p/path= no-clone clone f/force=
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 develop' -f -k -a '(__fish_spack_specs_or_id)'
+complete -c spack -n '__fish_spack_using_command develop' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command develop' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command develop' -s p -l path -r -f -a path
+complete -c spack -n '__fish_spack_using_command develop' -s p -l path -r -d 'source location of package'
+complete -c spack -n '__fish_spack_using_command develop' -l no-clone -f -a clone
+complete -c spack -n '__fish_spack_using_command develop' -l no-clone -d 'do not clone, the package already exists at the source path'
+complete -c spack -n '__fish_spack_using_command develop' -l clone -f -a clone
+complete -c spack -n '__fish_spack_using_command develop' -l clone -d 'clone the package even if the path already exists'
+complete -c spack -n '__fish_spack_using_command develop' -s f -l force -r -f -a force
+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=
+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'
+complete -c spack -n '__fish_spack_using_command diff' -l json -f -a dump_json
+complete -c spack -n '__fish_spack_using_command diff' -l json -d 'dump json output instead of pretty printing'
+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)'
+
+# spack docs
+set -g __fish_spack_optspecs_spack_docs h/help
+complete -c spack -n '__fish_spack_using_command docs' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command docs' -s h -l help -d 'show this help message and exit'
+
+# spack edit
+set -g __fish_spack_optspecs_spack_edit h/help b/build-system c/command d/docs t/test m/module r/repo= N/namespace=
+complete -c spack -n '__fish_spack_using_command_pos 0 edit' -f -a '(__fish_spack_packages)'
+complete -c spack -n '__fish_spack_using_command edit' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command edit' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command edit' -s b -l build-system -f -a path
+complete -c spack -n '__fish_spack_using_command edit' -s b -l build-system -d 'edit the build system with the supplied name'
+complete -c spack -n '__fish_spack_using_command edit' -s c -l command -f -a path
+complete -c spack -n '__fish_spack_using_command edit' -s c -l command -d 'edit the command with the supplied name'
+complete -c spack -n '__fish_spack_using_command edit' -s d -l docs -f -a path
+complete -c spack -n '__fish_spack_using_command edit' -s d -l docs -d 'edit the docs with the supplied name'
+complete -c spack -n '__fish_spack_using_command edit' -s t -l test -f -a path
+complete -c spack -n '__fish_spack_using_command edit' -s t -l test -d 'edit the test with the supplied name'
+complete -c spack -n '__fish_spack_using_command edit' -s m -l module -f -a path
+complete -c spack -n '__fish_spack_using_command edit' -s m -l module -d 'edit the main spack module with the supplied name'
+complete -c spack -n '__fish_spack_using_command edit' -s r -l repo -r -f -a repo
+complete -c spack -n '__fish_spack_using_command edit' -s r -l repo -r -d 'path to repo to edit package in'
+complete -c spack -n '__fish_spack_using_command edit' -s N -l namespace -r -f -a namespace
+complete -c spack -n '__fish_spack_using_command edit' -s N -l namespace -r -d 'namespace of package to edit'
+
+# spack env
+set -g __fish_spack_optspecs_spack_env h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a activate -d 'set the current environment'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a deactivate -d 'deactivate any active environment in the shell'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a create -d 'create a new environment'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a remove -d 'remove an existing environment'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a rm -d 'remove an existing environment'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a list -d 'list available environments'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a ls -d 'list available environments'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a status -d 'print whether there is an active environment'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a st -d 'print whether there is an active environment'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a loads -d 'list modules for an installed environment \'(see spack module loads)\''
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a view -d 'manage a view associated with the environment'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a update -d 'update environments to the latest format'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a revert -d 'restore environments to their state before update'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a depfile -d 'generate a depfile from the concrete environment specs'
+complete -c spack -n '__fish_spack_using_command env' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env' -s h -l help -d 'show this help message and exit'
+
+# spack env activate
+set -g __fish_spack_optspecs_spack_env_activate h/help sh csh fish bat pwsh v/with-view V/without-view p/prompt temp d/dir=
+complete -c spack -n '__fish_spack_using_command_pos 0 env activate' -f -a '(__fish_spack_environments)'
+complete -c spack -n '__fish_spack_using_command env activate' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env activate' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command env activate' -l sh -f -a shell
+complete -c spack -n '__fish_spack_using_command env activate' -l sh -d 'print sh commands to activate the environment'
+complete -c spack -n '__fish_spack_using_command env activate' -l csh -f -a shell
+complete -c spack -n '__fish_spack_using_command env activate' -l csh -d 'print csh commands to activate the environment'
+complete -c spack -n '__fish_spack_using_command env activate' -l fish -f -a shell
+complete -c spack -n '__fish_spack_using_command env activate' -l fish -d 'print fish commands to activate the environment'
+complete -c spack -n '__fish_spack_using_command env activate' -l bat -f -a shell
+complete -c spack -n '__fish_spack_using_command env activate' -l bat -d 'print bat commands to activate the environment'
+complete -c spack -n '__fish_spack_using_command env activate' -l pwsh -f -a shell
+complete -c spack -n '__fish_spack_using_command env activate' -l pwsh -d 'print powershell commands to activate environment'
+complete -c spack -n '__fish_spack_using_command env activate' -s v -l with-view -f -a with_view
+complete -c spack -n '__fish_spack_using_command env activate' -s v -l with-view -d 'update PATH, etc., with associated view'
+complete -c spack -n '__fish_spack_using_command env activate' -s V -l without-view -f -a with_view
+complete -c spack -n '__fish_spack_using_command env activate' -s V -l without-view -d 'do not update PATH, etc., with associated view'
+complete -c spack -n '__fish_spack_using_command env activate' -s p -l prompt -f -a prompt
+complete -c spack -n '__fish_spack_using_command env activate' -s p -l prompt -d 'decorate the command line prompt when activating'
+complete -c spack -n '__fish_spack_using_command env activate' -l temp -f -a temp
+complete -c spack -n '__fish_spack_using_command env activate' -l temp -d 'create and activate an environment in a temporary directory'
+complete -c spack -n '__fish_spack_using_command env activate' -s d -l dir -r -f -a dir
+complete -c spack -n '__fish_spack_using_command env activate' -s d -l dir -r -d 'activate the environment in this directory'
+
+# spack env deactivate
+set -g __fish_spack_optspecs_spack_env_deactivate h/help sh csh fish bat
+complete -c spack -n '__fish_spack_using_command env deactivate' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env deactivate' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command env deactivate' -l sh -f -a shell
+complete -c spack -n '__fish_spack_using_command env deactivate' -l sh -d 'print sh commands to deactivate the environment'
+complete -c spack -n '__fish_spack_using_command env deactivate' -l csh -f -a shell
+complete -c spack -n '__fish_spack_using_command env deactivate' -l csh -d 'print csh commands to deactivate the environment'
+complete -c spack -n '__fish_spack_using_command env deactivate' -l fish -f -a shell
+complete -c spack -n '__fish_spack_using_command env deactivate' -l fish -d 'print fish commands to activate the environment'
+complete -c spack -n '__fish_spack_using_command env deactivate' -l bat -f -a shell
+complete -c spack -n '__fish_spack_using_command env deactivate' -l bat -d 'print bat commands to activate the environment'
+
+# spack env create
+set -g __fish_spack_optspecs_spack_env_create h/help d/dir keep-relative without-view with-view=
+complete -c spack -n '__fish_spack_using_command_pos 0 env create' -f -a '(__fish_spack_environments)'
+complete -c spack -n '__fish_spack_using_command env create' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env create' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command env create' -s d -l dir -f -a dir
+complete -c spack -n '__fish_spack_using_command env create' -s d -l dir -d 'create an environment in a specific directory'
+complete -c spack -n '__fish_spack_using_command env create' -l keep-relative -f -a keep_relative
+complete -c spack -n '__fish_spack_using_command env create' -l keep-relative -d 'copy relative develop paths verbatim into the new environment when initializing from envfile'
+complete -c spack -n '__fish_spack_using_command env create' -l without-view -f -a without_view
+complete -c spack -n '__fish_spack_using_command env create' -l without-view -d 'do not maintain a view for this environment'
+complete -c spack -n '__fish_spack_using_command env create' -l with-view -r -f -a with_view
+complete -c spack -n '__fish_spack_using_command env create' -l with-view -r -d 'specify that this environment should maintain a view at the specified path (by default the view is maintained in the environment directory)'
+
+# spack env remove
+set -g __fish_spack_optspecs_spack_env_remove h/help y/yes-to-all
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 env remove' -f -a '(__fish_spack_environments)'
+complete -c spack -n '__fish_spack_using_command env remove' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env remove' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command env remove' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command env remove' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+
+# spack env rm
+set -g __fish_spack_optspecs_spack_env_rm h/help y/yes-to-all
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 env rm' -f -a '(__fish_spack_environments)'
+complete -c spack -n '__fish_spack_using_command env rm' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env rm' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command env rm' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command env rm' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+
+# spack env list
+set -g __fish_spack_optspecs_spack_env_list h/help
+complete -c spack -n '__fish_spack_using_command env list' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env list' -s h -l help -d 'show this help message and exit'
+
+# spack env ls
+set -g __fish_spack_optspecs_spack_env_ls h/help
+complete -c spack -n '__fish_spack_using_command env ls' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env ls' -s h -l help -d 'show this help message and exit'
+
+# spack env status
+set -g __fish_spack_optspecs_spack_env_status h/help
+complete -c spack -n '__fish_spack_using_command env status' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env status' -s h -l help -d 'show this help message and exit'
+
+# spack env st
+set -g __fish_spack_optspecs_spack_env_st h/help
+complete -c spack -n '__fish_spack_using_command env st' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env st' -s h -l help -d 'show this help message and exit'
+
+# spack env loads
+set -g __fish_spack_optspecs_spack_env_loads h/help n/module-set-name= m/module-type= input-only p/prefix= x/exclude= r/dependencies
+complete -c spack -n '__fish_spack_using_command env loads' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env loads' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command env loads' -s n -l module-set-name -r -f -a module_set_name
+complete -c spack -n '__fish_spack_using_command env loads' -s n -l module-set-name -r -d 'module set for which to generate load operations'
+complete -c spack -n '__fish_spack_using_command env loads' -s m -l module-type -r -f -a 'tcl lmod'
+complete -c spack -n '__fish_spack_using_command env loads' -s m -l module-type -r -d 'type of module system to generate loads for'
+complete -c spack -n '__fish_spack_using_command env loads' -l input-only -f -a shell
+complete -c spack -n '__fish_spack_using_command env loads' -l input-only -d 'generate input for module command (instead of a shell script)'
+complete -c spack -n '__fish_spack_using_command env loads' -s p -l prefix -r -f -a prefix
+complete -c spack -n '__fish_spack_using_command env loads' -s p -l prefix -r -d 'prepend to module names when issuing module load commands'
+complete -c spack -n '__fish_spack_using_command env loads' -s x -l exclude -r -f -a exclude
+complete -c spack -n '__fish_spack_using_command env loads' -s x -l exclude -r -d 'exclude package from output; may be specified multiple times'
+complete -c spack -n '__fish_spack_using_command env loads' -s r -l dependencies -f -a recurse_dependencies
+complete -c spack -n '__fish_spack_using_command env loads' -s r -l dependencies -d 'recursively traverse spec dependencies'
+
+# spack env view
+set -g __fish_spack_optspecs_spack_env_view h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 env view' -f -a 'regenerate enable disable'
+complete -c spack -n '__fish_spack_using_command env view' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env view' -s h -l help -d 'show this help message and exit'
+
+# spack env update
+set -g __fish_spack_optspecs_spack_env_update h/help y/yes-to-all
+complete -c spack -n '__fish_spack_using_command_pos 0 env update' -f -a '(__fish_spack_environments)'
+complete -c spack -n '__fish_spack_using_command env update' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env update' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command env update' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command env update' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+
+# spack env revert
+set -g __fish_spack_optspecs_spack_env_revert h/help y/yes-to-all
+complete -c spack -n '__fish_spack_using_command_pos 0 env revert' -f -a '(__fish_spack_environments)'
+complete -c spack -n '__fish_spack_using_command env revert' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env revert' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command env revert' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command env revert' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+
+# spack env depfile
+set -g __fish_spack_optspecs_spack_env_depfile h/help make-prefix= make-disable-jobserver use-buildcache= o/output= G/generator=
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 env depfile' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command env depfile' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env depfile' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command env depfile' -l make-prefix -l make-target-prefix -r -f -a make_prefix
+complete -c spack -n '__fish_spack_using_command env depfile' -l make-prefix -l make-target-prefix -r -d 'prefix Makefile targets (and variables) with /'
+complete -c spack -n '__fish_spack_using_command env depfile' -l make-disable-jobserver -f -a jobserver
+complete -c spack -n '__fish_spack_using_command env depfile' -l make-disable-jobserver -d 'disable POSIX jobserver support'
+complete -c spack -n '__fish_spack_using_command env depfile' -l use-buildcache -r -f -a use_buildcache
+complete -c spack -n '__fish_spack_using_command env depfile' -l use-buildcache -r -d 'when using `only`, redundant build dependencies are pruned from the DAG'
+complete -c spack -n '__fish_spack_using_command env depfile' -s o -l output -r -f -a output
+complete -c spack -n '__fish_spack_using_command env depfile' -s o -l output -r -d 'write the depfile to FILE rather than to stdout'
+complete -c spack -n '__fish_spack_using_command env depfile' -s G -l generator -r -f -a make
+complete -c spack -n '__fish_spack_using_command env depfile' -s G -l generator -r -d 'specify the depfile type'
+
+# spack extensions
+set -g __fish_spack_optspecs_spack_extensions h/help l/long L/very-long d/deps p/paths s/show=
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 extensions' -f -a '(__fish_spack_extensions)'
+complete -c spack -n '__fish_spack_using_command extensions' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command extensions' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command extensions' -s l -l long -f -a long
+complete -c spack -n '__fish_spack_using_command extensions' -s l -l long -d 'show dependency hashes as well as versions'
+complete -c spack -n '__fish_spack_using_command extensions' -s L -l very-long -f -a very_long
+complete -c spack -n '__fish_spack_using_command extensions' -s L -l very-long -d 'show full dependency hashes as well as versions'
+complete -c spack -n '__fish_spack_using_command extensions' -s d -l deps -f -a deps
+complete -c spack -n '__fish_spack_using_command extensions' -s d -l deps -d 'output dependencies along with found specs'
+complete -c spack -n '__fish_spack_using_command extensions' -s p -l paths -f -a paths
+complete -c spack -n '__fish_spack_using_command extensions' -s p -l paths -d 'show paths to package install directories'
+complete -c spack -n '__fish_spack_using_command extensions' -s s -l show -r -f -a 'packages installed all'
+complete -c spack -n '__fish_spack_using_command extensions' -s s -l show -r -d 'show only part of output'
+
+# spack external
+set -g __fish_spack_optspecs_spack_external h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 external' -f -a find -d 'add external packages to packages.yaml'
+complete -c spack -n '__fish_spack_using_command_pos 0 external' -f -a list -d 'list detectable packages, by repository and name'
+complete -c spack -n '__fish_spack_using_command_pos 0 external' -f -a read-cray-manifest -d 'consume a Spack-compatible description of externally-installed packages, including dependency relationships'
+complete -c spack -n '__fish_spack_using_command external' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command external' -s h -l help -d 'show this help message and exit'
+
+# spack external find
+set -g __fish_spack_optspecs_spack_external_find h/help not-buildable exclude= p/path= scope= all t/tag=
+
+complete -c spack -n '__fish_spack_using_command external find' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command external find' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command external find' -l not-buildable -f -a not_buildable
+complete -c spack -n '__fish_spack_using_command external find' -l not-buildable -d 'packages with detected externals won\'t be built with Spack'
+complete -c spack -n '__fish_spack_using_command external find' -l exclude -r -f -a exclude
+complete -c spack -n '__fish_spack_using_command external find' -l exclude -r -d 'packages to exclude from search'
+complete -c spack -n '__fish_spack_using_command external find' -s p -l path -r -f -a path
+complete -c spack -n '__fish_spack_using_command external find' -s p -l path -r -d 'one or more alternative search paths for finding externals'
+complete -c spack -n '__fish_spack_using_command external find' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command external find' -l scope -r -d 'configuration scope to modify'
+complete -c spack -n '__fish_spack_using_command external find' -l all -f -a all
+complete -c spack -n '__fish_spack_using_command external find' -l all -d 'search for all packages that Spack knows about'
+complete -c spack -n '__fish_spack_using_command external find' -s t -l tag -r -f -a tags
+complete -c spack -n '__fish_spack_using_command external find' -s t -l tag -r -d 'filter a package query by tag (multiple use allowed)'
+
+# spack external list
+set -g __fish_spack_optspecs_spack_external_list h/help
+complete -c spack -n '__fish_spack_using_command external list' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command external list' -s h -l help -d 'show this help message and exit'
+
+# spack external read-cray-manifest
+set -g __fish_spack_optspecs_spack_external_read_cray_manifest h/help file= directory= ignore-default-dir dry-run fail-on-error
+complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -l file -r -f -a file
+complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -l file -r -d 'specify a location other than the default'
+complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -l directory -r -f -a directory
+complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -l directory -r -d 'specify a directory storing a group of manifest files'
+complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -l ignore-default-dir -f -a ignore_default_dir
+complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -l ignore-default-dir -d 'ignore the default directory of manifest files'
+complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -l dry-run -f -a dry_run
+complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -l dry-run -d 'don\'t modify DB with files that are read'
+complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -l fail-on-error -f -a fail_on_error
+complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -l fail-on-error -d 'if a manifest file cannot be parsed, fail and report the full stack trace'
+
+# spack fetch
+set -g __fish_spack_optspecs_spack_fetch h/help n/no-checksum deprecated m/missing D/dependencies
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 fetch' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command fetch' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command fetch' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command fetch' -s n -l no-checksum -f -a no_checksum
+complete -c spack -n '__fish_spack_using_command fetch' -s n -l no-checksum -d 'do not use checksums to verify downloaded files (unsafe)'
+complete -c spack -n '__fish_spack_using_command fetch' -l deprecated -f -a deprecated
+complete -c spack -n '__fish_spack_using_command fetch' -l deprecated -d 'fetch deprecated versions without warning'
+complete -c spack -n '__fish_spack_using_command fetch' -s m -l missing -f -a missing
+complete -c spack -n '__fish_spack_using_command fetch' -s m -l missing -d 'fetch only missing (not yet installed) dependencies'
+complete -c spack -n '__fish_spack_using_command fetch' -s D -l dependencies -f -a dependencies
+complete -c spack -n '__fish_spack_using_command fetch' -s D -l dependencies -d 'also fetch all dependencies'
+
+# spack find
+set -g __fish_spack_optspecs_spack_find h/help format= H/hashes json d/deps p/paths groups no-groups l/long L/very-long t/tag= c/show-concretized f/show-flags show-full-compiler x/explicit X/implicit u/unknown m/missing v/variants loaded M/only-missing deprecated only-deprecated N/namespace start-date= end-date=
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 find' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command find' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command find' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command find' -l format -r -f -a format
+complete -c spack -n '__fish_spack_using_command find' -l format -r -d 'output specs with the specified format string'
+complete -c spack -n '__fish_spack_using_command find' -s H -l hashes -f -a format
+complete -c spack -n '__fish_spack_using_command find' -s H -l hashes -d 'same as \'--format {/hash}\'; use with xargs or $()'
+complete -c spack -n '__fish_spack_using_command find' -l json -f -a json
+complete -c spack -n '__fish_spack_using_command find' -l json -d 'output specs as machine-readable json records'
+complete -c spack -n '__fish_spack_using_command find' -s d -l deps -f -a deps
+complete -c spack -n '__fish_spack_using_command find' -s d -l deps -d 'output dependencies along with found specs'
+complete -c spack -n '__fish_spack_using_command find' -s p -l paths -f -a paths
+complete -c spack -n '__fish_spack_using_command find' -s p -l paths -d 'show paths to package install directories'
+complete -c spack -n '__fish_spack_using_command find' -l groups -f -a groups
+complete -c spack -n '__fish_spack_using_command find' -l groups -d 'display specs in arch/compiler groups (default on)'
+complete -c spack -n '__fish_spack_using_command find' -l no-groups -f -a groups
+complete -c spack -n '__fish_spack_using_command find' -l no-groups -d 'do not group specs by arch/compiler'
+complete -c spack -n '__fish_spack_using_command find' -s l -l long -f -a long
+complete -c spack -n '__fish_spack_using_command find' -s l -l long -d 'show dependency hashes as well as versions'
+complete -c spack -n '__fish_spack_using_command find' -s L -l very-long -f -a very_long
+complete -c spack -n '__fish_spack_using_command find' -s L -l very-long -d 'show full dependency hashes as well as versions'
+complete -c spack -n '__fish_spack_using_command find' -s t -l tag -r -f -a tags
+complete -c spack -n '__fish_spack_using_command find' -s t -l tag -r -d 'filter a package query by tag (multiple use allowed)'
+complete -c spack -n '__fish_spack_using_command find' -s c -l show-concretized -f -a show_concretized
+complete -c spack -n '__fish_spack_using_command find' -s c -l show-concretized -d 'show concretized specs in an environment'
+complete -c spack -n '__fish_spack_using_command find' -s f -l show-flags -f -a show_flags
+complete -c spack -n '__fish_spack_using_command find' -s f -l show-flags -d 'show spec compiler flags'
+complete -c spack -n '__fish_spack_using_command find' -l show-full-compiler -f -a show_full_compiler
+complete -c spack -n '__fish_spack_using_command find' -l show-full-compiler -d 'show full compiler specs'
+complete -c spack -n '__fish_spack_using_command find' -s x -l explicit -f -a explicit
+complete -c spack -n '__fish_spack_using_command find' -s x -l explicit -d 'show only specs that were installed explicitly'
+complete -c spack -n '__fish_spack_using_command find' -s X -l implicit -f -a implicit
+complete -c spack -n '__fish_spack_using_command find' -s X -l implicit -d 'show only specs that were installed as dependencies'
+complete -c spack -n '__fish_spack_using_command find' -s u -l unknown -f -a unknown
+complete -c spack -n '__fish_spack_using_command find' -s u -l unknown -d 'show only specs Spack does not have a package for'
+complete -c spack -n '__fish_spack_using_command find' -s m -l missing -f -a missing
+complete -c spack -n '__fish_spack_using_command find' -s m -l missing -d 'show missing dependencies as well as installed specs'
+complete -c spack -n '__fish_spack_using_command find' -s v -l variants -f -a variants
+complete -c spack -n '__fish_spack_using_command find' -s v -l variants -d 'show variants in output (can be long)'
+complete -c spack -n '__fish_spack_using_command find' -l loaded -f -a loaded
+complete -c spack -n '__fish_spack_using_command find' -l loaded -d 'show only packages loaded in the user environment'
+complete -c spack -n '__fish_spack_using_command find' -s M -l only-missing -f -a only_missing
+complete -c spack -n '__fish_spack_using_command find' -s M -l only-missing -d 'show only missing dependencies'
+complete -c spack -n '__fish_spack_using_command find' -l deprecated -f -a deprecated
+complete -c spack -n '__fish_spack_using_command find' -l deprecated -d 'show deprecated packages as well as installed specs'
+complete -c spack -n '__fish_spack_using_command find' -l only-deprecated -f -a only_deprecated
+complete -c spack -n '__fish_spack_using_command find' -l only-deprecated -d 'show only deprecated packages'
+complete -c spack -n '__fish_spack_using_command find' -s N -l namespace -f -a namespace
+complete -c spack -n '__fish_spack_using_command find' -s N -l namespace -d 'show fully qualified package names'
+complete -c spack -n '__fish_spack_using_command find' -l start-date -r -f -a start_date
+complete -c spack -n '__fish_spack_using_command find' -l start-date -r -d 'earliest date of installation [YYYY-MM-DD]'
+complete -c spack -n '__fish_spack_using_command find' -l end-date -r -f -a end_date
+complete -c spack -n '__fish_spack_using_command find' -l end-date -r -d 'latest date of installation [YYYY-MM-DD]'
+
+# spack gc
+set -g __fish_spack_optspecs_spack_gc h/help y/yes-to-all
+complete -c spack -n '__fish_spack_using_command gc' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command gc' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command gc' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command gc' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+
+# spack gpg
+set -g __fish_spack_optspecs_spack_gpg h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 gpg' -f -a verify -d 'verify a signed package'
+complete -c spack -n '__fish_spack_using_command_pos 0 gpg' -f -a trust -d 'add a key to the keyring'
+complete -c spack -n '__fish_spack_using_command_pos 0 gpg' -f -a untrust -d 'remove a key from the keyring'
+complete -c spack -n '__fish_spack_using_command_pos 0 gpg' -f -a sign -d 'sign a package'
+complete -c spack -n '__fish_spack_using_command_pos 0 gpg' -f -a create -d 'create a new key'
+complete -c spack -n '__fish_spack_using_command_pos 0 gpg' -f -a list -d 'list keys available in the keyring'
+complete -c spack -n '__fish_spack_using_command_pos 0 gpg' -f -a init -d 'add the default keys to the keyring'
+complete -c spack -n '__fish_spack_using_command_pos 0 gpg' -f -a export -d 'export a gpg key, optionally including secret key'
+complete -c spack -n '__fish_spack_using_command_pos 0 gpg' -f -a publish -d 'publish public keys to a build cache'
+complete -c spack -n '__fish_spack_using_command gpg' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command gpg' -s h -l help -d 'show this help message and exit'
+
+# spack gpg verify
+set -g __fish_spack_optspecs_spack_gpg_verify h/help
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 gpg verify' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command gpg verify' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command gpg verify' -s h -l help -d 'show this help message and exit'
+
+# spack gpg trust
+set -g __fish_spack_optspecs_spack_gpg_trust h/help
+
+complete -c spack -n '__fish_spack_using_command gpg trust' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command gpg trust' -s h -l help -d 'show this help message and exit'
+
+# spack gpg untrust
+set -g __fish_spack_optspecs_spack_gpg_untrust h/help signing
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 gpg untrust' -f -a '(__fish_spack_gpg_keys)'
+complete -c spack -n '__fish_spack_using_command gpg untrust' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command gpg untrust' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command gpg untrust' -l signing -f -a signing
+complete -c spack -n '__fish_spack_using_command gpg untrust' -l signing -d 'allow untrusting signing keys'
+
+# spack gpg sign
+set -g __fish_spack_optspecs_spack_gpg_sign h/help output= key= clearsign
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 gpg sign' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command gpg sign' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command gpg sign' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command gpg sign' -l output -r -f -a output
+complete -c spack -n '__fish_spack_using_command gpg sign' -l output -r -d 'the directory to place signatures'
+complete -c spack -n '__fish_spack_using_command gpg sign' -l key -r -f -a key
+complete -c spack -n '__fish_spack_using_command gpg sign' -l key -r -d 'the key to use for signing'
+complete -c spack -n '__fish_spack_using_command gpg sign' -l clearsign -f -a clearsign
+complete -c spack -n '__fish_spack_using_command gpg sign' -l clearsign -d 'if specified, create a clearsign signature'
+
+# spack gpg create
+set -g __fish_spack_optspecs_spack_gpg_create h/help comment= expires= export= export-secret=
+
+complete -c spack -n '__fish_spack_using_command gpg create' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command gpg create' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command gpg create' -l comment -r -f -a comment
+complete -c spack -n '__fish_spack_using_command gpg create' -l comment -r -d 'a description for the intended use of the key'
+complete -c spack -n '__fish_spack_using_command gpg create' -l expires -r -f -a expires
+complete -c spack -n '__fish_spack_using_command gpg create' -l expires -r -d 'when the key should expire'
+complete -c spack -n '__fish_spack_using_command gpg create' -l export -r -f -a export
+complete -c spack -n '__fish_spack_using_command gpg create' -l export -r -d 'export the public key to a file'
+complete -c spack -n '__fish_spack_using_command gpg create' -l export-secret -r -f -a secret
+complete -c spack -n '__fish_spack_using_command gpg create' -l export-secret -r -d 'export the private key to a file'
+
+# spack gpg list
+set -g __fish_spack_optspecs_spack_gpg_list h/help trusted signing
+complete -c spack -n '__fish_spack_using_command gpg list' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command gpg list' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command gpg list' -l trusted -f -a trusted
+complete -c spack -n '__fish_spack_using_command gpg list' -l trusted -d 'list trusted keys'
+complete -c spack -n '__fish_spack_using_command gpg list' -l signing -f -a signing
+complete -c spack -n '__fish_spack_using_command gpg list' -l signing -d 'list keys which may be used for signing'
+
+# spack gpg init
+set -g __fish_spack_optspecs_spack_gpg_init h/help from=
+complete -c spack -n '__fish_spack_using_command gpg init' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command gpg init' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command gpg init' -l from -r -f -a import_dir
+
+# spack gpg export
+set -g __fish_spack_optspecs_spack_gpg_export h/help secret
+complete -c spack -n '__fish_spack_using_command_pos_remainder 1 gpg export' -f -a '(__fish_spack_gpg_keys)'
+complete -c spack -n '__fish_spack_using_command gpg export' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command gpg export' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command gpg export' -l secret -f -a secret
+complete -c spack -n '__fish_spack_using_command gpg export' -l secret -d 'export secret keys'
+
+# spack gpg publish
+set -g __fish_spack_optspecs_spack_gpg_publish h/help d/directory= m/mirror-name= mirror-url= rebuild-index
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 gpg publish' -f -a '(__fish_spack_gpg_keys)'
+complete -c spack -n '__fish_spack_using_command gpg publish' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command gpg publish' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command gpg publish' -s d -l directory -r -f -a directory
+complete -c spack -n '__fish_spack_using_command gpg publish' -s d -l directory -r -d 'local directory where keys will be published'
+complete -c spack -n '__fish_spack_using_command gpg publish' -s m -l mirror-name -r -f -a mirror_name
+complete -c spack -n '__fish_spack_using_command gpg publish' -s m -l mirror-name -r -d 'name of the mirror where keys will be published'
+complete -c spack -n '__fish_spack_using_command gpg publish' -l mirror-url -r -f -a mirror_url
+complete -c spack -n '__fish_spack_using_command gpg publish' -l mirror-url -r -d 'URL of the mirror where keys will be published'
+complete -c spack -n '__fish_spack_using_command gpg publish' -l rebuild-index -f -a rebuild_index
+complete -c spack -n '__fish_spack_using_command gpg publish' -l rebuild-index -d 'regenerate buildcache key index after publishing key(s)'
+
+# spack graph
+set -g __fish_spack_optspecs_spack_graph h/help a/ascii d/dot s/static c/color i/installed deptype=
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 graph' -f -k -a '(__fish_spack_specs_or_id)'
+complete -c spack -n '__fish_spack_using_command graph' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command graph' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command graph' -s a -l ascii -f -a ascii
+complete -c spack -n '__fish_spack_using_command graph' -s a -l ascii -d 'draw graph as ascii to stdout (default)'
+complete -c spack -n '__fish_spack_using_command graph' -s d -l dot -f -a dot
+complete -c spack -n '__fish_spack_using_command graph' -s d -l dot -d 'generate graph in dot format and print to stdout'
+complete -c spack -n '__fish_spack_using_command graph' -s s -l static -f -a static
+complete -c spack -n '__fish_spack_using_command graph' -s s -l static -d 'graph static (possible) deps, don\'t concretize (implies --dot)'
+complete -c spack -n '__fish_spack_using_command graph' -s c -l color -f -a color
+complete -c spack -n '__fish_spack_using_command graph' -s c -l color -d 'use different colors for different dependency types'
+complete -c spack -n '__fish_spack_using_command graph' -s i -l installed -f -a installed
+complete -c spack -n '__fish_spack_using_command graph' -s i -l installed -d 'graph installed specs, or specs in the active env (implies --dot)'
+complete -c spack -n '__fish_spack_using_command graph' -l deptype -r -f -a deptype
+complete -c spack -n '__fish_spack_using_command graph' -l deptype -r -d 'comma-separated list of deptypes to traverse'
+
+# spack help
+set -g __fish_spack_optspecs_spack_help h/help a/all spec
+complete -c spack -n '__fish_spack_using_command_pos 0 help' -f -a '(__fish_spack_commands)'
+complete -c spack -n '__fish_spack_using_command help' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command help' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command help' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command help' -s a -l all -d 'list all available commands and options'
+complete -c spack -n '__fish_spack_using_command help' -l spec -f -a guide
+complete -c spack -n '__fish_spack_using_command help' -l spec -d 'help on the package specification syntax'
+
+# spack info
+set -g __fish_spack_optspecs_spack_info h/help a/all detectable maintainers no-dependencies no-variants no-versions phases tags tests virtuals
+complete -c spack -n '__fish_spack_using_command_pos 0 info' -f -a '(__fish_spack_packages)'
+complete -c spack -n '__fish_spack_using_command info' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command info' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command info' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command info' -s a -l all -d 'output all package information'
+complete -c spack -n '__fish_spack_using_command info' -l detectable -f -a detectable
+complete -c spack -n '__fish_spack_using_command info' -l detectable -d 'output information on external detection'
+complete -c spack -n '__fish_spack_using_command info' -l maintainers -f -a maintainers
+complete -c spack -n '__fish_spack_using_command info' -l maintainers -d 'output package maintainers'
+complete -c spack -n '__fish_spack_using_command info' -l no-dependencies -f -a no_dependencies
+complete -c spack -n '__fish_spack_using_command info' -l no-dependencies -d 'do not output build, link, and run package dependencies'
+complete -c spack -n '__fish_spack_using_command info' -l no-variants -f -a no_variants
+complete -c spack -n '__fish_spack_using_command info' -l no-variants -d 'do not output variants'
+complete -c spack -n '__fish_spack_using_command info' -l no-versions -f -a no_versions
+complete -c spack -n '__fish_spack_using_command info' -l no-versions -d 'do not output versions'
+complete -c spack -n '__fish_spack_using_command info' -l phases -f -a phases
+complete -c spack -n '__fish_spack_using_command info' -l phases -d 'output installation phases'
+complete -c spack -n '__fish_spack_using_command info' -l tags -f -a tags
+complete -c spack -n '__fish_spack_using_command info' -l tags -d 'output package tags'
+complete -c spack -n '__fish_spack_using_command info' -l tests -f -a tests
+complete -c spack -n '__fish_spack_using_command info' -l tests -d 'output relevant build-time and stand-alone tests'
+complete -c spack -n '__fish_spack_using_command info' -l virtuals -f -a virtuals
+complete -c spack -n '__fish_spack_using_command info' -l virtuals -d 'output virtual packages'
+
+# spack install
+set -g __fish_spack_optspecs_spack_install h/help only= u/until= j/jobs= overwrite fail-fast keep-prefix keep-stage dont-restage use-cache no-cache cache-only use-buildcache= include-build-deps no-check-signature show-log-on-error source n/no-checksum deprecated v/verbose fake only-concrete add no-add f/file= clean dirty test= log-format= log-file= help-cdash cdash-upload-url= cdash-build= cdash-site= cdash-track= cdash-buildstamp= y/yes-to-all U/fresh reuse reuse-deps
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 install' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command install' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command install' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command install' -l only -r -f -a 'package dependencies'
+complete -c spack -n '__fish_spack_using_command install' -l only -r -d 'select the mode of installation'
+complete -c spack -n '__fish_spack_using_command install' -s u -l until -r -f -a until
+complete -c spack -n '__fish_spack_using_command install' -s u -l until -r -d 'phase to stop after when installing (default None)'
+complete -c spack -n '__fish_spack_using_command install' -s j -l jobs -r -f -a jobs
+complete -c spack -n '__fish_spack_using_command install' -s j -l jobs -r -d 'explicitly set number of parallel jobs'
+complete -c spack -n '__fish_spack_using_command install' -l overwrite -f -a overwrite
+complete -c spack -n '__fish_spack_using_command install' -l overwrite -d 'reinstall an existing spec, even if it has dependents'
+complete -c spack -n '__fish_spack_using_command install' -l fail-fast -f -a fail_fast
+complete -c spack -n '__fish_spack_using_command install' -l fail-fast -d 'stop all builds if any build fails (default is best effort)'
+complete -c spack -n '__fish_spack_using_command install' -l keep-prefix -f -a keep_prefix
+complete -c spack -n '__fish_spack_using_command install' -l keep-prefix -d 'don\'t remove the install prefix if installation fails'
+complete -c spack -n '__fish_spack_using_command install' -l keep-stage -f -a keep_stage
+complete -c spack -n '__fish_spack_using_command install' -l keep-stage -d 'don\'t remove the build stage if installation succeeds'
+complete -c spack -n '__fish_spack_using_command install' -l dont-restage -f -a dont_restage
+complete -c spack -n '__fish_spack_using_command install' -l dont-restage -d 'if a partial install is detected, don\'t delete prior state'
+complete -c spack -n '__fish_spack_using_command install' -l use-cache -f -a use_cache
+complete -c spack -n '__fish_spack_using_command install' -l use-cache -d 'check for pre-built Spack packages in mirrors (default)'
+complete -c spack -n '__fish_spack_using_command install' -l no-cache -f -a use_cache
+complete -c spack -n '__fish_spack_using_command install' -l no-cache -d 'do not check for pre-built Spack packages in mirrors'
+complete -c spack -n '__fish_spack_using_command install' -l cache-only -f -a cache_only
+complete -c spack -n '__fish_spack_using_command install' -l cache-only -d 'only install package from binary mirrors'
+complete -c spack -n '__fish_spack_using_command install' -l use-buildcache -r -f -a use_buildcache
+complete -c spack -n '__fish_spack_using_command install' -l use-buildcache -r -d 'select the mode of buildcache for the \'package\' and \'dependencies\''
+complete -c spack -n '__fish_spack_using_command install' -l include-build-deps -f -a include_build_deps
+complete -c spack -n '__fish_spack_using_command install' -l include-build-deps -d 'include build deps when installing from cache, useful for CI pipeline troubleshooting'
+complete -c spack -n '__fish_spack_using_command install' -l no-check-signature -f -a unsigned
+complete -c spack -n '__fish_spack_using_command install' -l no-check-signature -d 'do not check signatures of binary packages'
+complete -c spack -n '__fish_spack_using_command install' -l show-log-on-error -f -a show_log_on_error
+complete -c spack -n '__fish_spack_using_command install' -l show-log-on-error -d 'print full build log to stderr if build fails'
+complete -c spack -n '__fish_spack_using_command install' -l source -f -a install_source
+complete -c spack -n '__fish_spack_using_command install' -l source -d 'install source files in prefix'
+complete -c spack -n '__fish_spack_using_command install' -s n -l no-checksum -f -a no_checksum
+complete -c spack -n '__fish_spack_using_command install' -s n -l no-checksum -d 'do not use checksums to verify downloaded files (unsafe)'
+complete -c spack -n '__fish_spack_using_command install' -l deprecated -f -a deprecated
+complete -c spack -n '__fish_spack_using_command install' -l deprecated -d 'fetch deprecated versions without warning'
+complete -c spack -n '__fish_spack_using_command install' -s v -l verbose -f -a install_verbose
+complete -c spack -n '__fish_spack_using_command install' -s v -l verbose -d 'display verbose build output while installing'
+complete -c spack -n '__fish_spack_using_command install' -l fake -f -a fake
+complete -c spack -n '__fish_spack_using_command install' -l fake -d 'fake install for debug purposes'
+complete -c spack -n '__fish_spack_using_command install' -l only-concrete -f -a only_concrete
+complete -c spack -n '__fish_spack_using_command install' -l only-concrete -d '(with environment) only install already concretized specs'
+complete -c spack -n '__fish_spack_using_command install' -l add -f -a add
+complete -c spack -n '__fish_spack_using_command install' -l add -d '(with environment) add spec to the environment as a root'
+complete -c spack -n '__fish_spack_using_command install' -l no-add -f -a add
+complete -c spack -n '__fish_spack_using_command install' -l no-add -d '(with environment) do not add spec to the environment as a root'
+complete -c spack -n '__fish_spack_using_command install' -s f -l file -r -f -a specfiles
+complete -c spack -n '__fish_spack_using_command install' -s f -l file -r -d 'read specs to install from .yaml files'
+complete -c spack -n '__fish_spack_using_command install' -l clean -f -a dirty
+complete -c spack -n '__fish_spack_using_command install' -l clean -d 'unset harmful variables in the build environment (default)'
+complete -c spack -n '__fish_spack_using_command install' -l dirty -f -a dirty
+complete -c spack -n '__fish_spack_using_command install' -l dirty -d 'preserve user environment in spack\'s build environment (danger!)'
+complete -c spack -n '__fish_spack_using_command install' -l test -r -f -a 'root all'
+complete -c spack -n '__fish_spack_using_command install' -l test -r -d 'run tests on only root packages or all packages'
+complete -c spack -n '__fish_spack_using_command install' -l log-format -r -f -a 'junit cdash'
+complete -c spack -n '__fish_spack_using_command install' -l log-format -r -d 'format to be used for log files'
+complete -c spack -n '__fish_spack_using_command install' -l log-file -r -f -a log_file
+complete -c spack -n '__fish_spack_using_command install' -l log-file -r -d 'filename for the log file'
+complete -c spack -n '__fish_spack_using_command install' -l help-cdash -f -a help_cdash
+complete -c spack -n '__fish_spack_using_command install' -l help-cdash -d 'show usage instructions for CDash reporting'
+complete -c spack -n '__fish_spack_using_command install' -l cdash-upload-url -r -f -a cdash_upload_url
+complete -c spack -n '__fish_spack_using_command install' -l cdash-build -r -f -a cdash_build
+complete -c spack -n '__fish_spack_using_command install' -l cdash-site -r -f -a cdash_site
+complete -c spack -n '__fish_spack_using_command install' -l cdash-track -r -f -a cdash_track
+complete -c spack -n '__fish_spack_using_command install' -l cdash-buildstamp -r -f -a cdash_buildstamp
+complete -c spack -n '__fish_spack_using_command install' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command install' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+complete -c spack -n '__fish_spack_using_command install' -s U -l fresh -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command install' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
+complete -c spack -n '__fish_spack_using_command install' -l reuse -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command install' -l reuse -d 'reuse installed packages/buildcaches when possible'
+complete -c spack -n '__fish_spack_using_command install' -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command install' -l reuse-deps -d 'reuse installed dependencies only'
+
+# spack license
+set -g __fish_spack_optspecs_spack_license h/help root=
+complete -c spack -n '__fish_spack_using_command_pos 0 license' -f -a list-files -d 'list files in spack that should have license headers'
+complete -c spack -n '__fish_spack_using_command_pos 0 license' -f -a verify -d 'verify that files in spack have the right license header'
+complete -c spack -n '__fish_spack_using_command_pos 0 license' -f -a update-copyright-year -d 'update copyright for the current year in all licensed files'
+complete -c spack -n '__fish_spack_using_command license' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command license' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command license' -l root -r -f -a root
+complete -c spack -n '__fish_spack_using_command license' -l root -r -d 'scan a different prefix for license issues'
+
+# spack license list-files
+set -g __fish_spack_optspecs_spack_license_list_files h/help
+complete -c spack -n '__fish_spack_using_command license list-files' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command license list-files' -s h -l help -d 'show this help message and exit'
+
+# spack license verify
+set -g __fish_spack_optspecs_spack_license_verify h/help
+complete -c spack -n '__fish_spack_using_command license verify' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command license verify' -s h -l help -d 'show this help message and exit'
+
+# spack license update-copyright-year
+set -g __fish_spack_optspecs_spack_license_update_copyright_year h/help
+complete -c spack -n '__fish_spack_using_command license update-copyright-year' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command license update-copyright-year' -s h -l help -d 'show this help message and exit'
+
+# spack list
+set -g __fish_spack_optspecs_spack_list h/help d/search-description format= v/virtuals t/tag= count update=
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 list' -f -a '(__fish_spack_packages)'
+complete -c spack -n '__fish_spack_using_command list' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command list' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command list' -s d -l search-description -f -a search_description
+complete -c spack -n '__fish_spack_using_command list' -s d -l search-description -d 'filtering will also search the description for a match'
+complete -c spack -n '__fish_spack_using_command list' -l format -r -f -a 'name_only version_json html'
+complete -c spack -n '__fish_spack_using_command list' -l format -r -d 'format to be used to print the output [default: name_only]'
+complete -c spack -n '__fish_spack_using_command list' -s v -l virtuals -f -a virtuals
+complete -c spack -n '__fish_spack_using_command list' -s v -l virtuals -d 'include virtual packages in list'
+complete -c spack -n '__fish_spack_using_command list' -s t -l tag -r -f -a tags
+complete -c spack -n '__fish_spack_using_command list' -s t -l tag -r -d 'filter a package query by tag (multiple use allowed)'
+complete -c spack -n '__fish_spack_using_command list' -l count -f -a count
+complete -c spack -n '__fish_spack_using_command list' -l count -d 'display the number of packages that would be listed'
+complete -c spack -n '__fish_spack_using_command list' -l update -r -f -a update
+complete -c spack -n '__fish_spack_using_command list' -l update -r -d 'write output to the specified file, if any package is newer'
+
+# spack load
+set -g __fish_spack_optspecs_spack_load h/help sh csh fish bat first only= list
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 load' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command load' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command load' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command load' -l sh -f -a shell
+complete -c spack -n '__fish_spack_using_command load' -l sh -d 'print sh commands to load the package'
+complete -c spack -n '__fish_spack_using_command load' -l csh -f -a shell
+complete -c spack -n '__fish_spack_using_command load' -l csh -d 'print csh commands to load the package'
+complete -c spack -n '__fish_spack_using_command load' -l fish -f -a shell
+complete -c spack -n '__fish_spack_using_command load' -l fish -d 'print fish commands to load the package'
+complete -c spack -n '__fish_spack_using_command load' -l bat -f -a shell
+complete -c spack -n '__fish_spack_using_command load' -l bat -d 'print bat commands to load the package'
+complete -c spack -n '__fish_spack_using_command load' -l first -f -a load_first
+complete -c spack -n '__fish_spack_using_command load' -l first -d 'load the first match if multiple packages match the spec'
+complete -c spack -n '__fish_spack_using_command load' -l only -r -f -a 'package dependencies'
+complete -c spack -n '__fish_spack_using_command load' -l only -r -d 'select whether to load the package and its dependencies'
+complete -c spack -n '__fish_spack_using_command load' -l list -f -a list
+complete -c spack -n '__fish_spack_using_command load' -l list -d 'show loaded packages: same as `spack find --loaded`'
+
+# spack location
+set -g __fish_spack_optspecs_spack_location h/help m/module-dir r/spack-root i/install-dir p/package-dir P/packages s/stage-dir S/stages source-dir b/build-dir e/env= first
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 location' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command location' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command location' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command location' -s m -l module-dir -f -a module_dir
+complete -c spack -n '__fish_spack_using_command location' -s m -l module-dir -d 'spack python module directory'
+complete -c spack -n '__fish_spack_using_command location' -s r -l spack-root -f -a spack_root
+complete -c spack -n '__fish_spack_using_command location' -s r -l spack-root -d 'spack installation root'
+complete -c spack -n '__fish_spack_using_command location' -s i -l install-dir -f -a install_dir
+complete -c spack -n '__fish_spack_using_command location' -s i -l install-dir -d 'install prefix for spec (spec need not be installed)'
+complete -c spack -n '__fish_spack_using_command location' -s p -l package-dir -f -a package_dir
+complete -c spack -n '__fish_spack_using_command location' -s p -l package-dir -d 'directory enclosing a spec\'s package.py file'
+complete -c spack -n '__fish_spack_using_command location' -s P -l packages -f -a packages
+complete -c spack -n '__fish_spack_using_command location' -s P -l packages -d 'top-level packages directory for Spack'
+complete -c spack -n '__fish_spack_using_command location' -s s -l stage-dir -f -a stage_dir
+complete -c spack -n '__fish_spack_using_command location' -s s -l stage-dir -d 'stage directory for a spec'
+complete -c spack -n '__fish_spack_using_command location' -s S -l stages -f -a stages
+complete -c spack -n '__fish_spack_using_command location' -s S -l stages -d 'top level stage directory'
+complete -c spack -n '__fish_spack_using_command location' -l source-dir -f -a source_dir
+complete -c spack -n '__fish_spack_using_command location' -l source-dir -d 'source directory for a spec (requires it to be staged first)'
+complete -c spack -n '__fish_spack_using_command location' -s b -l build-dir -f -a build_dir
+complete -c spack -n '__fish_spack_using_command location' -s b -l build-dir -d 'build directory for a spec (requires it to be staged first)'
+complete -c spack -n '__fish_spack_using_command location' -s e -l env -r -f -a location_env
+complete -c spack -n '__fish_spack_using_command location' -s e -l env -r -d 'location of the named or current environment'
+complete -c spack -n '__fish_spack_using_command location' -l first -f -a find_first
+complete -c spack -n '__fish_spack_using_command location' -l first -d 'use the first match if multiple packages match the spec'
+
+# spack log-parse
+set -g __fish_spack_optspecs_spack_log_parse h/help show= c/context= p/profile w/width= j/jobs=
+
+complete -c spack -n '__fish_spack_using_command log-parse' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command log-parse' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command log-parse' -l show -r -f -a show
+complete -c spack -n '__fish_spack_using_command log-parse' -l show -r -d 'comma-separated list of what to show; options: errors, warnings'
+complete -c spack -n '__fish_spack_using_command log-parse' -s c -l context -r -f -a context
+complete -c spack -n '__fish_spack_using_command log-parse' -s c -l context -r -d 'lines of context to show around lines of interest'
+complete -c spack -n '__fish_spack_using_command log-parse' -s p -l profile -f -a profile
+complete -c spack -n '__fish_spack_using_command log-parse' -s p -l profile -d 'print out a profile of time spent in regexes during parse'
+complete -c spack -n '__fish_spack_using_command log-parse' -s w -l width -r -f -a width
+complete -c spack -n '__fish_spack_using_command log-parse' -s w -l width -r -d 'wrap width: auto-size to terminal by default; 0 for no wrap'
+complete -c spack -n '__fish_spack_using_command log-parse' -s j -l jobs -r -f -a jobs
+complete -c spack -n '__fish_spack_using_command log-parse' -s j -l jobs -r -d 'number of jobs to parse log file (default: 1 for short logs, ncpus for long logs)'
+
+# spack maintainers
+set -g __fish_spack_optspecs_spack_maintainers h/help maintained unmaintained a/all by-user
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 maintainers' -f -a '(__fish_spack_packages)'
+complete -c spack -n '__fish_spack_using_command maintainers' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command maintainers' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command maintainers' -l maintained -f -a maintained
+complete -c spack -n '__fish_spack_using_command maintainers' -l maintained -d 'show names of maintained packages'
+complete -c spack -n '__fish_spack_using_command maintainers' -l unmaintained -f -a unmaintained
+complete -c spack -n '__fish_spack_using_command maintainers' -l unmaintained -d 'show names of unmaintained packages'
+complete -c spack -n '__fish_spack_using_command maintainers' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command maintainers' -s a -l all -d 'show maintainers for all packages'
+complete -c spack -n '__fish_spack_using_command maintainers' -l by-user -f -a by_user
+complete -c spack -n '__fish_spack_using_command maintainers' -l by-user -d 'show packages for users instead of users for packages'
+
+# spack make-installer
+set -g __fish_spack_optspecs_spack_make_installer h/help v/spack-version= s/spack-source= g/git-installer-verbosity=
+complete -c spack -n '__fish_spack_using_command_pos 0 make-installer' -f -a '(__fish_spack_environments)'
+complete -c spack -n '__fish_spack_using_command make-installer' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command make-installer' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command make-installer' -s v -l spack-version -r -f -a spack_version
+complete -c spack -n '__fish_spack_using_command make-installer' -s v -l spack-version -r -d 'download given spack version'
+complete -c spack -n '__fish_spack_using_command make-installer' -s s -l spack-source -r -f -a spack_source
+complete -c spack -n '__fish_spack_using_command make-installer' -s s -l spack-source -r -d 'full path to spack source'
+complete -c spack -n '__fish_spack_using_command make-installer' -s g -l git-installer-verbosity -r -f -a 'SILENT VERYSILENT'
+complete -c spack -n '__fish_spack_using_command make-installer' -s g -l git-installer-verbosity -r -d 'level of verbosity provided by bundled git installer (default is fully verbose)'
+
+# spack mark
+set -g __fish_spack_optspecs_spack_mark h/help a/all e/explicit i/implicit
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 mark' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command mark' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command mark' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command mark' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command mark' -s a -l all -d 'mark ALL installed packages that match each supplied spec'
+complete -c spack -n '__fish_spack_using_command mark' -s e -l explicit -f -a explicit
+complete -c spack -n '__fish_spack_using_command mark' -s e -l explicit -d 'mark packages as explicitly installed'
+complete -c spack -n '__fish_spack_using_command mark' -s i -l implicit -f -a implicit
+complete -c spack -n '__fish_spack_using_command mark' -s i -l implicit -d 'mark packages as implicitly installed'
+
+# spack mirror
+set -g __fish_spack_optspecs_spack_mirror h/help n/no-checksum deprecated
+complete -c spack -n '__fish_spack_using_command_pos 0 mirror' -f -a create -d 'create a directory to be used as a spack mirror, and fill it with package archives'
+complete -c spack -n '__fish_spack_using_command_pos 0 mirror' -f -a destroy -d 'given a url, recursively delete everything under it'
+complete -c spack -n '__fish_spack_using_command_pos 0 mirror' -f -a add -d 'add a mirror to Spack'
+complete -c spack -n '__fish_spack_using_command_pos 0 mirror' -f -a remove -d 'remove a mirror by name'
+complete -c spack -n '__fish_spack_using_command_pos 0 mirror' -f -a rm -d 'remove a mirror by name'
+complete -c spack -n '__fish_spack_using_command_pos 0 mirror' -f -a set-url -d 'change the URL of a mirror'
+complete -c spack -n '__fish_spack_using_command_pos 0 mirror' -f -a set -d 'configure the connection details of a mirror'
+complete -c spack -n '__fish_spack_using_command_pos 0 mirror' -f -a list -d 'print out available mirrors to the console'
+complete -c spack -n '__fish_spack_using_command mirror' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command mirror' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command mirror' -s n -l no-checksum -f -a no_checksum
+complete -c spack -n '__fish_spack_using_command mirror' -s n -l no-checksum -d 'do not use checksums to verify downloaded files (unsafe)'
+complete -c spack -n '__fish_spack_using_command mirror' -l deprecated -f -a deprecated
+complete -c spack -n '__fish_spack_using_command mirror' -l deprecated -d 'fetch deprecated versions without warning'
+
+# spack mirror create
+set -g __fish_spack_optspecs_spack_mirror_create h/help d/directory= a/all f/file= exclude-file= exclude-specs= skip-unstable-versions D/dependencies n/versions-per-spec=
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 mirror create' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command mirror create' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command mirror create' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command mirror create' -s d -l directory -r -f -a directory
+complete -c spack -n '__fish_spack_using_command mirror create' -s d -l directory -r -d 'directory in which to create mirror'
+complete -c spack -n '__fish_spack_using_command mirror create' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command mirror create' -s a -l all -d 'mirror all versions of all packages in Spack, or all packages in the current environment if there is an active environment (this requires significant time and space)'
+complete -c spack -n '__fish_spack_using_command mirror create' -s f -l file -r -f -a file
+complete -c spack -n '__fish_spack_using_command mirror create' -s f -l file -r -d 'file with specs of packages to put in mirror'
+complete -c spack -n '__fish_spack_using_command mirror create' -l exclude-file -r -f -a exclude_file
+complete -c spack -n '__fish_spack_using_command mirror create' -l exclude-file -r -d 'specs which Spack should not try to add to a mirror (listed in a file, one per line)'
+complete -c spack -n '__fish_spack_using_command mirror create' -l exclude-specs -r -f -a exclude_specs
+complete -c spack -n '__fish_spack_using_command mirror create' -l exclude-specs -r -d 'specs which Spack should not try to add to a mirror (specified on command line)'
+complete -c spack -n '__fish_spack_using_command mirror create' -l skip-unstable-versions -f -a skip_unstable_versions
+complete -c spack -n '__fish_spack_using_command mirror create' -l skip-unstable-versions -d 'don\'t cache versions unless they identify a stable (unchanging) source code'
+complete -c spack -n '__fish_spack_using_command mirror create' -s D -l dependencies -f -a dependencies
+complete -c spack -n '__fish_spack_using_command mirror create' -s D -l dependencies -d 'also fetch all dependencies'
+complete -c spack -n '__fish_spack_using_command mirror create' -s n -l versions-per-spec -r -f -a versions_per_spec
+complete -c spack -n '__fish_spack_using_command mirror create' -s n -l versions-per-spec -r -d 'the number of versions to fetch for each spec, choose \'all\' to retrieve all versions of each package'
+
+# spack mirror destroy
+set -g __fish_spack_optspecs_spack_mirror_destroy h/help m/mirror-name= mirror-url=
+complete -c spack -n '__fish_spack_using_command mirror destroy' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command mirror destroy' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command mirror destroy' -s m -l mirror-name -r -f -a mirror_name
+complete -c spack -n '__fish_spack_using_command mirror destroy' -s m -l mirror-name -r -d 'find mirror to destroy by name'
+complete -c spack -n '__fish_spack_using_command mirror destroy' -l mirror-url -r -f -a mirror_url
+complete -c spack -n '__fish_spack_using_command mirror destroy' -l mirror-url -r -d 'find mirror to destroy by url'
+
+# spack mirror add
+set -g __fish_spack_optspecs_spack_mirror_add h/help scope= type= s3-access-key-id= s3-access-key-secret= s3-access-token= s3-profile= s3-endpoint-url=
+complete -c spack -n '__fish_spack_using_command_pos 0 mirror add' -f
+complete -c spack -n '__fish_spack_using_command mirror add' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command mirror add' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command mirror add' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command mirror add' -l scope -r -d 'configuration scope to modify'
+complete -c spack -n '__fish_spack_using_command mirror add' -l type -r -f -a 'binary source'
+complete -c spack -n '__fish_spack_using_command mirror add' -l type -r -d 'specify the mirror type: for both binary and source use `--type binary --type source` (default)'
+complete -c spack -n '__fish_spack_using_command mirror add' -l s3-access-key-id -r -f -a s3_access_key_id
+complete -c spack -n '__fish_spack_using_command mirror add' -l s3-access-key-id -r -d 'ID string to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror add' -l s3-access-key-secret -r -f -a s3_access_key_secret
+complete -c spack -n '__fish_spack_using_command mirror add' -l s3-access-key-secret -r -d 'secret string to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror add' -l s3-access-token -r -f -a s3_access_token
+complete -c spack -n '__fish_spack_using_command mirror add' -l s3-access-token -r -d 'access token to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror add' -l s3-profile -r -f -a s3_profile
+complete -c spack -n '__fish_spack_using_command mirror add' -l s3-profile -r -d 'S3 profile name to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror add' -l s3-endpoint-url -r -f -a s3_endpoint_url
+complete -c spack -n '__fish_spack_using_command mirror add' -l s3-endpoint-url -r -d 'endpoint URL to use to connect to this S3 mirror'
+
+# spack mirror remove
+set -g __fish_spack_optspecs_spack_mirror_remove h/help scope=
+complete -c spack -n '__fish_spack_using_command_pos 0 mirror remove' -f -a '(__fish_spack_mirrors)'
+complete -c spack -n '__fish_spack_using_command mirror remove' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command mirror remove' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command mirror remove' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command mirror remove' -l scope -r -d 'configuration scope to modify'
+
+# spack mirror rm
+set -g __fish_spack_optspecs_spack_mirror_rm h/help scope=
+complete -c spack -n '__fish_spack_using_command_pos 0 mirror rm' -f -a '(__fish_spack_mirrors)'
+complete -c spack -n '__fish_spack_using_command mirror rm' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command mirror rm' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command mirror rm' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command mirror rm' -l scope -r -d 'configuration scope to modify'
+
+# spack mirror set-url
+set -g __fish_spack_optspecs_spack_mirror_set_url h/help push fetch scope= s3-access-key-id= s3-access-key-secret= s3-access-token= s3-profile= s3-endpoint-url=
+complete -c spack -n '__fish_spack_using_command_pos 0 mirror set-url' -f -a '(__fish_spack_mirrors)'
+complete -c spack -n '__fish_spack_using_command mirror set-url' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command mirror set-url' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l push -f -a push
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l push -d 'set only the URL used for uploading'
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l fetch -f -a fetch
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l fetch -d 'set only the URL used for downloading'
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l scope -r -d 'configuration scope to modify'
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-access-key-id -r -f -a s3_access_key_id
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-access-key-id -r -d 'ID string to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-access-key-secret -r -f -a s3_access_key_secret
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-access-key-secret -r -d 'secret string to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-access-token -r -f -a s3_access_token
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-access-token -r -d 'access token to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-profile -r -f -a s3_profile
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-profile -r -d 'S3 profile name to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-endpoint-url -r -f -a s3_endpoint_url
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-endpoint-url -r -d 'endpoint URL to use to connect to this S3 mirror'
+
+# spack mirror set
+set -g __fish_spack_optspecs_spack_mirror_set h/help push fetch type= url= scope= s3-access-key-id= s3-access-key-secret= s3-access-token= s3-profile= s3-endpoint-url=
+complete -c spack -n '__fish_spack_using_command_pos 0 mirror set' -f -a '(__fish_spack_mirrors)'
+complete -c spack -n '__fish_spack_using_command mirror set' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command mirror set' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command mirror set' -l push -f -a push
+complete -c spack -n '__fish_spack_using_command mirror set' -l push -d 'modify just the push connection details'
+complete -c spack -n '__fish_spack_using_command mirror set' -l fetch -f -a fetch
+complete -c spack -n '__fish_spack_using_command mirror set' -l fetch -d 'modify just the fetch connection details'
+complete -c spack -n '__fish_spack_using_command mirror set' -l type -r -f -a 'binary source'
+complete -c spack -n '__fish_spack_using_command mirror set' -l type -r -d 'specify the mirror type: for both binary and source use `--type binary --type source`'
+complete -c spack -n '__fish_spack_using_command mirror set' -l url -r -f -a url
+complete -c spack -n '__fish_spack_using_command mirror set' -l url -r -d 'url of mirror directory from \'spack mirror create\''
+complete -c spack -n '__fish_spack_using_command mirror set' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command mirror set' -l scope -r -d 'configuration scope to modify'
+complete -c spack -n '__fish_spack_using_command mirror set' -l s3-access-key-id -r -f -a s3_access_key_id
+complete -c spack -n '__fish_spack_using_command mirror set' -l s3-access-key-id -r -d 'ID string to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror set' -l s3-access-key-secret -r -f -a s3_access_key_secret
+complete -c spack -n '__fish_spack_using_command mirror set' -l s3-access-key-secret -r -d 'secret string to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror set' -l s3-access-token -r -f -a s3_access_token
+complete -c spack -n '__fish_spack_using_command mirror set' -l s3-access-token -r -d 'access token to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror set' -l s3-profile -r -f -a s3_profile
+complete -c spack -n '__fish_spack_using_command mirror set' -l s3-profile -r -d 'S3 profile name to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror set' -l s3-endpoint-url -r -f -a s3_endpoint_url
+complete -c spack -n '__fish_spack_using_command mirror set' -l s3-endpoint-url -r -d 'endpoint URL to use to connect to this S3 mirror'
+
+# spack mirror list
+set -g __fish_spack_optspecs_spack_mirror_list h/help scope=
+complete -c spack -n '__fish_spack_using_command mirror list' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command mirror list' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command mirror list' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command mirror list' -l scope -r -d 'configuration scope to read from'
+
+# spack module
+set -g __fish_spack_optspecs_spack_module h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 module' -f -a lmod -d 'manipulate hierarchical module files'
+complete -c spack -n '__fish_spack_using_command_pos 0 module' -f -a tcl -d 'manipulate non-hierarchical module files'
+complete -c spack -n '__fish_spack_using_command module' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command module' -s h -l help -d 'show this help message and exit'
+
+# spack module lmod
+set -g __fish_spack_optspecs_spack_module_lmod h/help n/name=
+complete -c spack -n '__fish_spack_using_command_pos 0 module lmod' -f -a refresh -d 'regenerate module files'
+complete -c spack -n '__fish_spack_using_command_pos 0 module lmod' -f -a find -d 'find module files for packages'
+complete -c spack -n '__fish_spack_using_command_pos 0 module lmod' -f -a rm -d 'remove module files'
+complete -c spack -n '__fish_spack_using_command_pos 0 module lmod' -f -a loads -d 'prompt the list of modules associated with a constraint'
+complete -c spack -n '__fish_spack_using_command_pos 0 module lmod' -f -a setdefault -d 'set the default module file for a package'
+complete -c spack -n '__fish_spack_using_command module lmod' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command module lmod' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command module lmod' -s n -l name -r -f -a module_set_name
+complete -c spack -n '__fish_spack_using_command module lmod' -s n -l name -r -d 'named module set to use from modules configuration'
+
+# spack module lmod refresh
+set -g __fish_spack_optspecs_spack_module_lmod_refresh h/help delete-tree upstream-modules y/yes-to-all
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 module lmod refresh' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command module lmod refresh' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command module lmod refresh' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command module lmod refresh' -l delete-tree -f -a delete_tree
+complete -c spack -n '__fish_spack_using_command module lmod refresh' -l delete-tree -d 'delete the module file tree before refresh'
+complete -c spack -n '__fish_spack_using_command module lmod refresh' -l upstream-modules -f -a upstream_modules
+complete -c spack -n '__fish_spack_using_command module lmod refresh' -l upstream-modules -d 'generate modules for packages installed upstream'
+complete -c spack -n '__fish_spack_using_command module lmod refresh' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command module lmod refresh' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+
+# spack module lmod find
+set -g __fish_spack_optspecs_spack_module_lmod_find h/help full-path r/dependencies
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 module lmod find' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command module lmod find' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command module lmod find' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command module lmod find' -l full-path -f -a full_path
+complete -c spack -n '__fish_spack_using_command module lmod find' -l full-path -d 'display full path to module file'
+complete -c spack -n '__fish_spack_using_command module lmod find' -s r -l dependencies -f -a recurse_dependencies
+complete -c spack -n '__fish_spack_using_command module lmod find' -s r -l dependencies -d 'recursively traverse spec dependencies'
+
+# spack module lmod rm
+set -g __fish_spack_optspecs_spack_module_lmod_rm h/help y/yes-to-all
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 module lmod rm' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command module lmod rm' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command module lmod rm' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command module lmod rm' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command module lmod rm' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+
+# spack module lmod loads
+set -g __fish_spack_optspecs_spack_module_lmod_loads h/help input-only p/prefix= x/exclude= r/dependencies
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 module lmod loads' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command module lmod loads' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command module lmod loads' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command module lmod loads' -l input-only -f -a shell
+complete -c spack -n '__fish_spack_using_command module lmod loads' -l input-only -d 'generate input for module command (instead of a shell script)'
+complete -c spack -n '__fish_spack_using_command module lmod loads' -s p -l prefix -r -f -a prefix
+complete -c spack -n '__fish_spack_using_command module lmod loads' -s p -l prefix -r -d 'prepend to module names when issuing module load commands'
+complete -c spack -n '__fish_spack_using_command module lmod loads' -s x -l exclude -r -f -a exclude
+complete -c spack -n '__fish_spack_using_command module lmod loads' -s x -l exclude -r -d 'exclude package from output; may be specified multiple times'
+complete -c spack -n '__fish_spack_using_command module lmod loads' -s r -l dependencies -f -a recurse_dependencies
+complete -c spack -n '__fish_spack_using_command module lmod loads' -s r -l dependencies -d 'recursively traverse spec dependencies'
+
+# spack module lmod setdefault
+set -g __fish_spack_optspecs_spack_module_lmod_setdefault h/help
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 module lmod setdefault' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command module lmod setdefault' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command module lmod setdefault' -s h -l help -d 'show this help message and exit'
+
+# spack module tcl
+set -g __fish_spack_optspecs_spack_module_tcl h/help n/name=
+complete -c spack -n '__fish_spack_using_command_pos 0 module tcl' -f -a refresh -d 'regenerate module files'
+complete -c spack -n '__fish_spack_using_command_pos 0 module tcl' -f -a find -d 'find module files for packages'
+complete -c spack -n '__fish_spack_using_command_pos 0 module tcl' -f -a rm -d 'remove module files'
+complete -c spack -n '__fish_spack_using_command_pos 0 module tcl' -f -a loads -d 'prompt the list of modules associated with a constraint'
+complete -c spack -n '__fish_spack_using_command_pos 0 module tcl' -f -a setdefault -d 'set the default module file for a package'
+complete -c spack -n '__fish_spack_using_command module tcl' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command module tcl' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command module tcl' -s n -l name -r -f -a module_set_name
+complete -c spack -n '__fish_spack_using_command module tcl' -s n -l name -r -d 'named module set to use from modules configuration'
+
+# spack module tcl refresh
+set -g __fish_spack_optspecs_spack_module_tcl_refresh h/help delete-tree upstream-modules y/yes-to-all
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 module tcl refresh' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command module tcl refresh' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command module tcl refresh' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command module tcl refresh' -l delete-tree -f -a delete_tree
+complete -c spack -n '__fish_spack_using_command module tcl refresh' -l delete-tree -d 'delete the module file tree before refresh'
+complete -c spack -n '__fish_spack_using_command module tcl refresh' -l upstream-modules -f -a upstream_modules
+complete -c spack -n '__fish_spack_using_command module tcl refresh' -l upstream-modules -d 'generate modules for packages installed upstream'
+complete -c spack -n '__fish_spack_using_command module tcl refresh' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command module tcl refresh' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+
+# spack module tcl find
+set -g __fish_spack_optspecs_spack_module_tcl_find h/help full-path r/dependencies
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 module tcl find' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command module tcl find' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command module tcl find' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command module tcl find' -l full-path -f -a full_path
+complete -c spack -n '__fish_spack_using_command module tcl find' -l full-path -d 'display full path to module file'
+complete -c spack -n '__fish_spack_using_command module tcl find' -s r -l dependencies -f -a recurse_dependencies
+complete -c spack -n '__fish_spack_using_command module tcl find' -s r -l dependencies -d 'recursively traverse spec dependencies'
+
+# spack module tcl rm
+set -g __fish_spack_optspecs_spack_module_tcl_rm h/help y/yes-to-all
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 module tcl rm' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command module tcl rm' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command module tcl rm' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command module tcl rm' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command module tcl rm' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+
+# spack module tcl loads
+set -g __fish_spack_optspecs_spack_module_tcl_loads h/help input-only p/prefix= x/exclude= r/dependencies
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 module tcl loads' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command module tcl loads' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command module tcl loads' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command module tcl loads' -l input-only -f -a shell
+complete -c spack -n '__fish_spack_using_command module tcl loads' -l input-only -d 'generate input for module command (instead of a shell script)'
+complete -c spack -n '__fish_spack_using_command module tcl loads' -s p -l prefix -r -f -a prefix
+complete -c spack -n '__fish_spack_using_command module tcl loads' -s p -l prefix -r -d 'prepend to module names when issuing module load commands'
+complete -c spack -n '__fish_spack_using_command module tcl loads' -s x -l exclude -r -f -a exclude
+complete -c spack -n '__fish_spack_using_command module tcl loads' -s x -l exclude -r -d 'exclude package from output; may be specified multiple times'
+complete -c spack -n '__fish_spack_using_command module tcl loads' -s r -l dependencies -f -a recurse_dependencies
+complete -c spack -n '__fish_spack_using_command module tcl loads' -s r -l dependencies -d 'recursively traverse spec dependencies'
+
+# spack module tcl setdefault
+set -g __fish_spack_optspecs_spack_module_tcl_setdefault h/help
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 module tcl setdefault' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command module tcl setdefault' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command module tcl setdefault' -s h -l help -d 'show this help message and exit'
+
+# spack patch
+set -g __fish_spack_optspecs_spack_patch h/help n/no-checksum deprecated U/fresh reuse reuse-deps
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 patch' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command patch' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command patch' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command patch' -s n -l no-checksum -f -a no_checksum
+complete -c spack -n '__fish_spack_using_command patch' -s n -l no-checksum -d 'do not use checksums to verify downloaded files (unsafe)'
+complete -c spack -n '__fish_spack_using_command patch' -l deprecated -f -a deprecated
+complete -c spack -n '__fish_spack_using_command patch' -l deprecated -d 'fetch deprecated versions without warning'
+complete -c spack -n '__fish_spack_using_command patch' -s U -l fresh -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command patch' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
+complete -c spack -n '__fish_spack_using_command patch' -l reuse -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command patch' -l reuse -d 'reuse installed packages/buildcaches when possible'
+complete -c spack -n '__fish_spack_using_command patch' -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command patch' -l reuse-deps -d 'reuse installed dependencies only'
+
+# spack pkg
+set -g __fish_spack_optspecs_spack_pkg h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 pkg' -f -a add -d 'add a package to the git stage with `git add`'
+complete -c spack -n '__fish_spack_using_command_pos 0 pkg' -f -a list -d 'list packages associated with a particular spack git revision'
+complete -c spack -n '__fish_spack_using_command_pos 0 pkg' -f -a diff -d 'compare packages available in two different git revisions'
+complete -c spack -n '__fish_spack_using_command_pos 0 pkg' -f -a added -d 'show packages added since a commit'
+complete -c spack -n '__fish_spack_using_command_pos 0 pkg' -f -a changed -d 'show packages changed since a commit'
+complete -c spack -n '__fish_spack_using_command_pos 0 pkg' -f -a removed -d 'show packages removed since a commit'
+complete -c spack -n '__fish_spack_using_command_pos 0 pkg' -f -a grep -d 'grep for strings in package.py files from all repositories'
+complete -c spack -n '__fish_spack_using_command_pos 0 pkg' -f -a source -d 'dump source code for a package'
+complete -c spack -n '__fish_spack_using_command_pos 0 pkg' -f -a hash -d 'dump canonical source code hash for a package spec'
+complete -c spack -n '__fish_spack_using_command pkg' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command pkg' -s h -l help -d 'show this help message and exit'
+
+# spack pkg add
+set -g __fish_spack_optspecs_spack_pkg_add h/help
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 pkg add' -f -a '(__fish_spack_pkg_packages)'
+complete -c spack -n '__fish_spack_using_command pkg add' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command pkg add' -s h -l help -d 'show this help message and exit'
+
+# spack pkg list
+set -g __fish_spack_optspecs_spack_pkg_list h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 pkg list' -f -a '(__fish_spack_git_rev)'
+complete -c spack -n '__fish_spack_using_command pkg list' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command pkg list' -s h -l help -d 'show this help message and exit'
+
+# spack pkg diff
+set -g __fish_spack_optspecs_spack_pkg_diff h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 pkg diff' -f -a '(__fish_spack_git_rev)'
+complete -c spack -n '__fish_spack_using_command_pos 1 pkg diff' -f -a '(__fish_spack_git_rev)'
+complete -c spack -n '__fish_spack_using_command pkg diff' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command pkg diff' -s h -l help -d 'show this help message and exit'
+
+# spack pkg added
+set -g __fish_spack_optspecs_spack_pkg_added h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 pkg added' -f -a '(__fish_spack_git_rev)'
+complete -c spack -n '__fish_spack_using_command_pos 1 pkg added' -f -a '(__fish_spack_git_rev)'
+complete -c spack -n '__fish_spack_using_command pkg added' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command pkg added' -s h -l help -d 'show this help message and exit'
+
+# spack pkg changed
+set -g __fish_spack_optspecs_spack_pkg_changed h/help t/type=
+complete -c spack -n '__fish_spack_using_command_pos 0 pkg changed' -f -a '(__fish_spack_git_rev)'
+complete -c spack -n '__fish_spack_using_command_pos 1 pkg changed' -f -a '(__fish_spack_git_rev)'
+complete -c spack -n '__fish_spack_using_command pkg changed' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command pkg changed' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command pkg changed' -s t -l type -r -f -a type
+complete -c spack -n '__fish_spack_using_command pkg changed' -s t -l type -r -d 'types of changes to show (A: added, R: removed, C: changed); default is \'C\''
+
+# spack pkg removed
+set -g __fish_spack_optspecs_spack_pkg_removed h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 pkg removed' -f -a '(__fish_spack_git_rev)'
+complete -c spack -n '__fish_spack_using_command_pos 1 pkg removed' -f -a '(__fish_spack_git_rev)'
+complete -c spack -n '__fish_spack_using_command pkg removed' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command pkg removed' -s h -l help -d 'show this help message and exit'
+
+# spack pkg grep
+set -g __fish_spack_optspecs_spack_pkg_grep help
+
+complete -c spack -n '__fish_spack_using_command pkg grep' -l help -f -a help
+complete -c spack -n '__fish_spack_using_command pkg grep' -l help -d 'show this help message and exit'
+
+# spack pkg source
+set -g __fish_spack_optspecs_spack_pkg_source h/help c/canonical
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 pkg source' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command pkg source' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command pkg source' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command pkg source' -s c -l canonical -f -a canonical
+complete -c spack -n '__fish_spack_using_command pkg source' -s c -l canonical -d 'dump canonical source as used by package hash'
+
+# spack pkg hash
+set -g __fish_spack_optspecs_spack_pkg_hash h/help
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 pkg hash' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command pkg hash' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command pkg hash' -s h -l help -d 'show this help message and exit'
+
+# spack providers
+set -g __fish_spack_optspecs_spack_providers h/help
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 providers' -f -a '(__fish_spack_providers)'
+complete -c spack -n '__fish_spack_using_command providers' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command providers' -s h -l help -d 'show this help message and exit'
+
+# spack pydoc
+set -g __fish_spack_optspecs_spack_pydoc h/help
+
+complete -c spack -n '__fish_spack_using_command pydoc' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command pydoc' -s h -l help -d 'show this help message and exit'
+
+# spack python
+set -g __fish_spack_optspecs_spack_python h/help V/version c/= u/ i/= m/= path
+
+complete -c spack -n '__fish_spack_using_command python' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command python' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command python' -s V -l version -f -a python_version
+complete -c spack -n '__fish_spack_using_command python' -s V -l version -d 'print the Python version number and exit'
+complete -c spack -n '__fish_spack_using_command python' -s c -r -f -a python_command
+complete -c spack -n '__fish_spack_using_command python' -s c -r -d 'command to execute'
+complete -c spack -n '__fish_spack_using_command python' -s u -f -a unbuffered
+complete -c spack -n '__fish_spack_using_command python' -s u -d 'for compatibility with xdist, do not use without adding -u to the interpreter'
+complete -c spack -n '__fish_spack_using_command python' -s i -r -f -a 'python ipython'
+complete -c spack -n '__fish_spack_using_command python' -s i -r -d 'python interpreter'
+complete -c spack -n '__fish_spack_using_command python' -s m -r -f -a module
+complete -c spack -n '__fish_spack_using_command python' -s m -r -d 'run library module as a script'
+complete -c spack -n '__fish_spack_using_command python' -l path -f -a show_path
+complete -c spack -n '__fish_spack_using_command python' -l path -d 'show path to python interpreter that spack uses'
+
+# spack reindex
+set -g __fish_spack_optspecs_spack_reindex h/help
+complete -c spack -n '__fish_spack_using_command reindex' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command reindex' -s h -l help -d 'show this help message and exit'
+
+# spack remove
+set -g __fish_spack_optspecs_spack_remove h/help a/all l/list-name= f/force
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 remove' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command remove' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command remove' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command remove' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command remove' -s a -l all -d 'remove all specs from (clear) the environment'
+complete -c spack -n '__fish_spack_using_command remove' -s l -l list-name -r -f -a list_name
+complete -c spack -n '__fish_spack_using_command remove' -s l -l list-name -r -d 'name of the list to remove specs from'
+complete -c spack -n '__fish_spack_using_command remove' -s f -l force -f -a force
+complete -c spack -n '__fish_spack_using_command remove' -s f -l force -d 'remove concretized spec (if any) immediately'
+
+# spack rm
+set -g __fish_spack_optspecs_spack_rm h/help a/all l/list-name= f/force
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 rm' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command rm' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command rm' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command rm' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command rm' -s a -l all -d 'remove all specs from (clear) the environment'
+complete -c spack -n '__fish_spack_using_command rm' -s l -l list-name -r -f -a list_name
+complete -c spack -n '__fish_spack_using_command rm' -s l -l list-name -r -d 'name of the list to remove specs from'
+complete -c spack -n '__fish_spack_using_command rm' -s f -l force -f -a force
+complete -c spack -n '__fish_spack_using_command rm' -s f -l force -d 'remove concretized spec (if any) immediately'
+
+# spack repo
+set -g __fish_spack_optspecs_spack_repo h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 repo' -f -a create -d 'create a new package repository'
+complete -c spack -n '__fish_spack_using_command_pos 0 repo' -f -a list -d 'show registered repositories and their namespaces'
+complete -c spack -n '__fish_spack_using_command_pos 0 repo' -f -a add -d 'add a package source to Spack\'s configuration'
+complete -c spack -n '__fish_spack_using_command_pos 0 repo' -f -a remove -d 'remove a repository from Spack\'s configuration'
+complete -c spack -n '__fish_spack_using_command_pos 0 repo' -f -a rm -d 'remove a repository from Spack\'s configuration'
+complete -c spack -n '__fish_spack_using_command repo' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command repo' -s h -l help -d 'show this help message and exit'
+
+# spack repo create
+set -g __fish_spack_optspecs_spack_repo_create h/help d/subdirectory=
+complete -c spack -n '__fish_spack_using_command_pos 0 repo create' -f -a '(__fish_spack_environments)'
+complete -c spack -n '__fish_spack_using_command repo create' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command repo create' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command repo create' -s d -l subdirectory -r -f -a subdir
+complete -c spack -n '__fish_spack_using_command repo create' -s d -l subdirectory -r -d 'subdirectory to store packages in the repository'
+
+# spack repo list
+set -g __fish_spack_optspecs_spack_repo_list h/help scope=
+complete -c spack -n '__fish_spack_using_command repo list' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command repo list' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command repo list' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command repo list' -l scope -r -d 'configuration scope to read from'
+
+# spack repo add
+set -g __fish_spack_optspecs_spack_repo_add h/help scope=
+complete -c spack -n '__fish_spack_using_command_pos 0 repo add' -f -a '(__fish_complete_directories)'
+complete -c spack -n '__fish_spack_using_command repo add' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command repo add' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command repo add' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command repo add' -l scope -r -d 'configuration scope to modify'
+
+# spack repo remove
+set -g __fish_spack_optspecs_spack_repo_remove h/help scope=
+complete -c spack -n '__fish_spack_using_command_pos 0 repo remove' $__fish_spack_force_files -a '(__fish_spack_repos)'
+complete -c spack -n '__fish_spack_using_command repo remove' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command repo remove' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command repo remove' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command repo remove' -l scope -r -d 'configuration scope to modify'
+
+# spack repo rm
+set -g __fish_spack_optspecs_spack_repo_rm h/help scope=
+complete -c spack -n '__fish_spack_using_command_pos 0 repo rm' $__fish_spack_force_files -a '(__fish_spack_repos)'
+complete -c spack -n '__fish_spack_using_command repo rm' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command repo rm' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command repo rm' -l scope -r -f -a '_builtin defaults system site user command_line'
+complete -c spack -n '__fish_spack_using_command repo rm' -l scope -r -d 'configuration scope to modify'
+
+# spack resource
+set -g __fish_spack_optspecs_spack_resource h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 resource' -f -a list -d 'list all resources known to spack (currently just patches)'
+complete -c spack -n '__fish_spack_using_command_pos 0 resource' -f -a show -d 'show a resource, identified by its checksum'
+complete -c spack -n '__fish_spack_using_command resource' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command resource' -s h -l help -d 'show this help message and exit'
+
+# spack resource list
+set -g __fish_spack_optspecs_spack_resource_list h/help only-hashes
+complete -c spack -n '__fish_spack_using_command resource list' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command resource list' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command resource list' -l only-hashes -f -a only_hashes
+complete -c spack -n '__fish_spack_using_command resource list' -l only-hashes -d 'only print sha256 hashes of resources'
+
+# spack resource show
+set -g __fish_spack_optspecs_spack_resource_show h/help
+
+complete -c spack -n '__fish_spack_using_command resource show' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command resource show' -s h -l help -d 'show this help message and exit'
+
+# spack restage
+set -g __fish_spack_optspecs_spack_restage h/help
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 restage' -f -k -a '(__fish_spack_specs_or_id)'
+complete -c spack -n '__fish_spack_using_command restage' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command restage' -s h -l help -d 'show this help message and exit'
+
+# spack solve
+set -g __fish_spack_optspecs_spack_solve h/help show= l/long L/very-long I/install-status no-install-status y/yaml j/json c/cover= N/namespaces t/types timers stats U/fresh reuse reuse-deps
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 solve' -f -k -a '(__fish_spack_specs_or_id)'
+complete -c spack -n '__fish_spack_using_command solve' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command solve' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command solve' -l show -r -f -a show
+complete -c spack -n '__fish_spack_using_command solve' -l show -r -d 'select outputs'
+complete -c spack -n '__fish_spack_using_command solve' -s l -l long -f -a long
+complete -c spack -n '__fish_spack_using_command solve' -s l -l long -d 'show dependency hashes as well as versions'
+complete -c spack -n '__fish_spack_using_command solve' -s L -l very-long -f -a very_long
+complete -c spack -n '__fish_spack_using_command solve' -s L -l very-long -d 'show full dependency hashes as well as versions'
+complete -c spack -n '__fish_spack_using_command solve' -s I -l install-status -f -a install_status
+complete -c spack -n '__fish_spack_using_command solve' -s I -l install-status -d 'show install status of packages'
+complete -c spack -n '__fish_spack_using_command solve' -l no-install-status -f -a install_status
+complete -c spack -n '__fish_spack_using_command solve' -l no-install-status -d 'do not show install status annotations'
+complete -c spack -n '__fish_spack_using_command solve' -s y -l yaml -f -a format
+complete -c spack -n '__fish_spack_using_command solve' -s y -l yaml -d 'print concrete spec as yaml'
+complete -c spack -n '__fish_spack_using_command solve' -s j -l json -f -a format
+complete -c spack -n '__fish_spack_using_command solve' -s j -l json -d 'print concrete spec as json'
+complete -c spack -n '__fish_spack_using_command solve' -s c -l cover -r -f -a 'nodes edges paths'
+complete -c spack -n '__fish_spack_using_command solve' -s c -l cover -r -d 'how extensively to traverse the DAG (default: nodes)'
+complete -c spack -n '__fish_spack_using_command solve' -s N -l namespaces -f -a namespaces
+complete -c spack -n '__fish_spack_using_command solve' -s N -l namespaces -d 'show fully qualified package names'
+complete -c spack -n '__fish_spack_using_command solve' -s t -l types -f -a types
+complete -c spack -n '__fish_spack_using_command solve' -s t -l types -d 'show dependency types'
+complete -c spack -n '__fish_spack_using_command solve' -l timers -f -a timers
+complete -c spack -n '__fish_spack_using_command solve' -l timers -d 'print out timers for different solve phases'
+complete -c spack -n '__fish_spack_using_command solve' -l stats -f -a stats
+complete -c spack -n '__fish_spack_using_command solve' -l stats -d 'print out statistics from clingo'
+complete -c spack -n '__fish_spack_using_command solve' -s U -l fresh -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command solve' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
+complete -c spack -n '__fish_spack_using_command solve' -l reuse -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command solve' -l reuse -d 'reuse installed packages/buildcaches when possible'
+complete -c spack -n '__fish_spack_using_command solve' -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command solve' -l reuse-deps -d 'reuse installed dependencies only'
+
+# spack spec
+set -g __fish_spack_optspecs_spack_spec h/help l/long L/very-long I/install-status no-install-status y/yaml j/json format= c/cover= N/namespaces t/types U/fresh reuse reuse-deps
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 spec' -f -k -a '(__fish_spack_specs_or_id)'
+complete -c spack -n '__fish_spack_using_command spec' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command spec' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command spec' -s l -l long -f -a long
+complete -c spack -n '__fish_spack_using_command spec' -s l -l long -d 'show dependency hashes as well as versions'
+complete -c spack -n '__fish_spack_using_command spec' -s L -l very-long -f -a very_long
+complete -c spack -n '__fish_spack_using_command spec' -s L -l very-long -d 'show full dependency hashes as well as versions'
+complete -c spack -n '__fish_spack_using_command spec' -s I -l install-status -f -a install_status
+complete -c spack -n '__fish_spack_using_command spec' -s I -l install-status -d 'show install status of packages'
+complete -c spack -n '__fish_spack_using_command spec' -l no-install-status -f -a install_status
+complete -c spack -n '__fish_spack_using_command spec' -l no-install-status -d 'do not show install status annotations'
+complete -c spack -n '__fish_spack_using_command spec' -s y -l yaml -f -a format
+complete -c spack -n '__fish_spack_using_command spec' -s y -l yaml -d 'print concrete spec as YAML'
+complete -c spack -n '__fish_spack_using_command spec' -s j -l json -f -a format
+complete -c spack -n '__fish_spack_using_command spec' -s j -l json -d 'print concrete spec as JSON'
+complete -c spack -n '__fish_spack_using_command spec' -l format -r -f -a format
+complete -c spack -n '__fish_spack_using_command spec' -l format -r -d 'print concrete spec with the specified format string'
+complete -c spack -n '__fish_spack_using_command spec' -s c -l cover -r -f -a 'nodes edges paths'
+complete -c spack -n '__fish_spack_using_command spec' -s c -l cover -r -d 'how extensively to traverse the DAG (default: nodes)'
+complete -c spack -n '__fish_spack_using_command spec' -s N -l namespaces -f -a namespaces
+complete -c spack -n '__fish_spack_using_command spec' -s N -l namespaces -d 'show fully qualified package names'
+complete -c spack -n '__fish_spack_using_command spec' -s t -l types -f -a types
+complete -c spack -n '__fish_spack_using_command spec' -s t -l types -d 'show dependency types'
+complete -c spack -n '__fish_spack_using_command spec' -s U -l fresh -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command spec' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
+complete -c spack -n '__fish_spack_using_command spec' -l reuse -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command spec' -l reuse -d 'reuse installed packages/buildcaches when possible'
+complete -c spack -n '__fish_spack_using_command spec' -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command spec' -l reuse-deps -d 'reuse installed dependencies only'
+
+# spack stage
+set -g __fish_spack_optspecs_spack_stage h/help n/no-checksum deprecated p/path= U/fresh reuse reuse-deps
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 stage' -f -k -a '(__fish_spack_specs_or_id)'
+complete -c spack -n '__fish_spack_using_command stage' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command stage' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command stage' -s n -l no-checksum -f -a no_checksum
+complete -c spack -n '__fish_spack_using_command stage' -s n -l no-checksum -d 'do not use checksums to verify downloaded files (unsafe)'
+complete -c spack -n '__fish_spack_using_command stage' -l deprecated -f -a deprecated
+complete -c spack -n '__fish_spack_using_command stage' -l deprecated -d 'fetch deprecated versions without warning'
+complete -c spack -n '__fish_spack_using_command stage' -s p -l path -r -f -a path
+complete -c spack -n '__fish_spack_using_command stage' -s p -l path -r -d 'path to stage package, does not add to spack tree'
+complete -c spack -n '__fish_spack_using_command stage' -s U -l fresh -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command stage' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
+complete -c spack -n '__fish_spack_using_command stage' -l reuse -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command stage' -l reuse -d 'reuse installed packages/buildcaches when possible'
+complete -c spack -n '__fish_spack_using_command stage' -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command stage' -l reuse-deps -d 'reuse installed dependencies only'
+
+# spack style
+set -g __fish_spack_optspecs_spack_style h/help b/base= a/all r/root-relative U/no-untracked f/fix root= t/tool= s/skip=
+
+complete -c spack -n '__fish_spack_using_command style' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command style' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command style' -s b -l base -r -f -a base
+complete -c spack -n '__fish_spack_using_command style' -s b -l base -r -d 'branch to compare against to determine changed files (default: develop)'
+complete -c spack -n '__fish_spack_using_command style' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command style' -s a -l all -d 'check all files, not just changed files'
+complete -c spack -n '__fish_spack_using_command style' -s r -l root-relative -f -a root_relative
+complete -c spack -n '__fish_spack_using_command style' -s r -l root-relative -d 'print root-relative paths (default: cwd-relative)'
+complete -c spack -n '__fish_spack_using_command style' -s U -l no-untracked -f -a untracked
+complete -c spack -n '__fish_spack_using_command style' -s U -l no-untracked -d 'exclude untracked files from checks'
+complete -c spack -n '__fish_spack_using_command style' -s f -l fix -f -a fix
+complete -c spack -n '__fish_spack_using_command style' -s f -l fix -d 'format automatically if possible (e.g., with isort, black)'
+complete -c spack -n '__fish_spack_using_command style' -l root -r -f -a root
+complete -c spack -n '__fish_spack_using_command style' -l root -r -d 'style check a different spack instance'
+complete -c spack -n '__fish_spack_using_command style' -s t -l tool -r -f -a tool
+complete -c spack -n '__fish_spack_using_command style' -s t -l tool -r -d 'specify which tools to run (default: isort,black,flake8,mypy)'
+complete -c spack -n '__fish_spack_using_command style' -s s -l skip -r -f -a skip
+complete -c spack -n '__fish_spack_using_command style' -s s -l skip -r -d 'specify tools to skip (choose from isort,black,flake8,mypy)'
+
+# spack tags
+set -g __fish_spack_optspecs_spack_tags h/help i/installed a/all
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 tags' -f -a '(__fish_spack_tags)'
+complete -c spack -n '__fish_spack_using_command tags' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command tags' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command tags' -s i -l installed -f -a installed
+complete -c spack -n '__fish_spack_using_command tags' -s i -l installed -d 'show information for installed packages only'
+complete -c spack -n '__fish_spack_using_command tags' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command tags' -s a -l all -d 'show packages for all available tags'
+
+# spack test
+set -g __fish_spack_optspecs_spack_test h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 test' -f -a run -d 'run tests for the specified installed packages'
+complete -c spack -n '__fish_spack_using_command_pos 0 test' -f -a list -d 'list installed packages with available tests'
+complete -c spack -n '__fish_spack_using_command_pos 0 test' -f -a find -d 'find tests that are running or have available results'
+complete -c spack -n '__fish_spack_using_command_pos 0 test' -f -a status -d 'get the current status for the specified Spack test suite(s)'
+complete -c spack -n '__fish_spack_using_command_pos 0 test' -f -a results -d 'get the results from Spack test suite(s) (default all)'
+complete -c spack -n '__fish_spack_using_command_pos 0 test' -f -a remove -d 'remove results from Spack test suite(s) (default all)'
+complete -c spack -n '__fish_spack_using_command test' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command test' -s h -l help -d 'show this help message and exit'
+
+# spack test run
+set -g __fish_spack_optspecs_spack_test_run h/help alias= fail-fast fail-first externals x/explicit keep-stage log-format= log-file= cdash-upload-url= cdash-build= cdash-site= cdash-track= cdash-buildstamp= help-cdash clean dirty
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 test run' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command test run' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command test run' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command test run' -l alias -r -f -a alias
+complete -c spack -n '__fish_spack_using_command test run' -l alias -r -d 'provide an alias for this test-suite for subsequent access'
+complete -c spack -n '__fish_spack_using_command test run' -l fail-fast -f -a fail_fast
+complete -c spack -n '__fish_spack_using_command test run' -l fail-fast -d 'stop tests for each package after the first failure'
+complete -c spack -n '__fish_spack_using_command test run' -l fail-first -f -a fail_first
+complete -c spack -n '__fish_spack_using_command test run' -l fail-first -d 'stop after the first failed package'
+complete -c spack -n '__fish_spack_using_command test run' -l externals -f -a externals
+complete -c spack -n '__fish_spack_using_command test run' -l externals -d 'test packages that are externally installed'
+complete -c spack -n '__fish_spack_using_command test run' -s x -l explicit -f -a explicit
+complete -c spack -n '__fish_spack_using_command test run' -s x -l explicit -d 'only test packages that are explicitly installed'
+complete -c spack -n '__fish_spack_using_command test run' -l keep-stage -f -a keep_stage
+complete -c spack -n '__fish_spack_using_command test run' -l keep-stage -d 'keep testing directory for debugging'
+complete -c spack -n '__fish_spack_using_command test run' -l log-format -r -f -a 'junit cdash'
+complete -c spack -n '__fish_spack_using_command test run' -l log-format -r -d 'format to be used for log files'
+complete -c spack -n '__fish_spack_using_command test run' -l log-file -r -f -a log_file
+complete -c spack -n '__fish_spack_using_command test run' -l log-file -r -d 'filename for the log file'
+complete -c spack -n '__fish_spack_using_command test run' -l cdash-upload-url -r -f -a cdash_upload_url
+complete -c spack -n '__fish_spack_using_command test run' -l cdash-build -r -f -a cdash_build
+complete -c spack -n '__fish_spack_using_command test run' -l cdash-site -r -f -a cdash_site
+complete -c spack -n '__fish_spack_using_command test run' -l cdash-track -r -f -a cdash_track
+complete -c spack -n '__fish_spack_using_command test run' -l cdash-buildstamp -r -f -a cdash_buildstamp
+complete -c spack -n '__fish_spack_using_command test run' -l help-cdash -f -a help_cdash
+complete -c spack -n '__fish_spack_using_command test run' -l help-cdash -d 'show usage instructions for CDash reporting'
+complete -c spack -n '__fish_spack_using_command test run' -l clean -f -a dirty
+complete -c spack -n '__fish_spack_using_command test run' -l clean -d 'unset harmful variables in the build environment (default)'
+complete -c spack -n '__fish_spack_using_command test run' -l dirty -f -a dirty
+complete -c spack -n '__fish_spack_using_command test run' -l dirty -d 'preserve user environment in spack\'s build environment (danger!)'
+
+# spack test list
+set -g __fish_spack_optspecs_spack_test_list h/help a/all
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 test list' -f -a '(__fish_spack_tags)'
+complete -c spack -n '__fish_spack_using_command test list' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command test list' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command test list' -s a -l all -f -a list_all
+complete -c spack -n '__fish_spack_using_command test list' -s a -l all -d 'list all packages with tests (not just installed)'
+
+# spack test find
+set -g __fish_spack_optspecs_spack_test_find h/help
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 test find' -f -a '(__fish_spack_tests)'
+complete -c spack -n '__fish_spack_using_command test find' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command test find' -s h -l help -d 'show this help message and exit'
+
+# spack test status
+set -g __fish_spack_optspecs_spack_test_status h/help
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 test status' -f -a '(__fish_spack_tests)'
+complete -c spack -n '__fish_spack_using_command test status' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command test status' -s h -l help -d 'show this help message and exit'
+
+# spack test results
+set -g __fish_spack_optspecs_spack_test_results h/help l/logs f/failed
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 test results' -f -a '(__fish_spack_tests)'
+complete -c spack -n '__fish_spack_using_command test results' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command test results' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command test results' -s l -l logs -f -a logs
+complete -c spack -n '__fish_spack_using_command test results' -s l -l logs -d 'print the test log for each matching package'
+complete -c spack -n '__fish_spack_using_command test results' -s f -l failed -f -a failed
+complete -c spack -n '__fish_spack_using_command test results' -s f -l failed -d 'only show results for failed tests of matching packages'
+
+# spack test remove
+set -g __fish_spack_optspecs_spack_test_remove h/help y/yes-to-all
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 test remove' -f -a '(__fish_spack_tests)'
+complete -c spack -n '__fish_spack_using_command test remove' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command test remove' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command test remove' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command test remove' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+
+# spack test-env
+set -g __fish_spack_optspecs_spack_test_env h/help clean dirty U/fresh reuse reuse-deps dump= pickle=
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 test-env' -f -a '(__fish_spack_build_env_spec)'
+complete -c spack -n '__fish_spack_using_command test-env' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command test-env' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command test-env' -l clean -f -a dirty
+complete -c spack -n '__fish_spack_using_command test-env' -l clean -d 'unset harmful variables in the build environment (default)'
+complete -c spack -n '__fish_spack_using_command test-env' -l dirty -f -a dirty
+complete -c spack -n '__fish_spack_using_command test-env' -l dirty -d 'preserve user environment in spack\'s build environment (danger!)'
+complete -c spack -n '__fish_spack_using_command test-env' -s U -l fresh -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command test-env' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
+complete -c spack -n '__fish_spack_using_command test-env' -l reuse -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command test-env' -l reuse -d 'reuse installed packages/buildcaches when possible'
+complete -c spack -n '__fish_spack_using_command test-env' -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command test-env' -l reuse-deps -d 'reuse installed dependencies only'
+complete -c spack -n '__fish_spack_using_command test-env' -l dump -r -f -a dump
+complete -c spack -n '__fish_spack_using_command test-env' -l dump -r -d 'dump a source-able environment to FILE'
+complete -c spack -n '__fish_spack_using_command test-env' -l pickle -r -f -a pickle
+complete -c spack -n '__fish_spack_using_command test-env' -l pickle -r -d 'dump a pickled source-able environment to FILE'
+
+# spack tutorial
+set -g __fish_spack_optspecs_spack_tutorial h/help y/yes-to-all
+complete -c spack -n '__fish_spack_using_command tutorial' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command tutorial' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command tutorial' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command tutorial' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+
+# spack undevelop
+set -g __fish_spack_optspecs_spack_undevelop h/help a/all
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 undevelop' -f -k -a '(__fish_spack_specs_or_id)'
+complete -c spack -n '__fish_spack_using_command undevelop' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command undevelop' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command undevelop' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command undevelop' -s a -l all -d 'remove all specs from (clear) the environment'
+
+# spack uninstall
+set -g __fish_spack_optspecs_spack_uninstall h/help f/force remove R/dependents y/yes-to-all a/all origin=
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 uninstall' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command uninstall' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command uninstall' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command uninstall' -s f -l force -f -a force
+complete -c spack -n '__fish_spack_using_command uninstall' -s f -l force -d 'remove regardless of whether other packages or environments depend on this one'
+complete -c spack -n '__fish_spack_using_command uninstall' -l remove -f -a remove
+complete -c spack -n '__fish_spack_using_command uninstall' -l remove -d 'if in an environment, then the spec should also be removed from the environment description'
+complete -c spack -n '__fish_spack_using_command uninstall' -s R -l dependents -f -a dependents
+complete -c spack -n '__fish_spack_using_command uninstall' -s R -l dependents -d 'also uninstall any packages that depend on the ones given via command line'
+complete -c spack -n '__fish_spack_using_command uninstall' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command uninstall' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+complete -c spack -n '__fish_spack_using_command uninstall' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command uninstall' -s a -l all -d 'remove ALL installed packages that match each supplied spec'
+complete -c spack -n '__fish_spack_using_command uninstall' -l origin -r -f -a origin
+complete -c spack -n '__fish_spack_using_command uninstall' -l origin -r -d 'only remove DB records with the specified origin'
+
+# spack unit-test
+set -g __fish_spack_optspecs_spack_unit_test h/help H/pytest-help l/list L/list-long N/list-names extension= s/ k/= showlocals
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 unit-test' -f -a '(__fish_spack_unit_tests)'
+complete -c spack -n '__fish_spack_using_command unit-test' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command unit-test' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command unit-test' -s H -l pytest-help -f -a pytest_help
+complete -c spack -n '__fish_spack_using_command unit-test' -s H -l pytest-help -d 'show full pytest help, with advanced options'
+complete -c spack -n '__fish_spack_using_command unit-test' -s l -l list -f -a list
+complete -c spack -n '__fish_spack_using_command unit-test' -s l -l list -d 'list test filenames'
+complete -c spack -n '__fish_spack_using_command unit-test' -s L -l list-long -f -a list
+complete -c spack -n '__fish_spack_using_command unit-test' -s L -l list-long -d 'list all test functions'
+complete -c spack -n '__fish_spack_using_command unit-test' -s N -l list-names -f -a list
+complete -c spack -n '__fish_spack_using_command unit-test' -s N -l list-names -d 'list full names of all tests'
+complete -c spack -n '__fish_spack_using_command unit-test' -l extension -r -f -a extension
+complete -c spack -n '__fish_spack_using_command unit-test' -l extension -r -d 'run test for a given spack extension'
+complete -c spack -n '__fish_spack_using_command unit-test' -s s -f -a parsed_args
+complete -c spack -n '__fish_spack_using_command unit-test' -s s -d 'print output while tests run (disable capture)'
+complete -c spack -n '__fish_spack_using_command unit-test' -s k -r -f -a expression
+complete -c spack -n '__fish_spack_using_command unit-test' -s k -r -d 'filter tests by keyword (can also use w/list options)'
+complete -c spack -n '__fish_spack_using_command unit-test' -l showlocals -f -a parsed_args
+complete -c spack -n '__fish_spack_using_command unit-test' -l showlocals -d 'show local variable values in tracebacks'
+
+# spack unload
+set -g __fish_spack_optspecs_spack_unload h/help sh csh fish bat a/all
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 unload' -f -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command unload' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command unload' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command unload' -l sh -f -a shell
+complete -c spack -n '__fish_spack_using_command unload' -l sh -d 'print sh commands to activate the environment'
+complete -c spack -n '__fish_spack_using_command unload' -l csh -f -a shell
+complete -c spack -n '__fish_spack_using_command unload' -l csh -d 'print csh commands to activate the environment'
+complete -c spack -n '__fish_spack_using_command unload' -l fish -f -a shell
+complete -c spack -n '__fish_spack_using_command unload' -l fish -d 'print fish commands to load the package'
+complete -c spack -n '__fish_spack_using_command unload' -l bat -f -a shell
+complete -c spack -n '__fish_spack_using_command unload' -l bat -d 'print bat commands to load the package'
+complete -c spack -n '__fish_spack_using_command unload' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command unload' -s a -l all -d 'unload all loaded Spack packages'
+
+# spack url
+set -g __fish_spack_optspecs_spack_url h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 url' -f -a parse -d 'attempt to parse a url'
+complete -c spack -n '__fish_spack_using_command_pos 0 url' -f -a list -d 'list urls in all packages'
+complete -c spack -n '__fish_spack_using_command_pos 0 url' -f -a summary -d 'print a summary of how well we are parsing package urls'
+complete -c spack -n '__fish_spack_using_command_pos 0 url' -f -a stats -d 'print statistics on versions and checksums for all packages'
+complete -c spack -n '__fish_spack_using_command url' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command url' -s h -l help -d 'show this help message and exit'
+
+# spack url parse
+set -g __fish_spack_optspecs_spack_url_parse h/help s/spider
+
+complete -c spack -n '__fish_spack_using_command url parse' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command url parse' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command url parse' -s s -l spider -f -a spider
+complete -c spack -n '__fish_spack_using_command url parse' -s s -l spider -d 'spider the source page for versions'
+
+# spack url list
+set -g __fish_spack_optspecs_spack_url_list h/help c/color e/extrapolation n/incorrect-name N/correct-name v/incorrect-version V/correct-version
+complete -c spack -n '__fish_spack_using_command url list' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command url list' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command url list' -s c -l color -f -a color
+complete -c spack -n '__fish_spack_using_command url list' -s c -l color -d 'color the parsed version and name in the urls shown (versions will be cyan, name red)'
+complete -c spack -n '__fish_spack_using_command url list' -s e -l extrapolation -f -a extrapolation
+complete -c spack -n '__fish_spack_using_command url list' -s e -l extrapolation -d 'color the versions used for extrapolation as well (additional versions will be green, names magenta)'
+complete -c spack -n '__fish_spack_using_command url list' -s n -l incorrect-name -f -a incorrect_name
+complete -c spack -n '__fish_spack_using_command url list' -s n -l incorrect-name -d 'only list urls for which the name was incorrectly parsed'
+complete -c spack -n '__fish_spack_using_command url list' -s N -l correct-name -f -a correct_name
+complete -c spack -n '__fish_spack_using_command url list' -s N -l correct-name -d 'only list urls for which the name was correctly parsed'
+complete -c spack -n '__fish_spack_using_command url list' -s v -l incorrect-version -f -a incorrect_version
+complete -c spack -n '__fish_spack_using_command url list' -s v -l incorrect-version -d 'only list urls for which the version was incorrectly parsed'
+complete -c spack -n '__fish_spack_using_command url list' -s V -l correct-version -f -a correct_version
+complete -c spack -n '__fish_spack_using_command url list' -s V -l correct-version -d 'only list urls for which the version was correctly parsed'
+
+# spack url summary
+set -g __fish_spack_optspecs_spack_url_summary h/help
+complete -c spack -n '__fish_spack_using_command url summary' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command url summary' -s h -l help -d 'show this help message and exit'
+
+# spack url stats
+set -g __fish_spack_optspecs_spack_url_stats h/help show-issues
+complete -c spack -n '__fish_spack_using_command url stats' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command url stats' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command url stats' -l show-issues -f -a show_issues
+complete -c spack -n '__fish_spack_using_command url stats' -l show-issues -d 'show packages with issues (md5 hashes, http urls)'
+
+# spack verify
+set -g __fish_spack_optspecs_spack_verify h/help l/local j/json a/all s/specs f/files
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 verify' $__fish_spack_force_files -a '(__fish_spack_installed_specs)'
+complete -c spack -n '__fish_spack_using_command verify' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command verify' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command verify' -s l -l local -f -a local
+complete -c spack -n '__fish_spack_using_command verify' -s l -l local -d 'verify only locally installed packages'
+complete -c spack -n '__fish_spack_using_command verify' -s j -l json -f -a json
+complete -c spack -n '__fish_spack_using_command verify' -s j -l json -d 'ouptut json-formatted errors'
+complete -c spack -n '__fish_spack_using_command verify' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command verify' -s a -l all -d 'verify all packages'
+complete -c spack -n '__fish_spack_using_command verify' -s s -l specs -f -a type
+complete -c spack -n '__fish_spack_using_command verify' -s s -l specs -d 'treat entries as specs (default)'
+complete -c spack -n '__fish_spack_using_command verify' -s f -l files -f -a type
+complete -c spack -n '__fish_spack_using_command verify' -s f -l files -d 'treat entries as absolute filenames'
+
+# spack versions
+set -g __fish_spack_optspecs_spack_versions h/help s/safe safe-only r/remote n/new c/concurrency=
+complete -c spack -n '__fish_spack_using_command_pos 0 versions' -f -a '(__fish_spack_packages)'
+complete -c spack -n '__fish_spack_using_command versions' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command versions' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command versions' -s s -l safe -f -a safe
+complete -c spack -n '__fish_spack_using_command versions' -s s -l safe -d 'only list safe versions of the package'
+complete -c spack -n '__fish_spack_using_command versions' -l safe-only -f -a safe_only
+complete -c spack -n '__fish_spack_using_command versions' -l safe-only -d '[deprecated] only list safe versions of the package'
+complete -c spack -n '__fish_spack_using_command versions' -s r -l remote -f -a remote
+complete -c spack -n '__fish_spack_using_command versions' -s r -l remote -d 'only list remote versions of the package'
+complete -c spack -n '__fish_spack_using_command versions' -s n -l new -f -a new
+complete -c spack -n '__fish_spack_using_command versions' -s n -l new -d 'only list remote versions newer than the latest checksummed version'
+complete -c spack -n '__fish_spack_using_command versions' -s c -l concurrency -r -f -a concurrency
+complete -c spack -n '__fish_spack_using_command versions' -s c -l concurrency -r -d 'number of concurrent requests'
+
+# spack view
+set -g __fish_spack_optspecs_spack_view h/help v/verbose e/exclude= d/dependencies=
+complete -c spack -n '__fish_spack_using_command_pos 0 view' -f -a symlink -d 'add package files to a filesystem view via symbolic links'
+complete -c spack -n '__fish_spack_using_command_pos 0 view' -f -a add -d 'add package files to a filesystem view via symbolic links'
+complete -c spack -n '__fish_spack_using_command_pos 0 view' -f -a soft -d 'add package files to a filesystem view via symbolic links'
+complete -c spack -n '__fish_spack_using_command_pos 0 view' -f -a hardlink -d 'add packages files to a filesystem view via hard links'
+complete -c spack -n '__fish_spack_using_command_pos 0 view' -f -a hard -d 'add packages files to a filesystem view via hard links'
+complete -c spack -n '__fish_spack_using_command_pos 0 view' -f -a copy -d 'add package files to a filesystem view via copy/relocate'
+complete -c spack -n '__fish_spack_using_command_pos 0 view' -f -a relocate -d 'add package files to a filesystem view via copy/relocate'
+complete -c spack -n '__fish_spack_using_command_pos 0 view' -f -a remove -d 'remove packages from a filesystem view'
+complete -c spack -n '__fish_spack_using_command_pos 0 view' -f -a rm -d 'remove packages from a filesystem view'
+complete -c spack -n '__fish_spack_using_command_pos 0 view' -f -a statlink -d 'check status of packages in a filesystem view'
+complete -c spack -n '__fish_spack_using_command_pos 0 view' -f -a status -d 'check status of packages in a filesystem view'
+complete -c spack -n '__fish_spack_using_command_pos 0 view' -f -a check -d 'check status of packages in a filesystem view'
+complete -c spack -n '__fish_spack_using_command view' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command view' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command view' -s v -l verbose -f -a verbose
+complete -c spack -n '__fish_spack_using_command view' -s v -l verbose -d 'if not verbose only warnings/errors will be printed'
+complete -c spack -n '__fish_spack_using_command view' -s e -l exclude -r -f -a exclude
+complete -c spack -n '__fish_spack_using_command view' -s e -l exclude -r -d 'exclude packages with names matching the given regex pattern'
+complete -c spack -n '__fish_spack_using_command view' -s d -l dependencies -r -f -a 'true false yes no'
+complete -c spack -n '__fish_spack_using_command view' -s d -l dependencies -r -d 'link/remove/list dependencies'
+
+# spack view symlink
+set -g __fish_spack_optspecs_spack_view_symlink h/help projection-file= i/ignore-conflicts
+complete -c spack -n '__fish_spack_using_command_pos 0 view symlink' -f -a '(__fish_complete_directories)'
+complete -c spack -n '__fish_spack_using_command_pos_remainder 1 view symlink' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command view symlink' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command view symlink' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command view symlink' -l projection-file -r -f -a projection_file
+complete -c spack -n '__fish_spack_using_command view symlink' -l projection-file -r -d 'initialize view using projections from file'
+complete -c spack -n '__fish_spack_using_command view symlink' -s i -l ignore-conflicts -f -a ignore_conflicts
+
+# spack view add
+set -g __fish_spack_optspecs_spack_view_add h/help projection-file= i/ignore-conflicts
+complete -c spack -n '__fish_spack_using_command_pos 0 view add' -f -a '(__fish_complete_directories)'
+complete -c spack -n '__fish_spack_using_command_pos_remainder 1 view add' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command view add' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command view add' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command view add' -l projection-file -r -f -a projection_file
+complete -c spack -n '__fish_spack_using_command view add' -l projection-file -r -d 'initialize view using projections from file'
+complete -c spack -n '__fish_spack_using_command view add' -s i -l ignore-conflicts -f -a ignore_conflicts
+
+# spack view soft
+set -g __fish_spack_optspecs_spack_view_soft h/help projection-file= i/ignore-conflicts
+complete -c spack -n '__fish_spack_using_command_pos 0 view soft' -f -a '(__fish_complete_directories)'
+complete -c spack -n '__fish_spack_using_command_pos_remainder 1 view soft' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command view soft' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command view soft' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command view soft' -l projection-file -r -f -a projection_file
+complete -c spack -n '__fish_spack_using_command view soft' -l projection-file -r -d 'initialize view using projections from file'
+complete -c spack -n '__fish_spack_using_command view soft' -s i -l ignore-conflicts -f -a ignore_conflicts
+
+# spack view hardlink
+set -g __fish_spack_optspecs_spack_view_hardlink h/help projection-file= i/ignore-conflicts
+complete -c spack -n '__fish_spack_using_command_pos 0 view hardlink' -f -a '(__fish_complete_directories)'
+complete -c spack -n '__fish_spack_using_command_pos_remainder 1 view hardlink' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command view hardlink' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command view hardlink' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command view hardlink' -l projection-file -r -f -a projection_file
+complete -c spack -n '__fish_spack_using_command view hardlink' -l projection-file -r -d 'initialize view using projections from file'
+complete -c spack -n '__fish_spack_using_command view hardlink' -s i -l ignore-conflicts -f -a ignore_conflicts
+
+# spack view hard
+set -g __fish_spack_optspecs_spack_view_hard h/help projection-file= i/ignore-conflicts
+complete -c spack -n '__fish_spack_using_command_pos 0 view hard' -f -a '(__fish_complete_directories)'
+complete -c spack -n '__fish_spack_using_command_pos_remainder 1 view hard' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command view hard' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command view hard' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command view hard' -l projection-file -r -f -a projection_file
+complete -c spack -n '__fish_spack_using_command view hard' -l projection-file -r -d 'initialize view using projections from file'
+complete -c spack -n '__fish_spack_using_command view hard' -s i -l ignore-conflicts -f -a ignore_conflicts
+
+# spack view copy
+set -g __fish_spack_optspecs_spack_view_copy h/help projection-file= i/ignore-conflicts
+complete -c spack -n '__fish_spack_using_command_pos 0 view copy' -f -a '(__fish_complete_directories)'
+complete -c spack -n '__fish_spack_using_command_pos_remainder 1 view copy' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command view copy' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command view copy' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command view copy' -l projection-file -r -f -a projection_file
+complete -c spack -n '__fish_spack_using_command view copy' -l projection-file -r -d 'initialize view using projections from file'
+complete -c spack -n '__fish_spack_using_command view copy' -s i -l ignore-conflicts -f -a ignore_conflicts
+
+# spack view relocate
+set -g __fish_spack_optspecs_spack_view_relocate h/help projection-file= i/ignore-conflicts
+complete -c spack -n '__fish_spack_using_command_pos 0 view relocate' -f -a '(__fish_complete_directories)'
+complete -c spack -n '__fish_spack_using_command_pos_remainder 1 view relocate' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command view relocate' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command view relocate' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command view relocate' -l projection-file -r -f -a projection_file
+complete -c spack -n '__fish_spack_using_command view relocate' -l projection-file -r -d 'initialize view using projections from file'
+complete -c spack -n '__fish_spack_using_command view relocate' -s i -l ignore-conflicts -f -a ignore_conflicts
+
+# spack view remove
+set -g __fish_spack_optspecs_spack_view_remove h/help no-remove-dependents a/all
+complete -c spack -n '__fish_spack_using_command_pos 0 view remove' -f -a '(__fish_complete_directories)'
+complete -c spack -n '__fish_spack_using_command_pos_remainder 1 view remove' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command view remove' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command view remove' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command view remove' -l no-remove-dependents -f -a no_remove_dependents
+complete -c spack -n '__fish_spack_using_command view remove' -l no-remove-dependents -d 'do not remove dependents of specified specs'
+complete -c spack -n '__fish_spack_using_command view remove' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command view remove' -s a -l all -d 'act on all specs in view'
+
+# spack view rm
+set -g __fish_spack_optspecs_spack_view_rm h/help no-remove-dependents a/all
+complete -c spack -n '__fish_spack_using_command_pos 0 view rm' -f -a '(__fish_complete_directories)'
+complete -c spack -n '__fish_spack_using_command_pos_remainder 1 view rm' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command view rm' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command view rm' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command view rm' -l no-remove-dependents -f -a no_remove_dependents
+complete -c spack -n '__fish_spack_using_command view rm' -l no-remove-dependents -d 'do not remove dependents of specified specs'
+complete -c spack -n '__fish_spack_using_command view rm' -s a -l all -f -a all
+complete -c spack -n '__fish_spack_using_command view rm' -s a -l all -d 'act on all specs in view'
+
+# spack view statlink
+set -g __fish_spack_optspecs_spack_view_statlink h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 view statlink' -f -a '(__fish_complete_directories)'
+complete -c spack -n '__fish_spack_using_command_pos_remainder 1 view statlink' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command view statlink' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command view statlink' -s h -l help -d 'show this help message and exit'
+
+# spack view status
+set -g __fish_spack_optspecs_spack_view_status h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 view status' -f -a '(__fish_complete_directories)'
+complete -c spack -n '__fish_spack_using_command_pos_remainder 1 view status' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command view status' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command view status' -s h -l help -d 'show this help message and exit'
+
+# spack view check
+set -g __fish_spack_optspecs_spack_view_check h/help
+complete -c spack -n '__fish_spack_using_command_pos 0 view check' -f -a '(__fish_complete_directories)'
+complete -c spack -n '__fish_spack_using_command_pos_remainder 1 view check' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command view check' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command view check' -s h -l help -d 'show this help message and exit'
-- 
cgit v1.2.3-60-g2f50