Repository: clap-rs/clap (language: rust)

Issue:
Deprecate and remove `clap_complete_fig`?
Fig is sunsetted, see https://news.ycombinator.com/item?id=39683889


Discussion / hints:
See
- https://github.com/denoland/deno/discussions/22903
  - Suggests waiting for September
- https://github.com/ajeetdsouza/zoxide/discussions/757
I would propose doing the deprecation now and removing it later after September.

Fix patch:
diff --git a/Cargo.lock b/Cargo.lock
index aa4a1f241ac..fe66976773c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -487,15 +487,6 @@ dependencies = [
  "trycmd",
 ]
 
-[[package]]
-name = "clap_complete_fig"
-version = "4.5.2"
-dependencies = [
- "clap 4.5.23",
- "clap_complete",
- "snapbox",
-]
-
 [[package]]
 name = "clap_complete_nushell"
 version = "4.5.5"
diff --git a/Cargo.toml b/Cargo.toml
index 263e27996e9..a3055ddc6bc 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,7 +6,6 @@ members = [
   "clap_derive",
   "clap_lex",
   "clap_complete",
-  "clap_complete_fig",
   "clap_complete_nushell",
   "clap_mangen",
 ]
diff --git a/clap_complete/README.md b/clap_complete/README.md
index 8fb7e2a8ceb..696f7199b00 100644
--- a/clap_complete/README.md
+++ b/clap_complete/README.md
@@ -20,5 +20,4 @@ Dual-licensed under [Apache 2.0](LICENSE-APACHE) or [MIT](LICENSE-MIT).
 
 ### Related Projects
 
-- [clap_complete_fig](https://crates.io/crates/clap_complete_fig) for [fig](https://fig.io/) shell completion support
 - [clap_complete_nushell](https://crates.io/crates/clap_complete_nushell) for [nushell](https://www.nushell.sh/) shell completion support
diff --git a/clap_complete_fig/CHANGELOG.md b/clap_complete_fig/CHANGELOG.md
deleted file mode 100644
index 1e77111c1ad..00000000000
--- a/clap_complete_fig/CHANGELOG.md
+++ /dev/null
@@ -1,124 +0,0 @@
-# Change Log
-All notable changes to this project will be documented in this file.
-
-The format is based on [Keep a Changelog](http://keepachangelog.com/)
-and this project adheres to [Semantic Versioning](http://semver.org/).
-
-<!-- next-header -->
-## [Unreleased] - ReleaseDate
-
-## [4.5.2] - 2024-07-25
-
-## [4.5.1] - 2024-06-06
-
-## [4.5.0] - 2024-02-08
-
-### Compatibility
-
-- Update MSRV to 1.74
-
-## [4.4.2] - 2023-10-24
-
-## [4.4.1] - 2023-09-18
-
-## [4.4.0] - 2023-08-24
-
-### Compatibility
-
-- Update MSRV to 1.70.0
-
-## [4.3.1] - 2023-06-02
-
-## [4.3.0] - 2023-05-19
-
-## [4.2.0] - 2023-03-28
-
-## [4.1.2] - 2023-03-16
-
-## [4.1.1] - 2023-02-15
-
-## [4.1.0] - 2023-01-13
-
-### Compatibility
-
-MSRV changed to 1.64.0
-
-## [4.0.2] - 2022-11-24
-
-## [4.0.1] - 2022-10-18
-
-## [4.0.0] - 2022-09-28
-
-## [3.2.4] - 2022-07-02
-
-### Fixes
-
-- Treat new actions as repeatable
-
-## [3.2.3] - 2022-06-28
-
-## [3.2.2] - 2022-06-21
-
-## [3.2.1] - 2022-06-13
-
-## [3.2.0] - 2022-06-13
-
-## [3.1.5] - 2022-04-19
-
-## [3.1.4] - 2022-03-21
-
-- Subcommand alias support
-
-## [3.1.3] - 2022-03-18
-
-### Fixes
-
-- `require_equals` fix
-
-## [3.1.2] - 2022-03-18
-
-## [3.1.1] - 2022-03-17
-
-### Features
-
-- `hide` support
-- `require_equals` support
-- Exclude support
-- `multiple_occurrences` support
-
-## [3.1.0] - 2022-02-16
-
-## [3.0.2] - 2022-01-12
-
-## [3.0.1] - 2022-01-03
-
-<!-- next-url -->
-[Unreleased]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v4.5.2...HEAD
-[4.5.2]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v4.5.1...clap_complete_fig-v4.5.2
-[4.5.1]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v4.5.0...clap_complete_fig-v4.5.1
-[4.5.0]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v4.4.2...clap_complete_fig-v4.5.0
-[4.4.2]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v4.4.1...clap_complete_fig-v4.4.2
-[4.4.1]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v4.4.0...clap_complete_fig-v4.4.1
-[4.4.0]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v4.3.1...clap_complete_fig-v4.4.0
-[4.3.1]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v4.3.0...clap_complete_fig-v4.3.1
-[4.3.0]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v4.2.0...clap_complete_fig-v4.3.0
-[4.2.0]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v4.1.2...clap_complete_fig-v4.2.0
-[4.1.2]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v4.1.1...clap_complete_fig-v4.1.2
-[4.1.1]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v4.1.0...clap_complete_fig-v4.1.1
-[4.1.0]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v4.0.2...clap_complete_fig-v4.1.0
-[4.0.2]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v4.0.1...clap_complete_fig-v4.0.2
-[4.0.1]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v4.0.0...clap_complete_fig-v4.0.1
-[4.0.0]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v3.2.4...clap_complete_fig-v4.0.0
-[3.2.4]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v3.2.3...clap_complete_fig-v3.2.4
-[3.2.3]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v3.2.2...clap_complete_fig-v3.2.3
-[3.2.2]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v3.2.1...clap_complete_fig-v3.2.2
-[3.2.1]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v3.2.0...clap_complete_fig-v3.2.1
-[3.2.0]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v3.1.5...clap_complete_fig-v3.2.0
-[3.1.5]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v3.1.4...clap_complete_fig-v3.1.5
-[3.1.4]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v3.1.3...clap_complete_fig-v3.1.4
-[3.1.3]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v3.1.2...clap_complete_fig-v3.1.3
-[3.1.2]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v3.1.1...clap_complete_fig-v3.1.2
-[3.1.1]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v3.1.0...clap_complete_fig-v3.1.1
-[3.1.0]: https://github.com/clap-rs/clap/compare/clap_complete_fig-v3.0.2...clap_complete_fig-v3.1.0
-[3.0.2]: https://github.com/clap-rs/clap/compare/v3.0.1...clap_complete_fig-v3.0.2
-[3.0.1]: https://github.com/clap-rs/clap/compare/v3.0.0...v3.0.1
diff --git a/clap_complete_fig/Cargo.toml b/clap_complete_fig/Cargo.toml
deleted file mode 100644
index 104fd63b4e8..00000000000
--- a/clap_complete_fig/Cargo.toml
+++ /dev/null
@@ -1,42 +0,0 @@
-[package]
-name = "clap_complete_fig"
-version = "4.5.2"
-description = "A generator library used with clap for Fig completion scripts"
-categories = ["command-line-interface"]
-keywords = [
-  "clap",
-  "cli",
-  "completion",
-  "fig",
-]
-repository.workspace = true
-license.workspace = true
-edition.workspace = true
-rust-version.workspace = true
-include.workspace = true
-
-[package.metadata.docs.rs]
-targets = ["x86_64-unknown-linux-gnu"]
-
-[package.metadata.release]
-pre-release-replacements = [
-  {file="CHANGELOG.md", search="Unreleased", replace="{{version}}", min=1},
-  {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1},
-  {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1},
-  {file="CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n## [Unreleased] - ReleaseDate\n", exactly=1},
-  {file="CHANGELOG.md", search="<!-- next-url -->", replace="<!-- next-url -->\n[Unreleased]: https://github.com/clap-rs/clap/compare/{{tag_name}}...HEAD", exactly=1},
-]
-
-[lib]
-bench = false
-
-[dependencies]
-clap = { path = "../", version = "4.0.0", default-features = false, features = ["std"] }
-clap_complete = { path = "../clap_complete", version = "4.0.0" }
-
-[dev-dependencies]
-snapbox = { version = "0.6.0", features = ["diff"] }
-clap = { path = "../", version = "4.0.0", default-features = false, features = ["std", "help"] }
-
-[lints]
-workspace = true
diff --git a/clap_complete_fig/LICENSE-APACHE b/clap_complete_fig/LICENSE-APACHE
deleted file mode 100644
index 261eeb9e9f8..00000000000
--- a/clap_complete_fig/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
diff --git a/clap_complete_fig/LICENSE-MIT b/clap_complete_fig/LICENSE-MIT
deleted file mode 100644
index 7b05b8453e9..00000000000
--- a/clap_complete_fig/LICENSE-MIT
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015-2022 Kevin B. Knapp and Clap Contributors
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/clap_complete_fig/README.md b/clap_complete_fig/README.md
deleted file mode 100644
index 3c8d1ca8abb..00000000000
--- a/clap_complete_fig/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# clap_complete_fig
-
-Generates [Fig](https://github.com/withfig/autocomplete) completions for [`clap`](https://github.com/clap-rs/clap) based CLIs
-
-<!-- * [Documentation][docs] -->
-- [Questions & Discussions](https://github.com/clap-rs/clap/discussions)
-- [CONTRIBUTING](../CONTRIBUTING.md)
-
-<!-- [docs]: https://docs.rs/clap_complete_fig -->
diff --git a/clap_complete_fig/examples/fig_completion.rs b/clap_complete_fig/examples/fig_completion.rs
deleted file mode 100644
index e6d57b0aa2f..00000000000
--- a/clap_complete_fig/examples/fig_completion.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-use clap::Command;
-use clap_complete::generate;
-use clap_complete_fig::Fig;
-use std::io;
-
-fn main() {
-    let mut cmd = Command::new("myapp")
-        .subcommand(Command::new("test").subcommand(Command::new("config")))
-        .subcommand(Command::new("hello"));
-
-    generate(Fig, &mut cmd, "myapp", &mut io::stdout());
-}
diff --git a/clap_complete_fig/src/fig.rs b/clap_complete_fig/src/fig.rs
deleted file mode 100644
index 6e73e7c089e..00000000000
--- a/clap_complete_fig/src/fig.rs
+++ /dev/null
@@ -1,489 +0,0 @@
-#![allow(clippy::write_with_newline)]
-
-use std::fmt::Write;
-
-// Internal
-use clap::{builder, Arg, ArgAction, Command, ValueHint};
-use clap_complete::{generator, Generator};
-
-/// Generate fig completion file
-pub struct Fig;
-
-impl Generator for Fig {
-    fn file_name(&self, name: &str) -> String {
-        format!("{name}.ts")
-    }
-
-    fn generate(&self, cmd: &Command, buf: &mut dyn std::io::Write) {
-        let command = cmd.get_bin_name().unwrap();
-        let mut buffer = String::new();
-
-        write!(
-            &mut buffer,
-            "const completion: Fig.Spec = {{\n  name: \"{}\",\n",
-            escape_string(command)
-        )
-        .unwrap();
-
-        write!(
-            &mut buffer,
-            "  description: \"{}\",\n",
-            escape_string(&cmd.get_about().unwrap_or_default().to_string())
-        )
-        .unwrap();
-
-        gen_fig_inner(&[], 2, cmd, &mut buffer);
-
-        write!(&mut buffer, "}};\n\nexport default completion;\n").unwrap();
-
-        buf.write_all(buffer.as_bytes())
-            .expect("Failed to write to generated file");
-    }
-}
-
-// Escape string inside double quotes and convert whitespace
-fn escape_string(string: &str) -> String {
-    string
-        .replace('\\', "\\\\")
-        .replace('\"', "\\\"")
-        .replace('\t', "    ")
-        .replace('\n', " ")
-        .replace('\r', "")
-}
-
-fn gen_fig_inner(parent_commands: &[&str], indent: usize, cmd: &Command, buffer: &mut String) {
-    if cmd.has_subcommands() {
-        write!(buffer, "{:indent$}subcommands: [\n", "").unwrap();
-        // generate subcommands
-        for subcommand in cmd.get_subcommands() {
-            let mut aliases: Vec<&str> = subcommand.get_all_aliases().collect();
-            if !aliases.is_empty() {
-                aliases.insert(0, subcommand.get_name());
-
-                write!(
-                    buffer,
-                    "{:indent$}{{\n{:indent$}  name: [",
-                    "",
-                    "",
-                    indent = indent + 2
-                )
-                .unwrap();
-
-                buffer.push_str(
-                    &aliases
-                        .iter()
-                        .map(|name| format!("\"{}\"", escape_string(name)))
-                        .collect::<Vec<_>>()
-                        .join(", "),
-                );
-
-                write!(buffer, "],\n").unwrap();
-            } else {
-                write!(
-                    buffer,
-                    "{:indent$}{{\n{:indent$}  name: \"{}\",\n",
-                    "",
-                    "",
-                    escape_string(subcommand.get_name()),
-                    indent = indent + 2
-                )
-                .unwrap();
-            }
-
-            if let Some(data) = subcommand.get_about() {
-                write!(
-                    buffer,
-                    "{:indent$}description: \"{}\",\n",
-                    "",
-                    escape_string(&data.to_string()),
-                    indent = indent + 4
-                )
-                .unwrap();
-            }
-
-            if subcommand.is_hide_set() {
-                write!(buffer, "{:indent$}hidden: true,\n", "", indent = indent + 4).unwrap();
-            }
-
-            let mut parent_commands: Vec<_> = parent_commands.into();
-            parent_commands.push(subcommand.get_name());
-            gen_fig_inner(&parent_commands, indent + 4, subcommand, buffer);
-
-            write!(buffer, "{:indent$}}},\n", "", indent = indent + 2).unwrap();
-        }
-        write!(buffer, "{:indent$}],\n", "").unwrap();
-    }
-
-    buffer.push_str(&gen_options(cmd, indent));
-
-    let args = cmd.get_positionals().collect::<Vec<_>>();
-
-    match args.len() {
-        0 => {}
-        1 => {
-            write!(buffer, "{:indent$}args: ", "").unwrap();
-
-            buffer.push_str(&gen_args(args[0], indent));
-        }
-        _ => {
-            write!(buffer, "{:indent$}args: [\n", "").unwrap();
-            for arg in args {
-                write!(buffer, "{:indent$}", "", indent = indent + 2).unwrap();
-                buffer.push_str(&gen_args(arg, indent + 2));
-            }
-            write!(buffer, "{:indent$}]\n", "").unwrap();
-        }
-    };
-}
-
-fn gen_options(cmd: &Command, indent: usize) -> String {
-    let mut buffer = String::new();
-
-    let flags = generator::utils::flags(cmd);
-
-    if cmd.get_opts().next().is_some() || !flags.is_empty() {
-        write!(&mut buffer, "{:indent$}options: [\n", "").unwrap();
-
-        for option in cmd.get_opts() {
-            write!(&mut buffer, "{:indent$}{{\n", "", indent = indent + 2).unwrap();
-
-            let mut names = vec![];
-
-            if let Some(shorts) = option.get_short_and_visible_aliases() {
-                names.extend(
-                    shorts
-                        .iter()
-                        .map(|short| format!("-{}", escape_string(&short.to_string()))),
-                );
-            }
-
-            if let Some(longs) = option.get_long_and_visible_aliases() {
-                names.extend(
-                    longs
-                        .iter()
-                        .map(|long| format!("--{}", escape_string(long))),
-                );
-            }
-
-            if names.len() > 1 {
-                write!(&mut buffer, "{:indent$}name: [", "", indent = indent + 4).unwrap();
-
-                buffer.push_str(
-                    &names
-                        .iter()
-                        .map(|name| format!("\"{}\"", escape_string(name)))
-                        .collect::<Vec<_>>()
-                        .join(", "),
-                );
-
-                buffer.push_str("],\n");
-            } else {
-                write!(
-                    &mut buffer,
-                    "{:indent$}name: \"{}\",\n",
-                    "",
-                    escape_string(&names[0]),
-                    indent = indent + 4
-                )
-                .unwrap();
-            }
-
-            if let Some(data) = option.get_help() {
-                write!(
-                    &mut buffer,
-                    "{:indent$}description: \"{}\",\n",
-                    "",
-                    escape_string(&data.to_string()),
-                    indent = indent + 4
-                )
-                .unwrap();
-            }
-
-            if option.is_hide_set() {
-                write!(
-                    &mut buffer,
-                    "{:indent$}hidden: true,\n",
-                    "",
-                    indent = indent + 4
-                )
-                .unwrap();
-            }
-
-            let conflicts = arg_conflicts(cmd, option);
-
-            if !conflicts.is_empty() {
-                write!(
-                    &mut buffer,
-                    "{:indent$}exclusiveOn: [\n",
-                    "",
-                    indent = indent + 4
-                )
-                .unwrap();
-
-                for conflict in conflicts {
-                    write!(
-                        &mut buffer,
-                        "{:indent$}\"{}\",\n",
-                        "",
-                        escape_string(&conflict),
-                        indent = indent + 6
-                    )
-                    .unwrap();
-                }
-
-                write!(&mut buffer, "{:indent$}],\n", "", indent = indent + 4).unwrap();
-            }
-
-            if let ArgAction::Set | ArgAction::Append | ArgAction::Count = option.get_action() {
-                write!(
-                    &mut buffer,
-                    "{:indent$}isRepeatable: true,\n",
-                    "",
-                    indent = indent + 4
-                )
-                .unwrap();
-            }
-
-            if option.is_require_equals_set() {
-                write!(
-                    &mut buffer,
-                    "{:indent$}requiresEquals: true,\n",
-                    "",
-                    indent = indent + 4
-                )
-                .unwrap();
-            }
-
-            write!(&mut buffer, "{:indent$}args: ", "", indent = indent + 4).unwrap();
-
-            buffer.push_str(&gen_args(option, indent + 4));
-
-            write!(&mut buffer, "{:indent$}}},\n", "", indent = indent + 2).unwrap();
-        }
-
-        for flag in generator::utils::flags(cmd) {
-            write!(&mut buffer, "{:indent$}{{\n", "", indent = indent + 2).unwrap();
-
-            let mut flags = vec![];
-
-            if let Some(shorts) = flag.get_short_and_visible_aliases() {
-                flags.extend(shorts.iter().map(|s| format!("-{s}")));
-            }
-
-            if let Some(longs) = flag.get_long_and_visible_aliases() {
-                flags.extend(longs.iter().map(|s| format!("--{s}")));
-            }
-
-            if flags.len() > 1 {
-                write!(&mut buffer, "{:indent$}name: [", "", indent = indent + 4).unwrap();
-
-                buffer.push_str(
-                    &flags
-                        .iter()
-                        .map(|name| format!("\"{}\"", escape_string(name)))
-                        .collect::<Vec<_>>()
-                        .join(", "),
-                );
-
-                buffer.push_str("],\n");
-            } else {
-                write!(
-                    &mut buffer,
-                    "{:indent$}name: \"{}\",\n",
-                    "",
-                    escape_string(&flags[0]),
-                    indent = indent + 4
-                )
-                .unwrap();
-            }
-
-            if let Some(data) = flag.get_help() {
-                write!(
-                    &mut buffer,
-                    "{:indent$}description: \"{}\",\n",
-                    "",
-                    escape_string(&data.to_string()).as_str(),
-                    indent = indent + 4
-                )
-                .unwrap();
-            }
-
-            let conflicts = arg_conflicts(cmd, &flag);
-
-            if !conflicts.is_empty() {
-                write!(
-                    &mut buffer,
-                    "{:indent$}exclusiveOn: [\n",
-                    "",
-                    indent = indent + 4
-                )
-                .unwrap();
-
-                for conflict in conflicts {
-                    write!(
-                        &mut buffer,
-                        "{:indent$}\"{}\",\n",
-                        "",
-                        escape_string(&conflict),
-                        indent = indent + 6
-                    )
-                    .unwrap();
-                }
-
-                write!(&mut buffer, "{:indent$}],\n", "", indent = indent + 4).unwrap();
-            }
-
-            if let ArgAction::Set | ArgAction::Append | ArgAction::Count = flag.get_action() {
-                write!(
-                    &mut buffer,
-                    "{:indent$}isRepeatable: true,\n",
-                    "",
-                    indent = indent + 4
-                )
-                .unwrap();
-            }
-
-            write!(&mut buffer, "{:indent$}}},\n", "", indent = indent + 2).unwrap();
-        }
-
-        write!(&mut buffer, "{:indent$}],\n", "").unwrap();
-    }
-
-    buffer
-}
-
-fn gen_args(arg: &Arg, indent: usize) -> String {
-    if !arg.get_num_args().expect("built").takes_values() {
-        return "".to_string();
-    }
-
-    let mut buffer = String::new();
-
-    write!(
-        &mut buffer,
-        "{{\n{:indent$}  name: \"{}\",\n",
-        "",
-        escape_string(arg.get_id().as_str()),
-        indent = indent
-    )
-    .unwrap();
-
-    let num_args = arg.get_num_args().expect("built");
-    if num_args != builder::ValueRange::EMPTY && num_args != builder::ValueRange::SINGLE {
-        write!(
-            &mut buffer,
-            "{:indent$}isVariadic: true,\n",
-            "",
-            indent = indent + 2
-        )
-        .unwrap();
-    }
-
-    if !arg.is_required_set() {
-        write!(
-            &mut buffer,
-            "{:indent$}isOptional: true,\n",
-            "",
-            indent = indent + 2
-        )
-        .unwrap();
-    }
-
-    if let Some(data) = generator::utils::possible_values(arg) {
-        write!(
-            &mut buffer,
-            "{:indent$}suggestions: [\n",
-            "",
-            indent = indent + 2
-        )
-        .unwrap();
-
-        for value in data {
-            if let Some(help) = value.get_help() {
-                write!(
-                    &mut buffer,
-                    "{:indent$}{{\n{:indent$}  name: \"{}\",\n",
-                    "",
-                    "",
-                    escape_string(value.get_name()),
-                    indent = indent + 4,
-                )
-                .unwrap();
-
-                write!(
-                    &mut buffer,
-                    "{:indent$}description: \"{}\",\n",
-                    "",
-                    escape_string(&help.to_string()),
-                    indent = indent + 6
-                )
-                .unwrap();
-
-                write!(&mut buffer, "{:indent$}}},\n", "", indent = indent + 4).unwrap();
-            } else {
-                write!(
-                    &mut buffer,
-                    "{:indent$}\"{}\",\n",
-                    "",
-                    escape_string(value.get_name()),
-                    indent = indent + 4,
-                )
-                .unwrap();
-            }
-        }
-
-        write!(&mut buffer, "{:indent$}],\n", "", indent = indent + 2).unwrap();
-    } else {
-        match arg.get_value_hint() {
-            ValueHint::AnyPath | ValueHint::FilePath | ValueHint::ExecutablePath => {
-                write!(
-                    &mut buffer,
-                    "{:indent$}template: \"filepaths\",\n",
-                    "",
-                    indent = indent + 2
-                )
-                .unwrap();
-            }
-            ValueHint::DirPath => {
-                write!(
-                    &mut buffer,
-                    "{:indent$}template: \"folders\",\n",
-                    "",
-                    indent = indent + 2
-                )
-                .unwrap();
-            }
-            ValueHint::CommandString | ValueHint::CommandName | ValueHint::CommandWithArguments => {
-                write!(
-                    &mut buffer,
-                    "{:indent$}isCommand: true,\n",
-                    "",
-                    indent = indent + 2
-                )
-                .unwrap();
-            }
-            // Disable completion for others
-            _ => (),
-        };
-    };
-
-    write!(&mut buffer, "{:indent$}}},\n", "").unwrap();
-
-    buffer
-}
-
-fn arg_conflicts(cmd: &Command, arg: &Arg) -> Vec<String> {
-    let mut res = vec![];
-
-    for conflict in cmd.get_arg_conflicts_with(arg) {
-        if let Some(s) = conflict.get_short() {
-            res.push(format!("-{}", escape_string(&s.to_string())));
-        }
-
-        if let Some(l) = conflict.get_long() {
-            res.push(format!("--{}", escape_string(l)));
-        }
-    }
-
-    res
-}
diff --git a/clap_complete_fig/src/lib.rs b/clap_complete_fig/src/lib.rs
deleted file mode 100644
index 8232ab0a821..00000000000
--- a/clap_complete_fig/src/lib.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// `clap_complete_fig` is distributed under the terms of both the MIT license and the Apache License
-// (Version 2.0).
-// See the [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) files in this repository
-// for more information.
-
-//! Generates [Fig](https://github.com/withfig/autocomplete) completions for [`clap`](https://github.com/clap-rs/clap) based CLIs
-
-#![doc(html_logo_url = "https://raw.githubusercontent.com/clap-rs/clap/master/assets/clap.png")]
-#![cfg_attr(docsrs, feature(doc_auto_cfg))]
-#![forbid(unsafe_code)]
-#![warn(missing_docs)]
-#![warn(clippy::print_stderr)]
-#![warn(clippy::print_stdout)]
-
-mod fig;
-pub use fig::Fig;


Test patch:
diff --git a/clap_complete_fig/tests/common.rs b/clap_complete_fig/tests/common.rs
deleted file mode 100644
index b36d27771ae..00000000000
--- a/clap_complete_fig/tests/common.rs
+++ /dev/null
@@ -1,269 +0,0 @@
-#![allow(dead_code)]
-
-use snapbox::prelude::*;
-
-pub(crate) fn basic_command(name: &'static str) -> clap::Command {
-    clap::Command::new(name)
-        .arg(
-            clap::Arg::new("config")
-                .short('c')
-                .global(true)
-                .action(clap::ArgAction::SetTrue),
-        )
-        .arg(
-            clap::Arg::new("v")
-                .short('v')
-                .conflicts_with("config")
-                .action(clap::ArgAction::SetTrue),
-        )
-        .subcommand(
-            clap::Command::new("test")
-                .about("Subcommand\nwith a second line")
-                .arg(
-                    clap::Arg::new("debug")
-                        .short('d')
-                        .action(clap::ArgAction::Count),
-                ),
-        )
-}
-
-pub(crate) fn feature_sample_command(name: &'static str) -> clap::Command {
-    clap::Command::new(name)
-        .version("3.0")
-        .propagate_version(true)
-        .about("Tests completions")
-        .arg(
-            clap::Arg::new("file")
-                .value_hint(clap::ValueHint::FilePath)
-                .help("some input file"),
-        )
-        .arg(
-            clap::Arg::new("config")
-                .action(clap::ArgAction::Count)
-                .help("some config file")
-                .short('c')
-                .visible_short_alias('C')
-                .long("config")
-                .visible_alias("conf"),
-        )
-        .arg(clap::Arg::new("choice").value_parser(["first", "second"]))
-        .subcommand(
-            clap::Command::new("test").about("tests things").arg(
-                clap::Arg::new("case")
-                    .long("case")
-                    .action(clap::ArgAction::Set)
-                    .help("the case to test"),
-            ),
-        )
-}
-
-pub(crate) fn special_commands_command(name: &'static str) -> clap::Command {
-    feature_sample_command(name)
-        .subcommand(
-            clap::Command::new("some_cmd")
-                .about("tests other things")
-                .arg(
-                    clap::Arg::new("config")
-                        .long("config")
-                        .hide(true)
-                        .action(clap::ArgAction::Set)
-                        .require_equals(true)
-                        .help("the other case to test"),
-                )
-                .arg(clap::Arg::new("path").num_args(1..)),
-        )
-        .subcommand(clap::Command::new("some-cmd-with-hyphens").alias("hyphen"))
-        .subcommand(clap::Command::new("some-hidden-cmd").hide(true))
-}
-
-pub(crate) fn quoting_command(name: &'static str) -> clap::Command {
-    clap::Command::new(name)
-        .version("3.0")
-        .arg(
-            clap::Arg::new("single-quotes")
-                .long("single-quotes")
-                .action(clap::ArgAction::SetTrue)
-                .help("Can be 'always', 'auto', or 'never'"),
-        )
-        .arg(
-            clap::Arg::new("double-quotes")
-                .long("double-quotes")
-                .action(clap::ArgAction::SetTrue)
-                .help("Can be \"always\", \"auto\", or \"never\""),
-        )
-        .arg(
-            clap::Arg::new("backticks")
-                .long("backticks")
-                .action(clap::ArgAction::SetTrue)
-                .help("For more information see `echo test`"),
-        )
-        .arg(
-            clap::Arg::new("backslash")
-                .long("backslash")
-                .action(clap::ArgAction::SetTrue)
-                .help("Avoid '\\n'"),
-        )
-        .arg(
-            clap::Arg::new("brackets")
-                .long("brackets")
-                .action(clap::ArgAction::SetTrue)
-                .help("List packages [filter]"),
-        )
-        .arg(
-            clap::Arg::new("expansions")
-                .long("expansions")
-                .action(clap::ArgAction::SetTrue)
-                .help("Execute the shell command with $SHELL"),
-        )
-        .subcommands([
-            clap::Command::new("cmd-single-quotes").about("Can be 'always', 'auto', or 'never'"),
-            clap::Command::new("cmd-double-quotes")
-                .about("Can be \"always\", \"auto\", or \"never\""),
-            clap::Command::new("cmd-backticks").about("For more information see `echo test`"),
-            clap::Command::new("cmd-backslash").about("Avoid '\\n'"),
-            clap::Command::new("cmd-brackets").about("List packages [filter]"),
-            clap::Command::new("cmd-expansions").about("Execute the shell command with $SHELL"),
-        ])
-}
-
-pub(crate) fn aliases_command(name: &'static str) -> clap::Command {
-    clap::Command::new(name)
-        .version("3.0")
-        .about("testing bash completions")
-        .arg(
-            clap::Arg::new("flag")
-                .short('f')
-                .visible_short_alias('F')
-                .long("flag")
-                .action(clap::ArgAction::SetTrue)
-                .visible_alias("flg")
-                .help("cmd flag"),
-        )
-        .arg(
-            clap::Arg::new("option")
-                .short('o')
-                .visible_short_alias('O')
-                .long("option")
-                .visible_alias("opt")
-                .help("cmd option")
-                .action(clap::ArgAction::Set),
-        )
-        .arg(clap::Arg::new("positional"))
-}
-
-pub(crate) fn sub_subcommands_command(name: &'static str) -> clap::Command {
-    feature_sample_command(name).subcommand(
-        clap::Command::new("some_cmd")
-            .about("top level subcommand")
-            .subcommand(
-                clap::Command::new("sub_cmd").about("sub-subcommand").arg(
-                    clap::Arg::new("config")
-                        .long("config")
-                        .action(clap::ArgAction::Set)
-                        .value_parser([clap::builder::PossibleValue::new(
-                            "Lest quotes aren't escaped.",
-                        )])
-                        .help("the other case to test"),
-                ),
-            ),
-    )
-}
-
-pub(crate) fn value_hint_command(name: &'static str) -> clap::Command {
-    clap::Command::new(name)
-        .arg(
-            clap::Arg::new("choice")
-                .long("choice")
-                .action(clap::ArgAction::Set)
-                .value_parser(["bash", "fish", "zsh"]),
-        )
-        .arg(
-            clap::Arg::new("unknown")
-                .long("unknown")
-                .value_hint(clap::ValueHint::Unknown),
-        )
-        .arg(
-            clap::Arg::new("other")
-                .long("other")
-                .value_hint(clap::ValueHint::Other),
-        )
-        .arg(
-            clap::Arg::new("path")
-                .long("path")
-                .short('p')
-                .value_hint(clap::ValueHint::AnyPath),
-        )
-        .arg(
-            clap::Arg::new("file")
-                .long("file")
-                .short('f')
-                .value_hint(clap::ValueHint::FilePath),
-        )
-        .arg(
-            clap::Arg::new("dir")
-                .long("dir")
-                .short('d')
-                .value_hint(clap::ValueHint::DirPath),
-        )
-        .arg(
-            clap::Arg::new("exe")
-                .long("exe")
-                .short('e')
-                .value_hint(clap::ValueHint::ExecutablePath),
-        )
-        .arg(
-            clap::Arg::new("cmd_name")
-                .long("cmd-name")
-                .value_hint(clap::ValueHint::CommandName),
-        )
-        .arg(
-            clap::Arg::new("cmd")
-                .long("cmd")
-                .short('c')
-                .value_hint(clap::ValueHint::CommandString),
-        )
-        .arg(
-            clap::Arg::new("command_with_args")
-                .action(clap::ArgAction::Set)
-                .num_args(1..)
-                .trailing_var_arg(true)
-                .value_hint(clap::ValueHint::CommandWithArguments),
-        )
-        .arg(
-            clap::Arg::new("user")
-                .short('u')
-                .long("user")
-                .value_hint(clap::ValueHint::Username),
-        )
-        .arg(
-            clap::Arg::new("host")
-                .short('H')
-                .long("host")
-                .value_hint(clap::ValueHint::Hostname),
-        )
-        .arg(
-            clap::Arg::new("url")
-                .long("url")
-                .value_hint(clap::ValueHint::Url),
-        )
-        .arg(
-            clap::Arg::new("email")
-                .long("email")
-                .value_hint(clap::ValueHint::EmailAddress),
-        )
-}
-
-pub(crate) fn assert_matches(
-    expected: impl IntoData,
-    gen: impl clap_complete::Generator,
-    mut cmd: clap::Command,
-    name: &'static str,
-) {
-    let mut buf = vec![];
-    clap_complete::generate(gen, &mut cmd, name, &mut buf);
-
-    snapbox::Assert::new()
-        .action_env(snapbox::assert::DEFAULT_ACTION_ENV)
-        .normalize_paths(false)
-        .eq(buf, expected);
-}
diff --git a/clap_complete_fig/tests/fig.rs b/clap_complete_fig/tests/fig.rs
deleted file mode 100644
index 60702f5a44b..00000000000
--- a/clap_complete_fig/tests/fig.rs
+++ /dev/null
@@ -1,85 +0,0 @@
-mod common;
-
-#[test]
-fn basic() {
-    let name = "my-app";
-    let cmd = common::basic_command(name);
-    common::assert_matches(
-        snapbox::file!["snapshots/basic.fig.js"],
-        clap_complete_fig::Fig,
-        cmd,
-        name,
-    );
-}
-
-#[test]
-fn feature_sample() {
-    let name = "my-app";
-    let cmd = common::feature_sample_command(name);
-    common::assert_matches(
-        snapbox::file!["snapshots/feature_sample.fig.js"],
-        clap_complete_fig::Fig,
-        cmd,
-        name,
-    );
-}
-
-#[test]
-fn special_commands() {
-    let name = "my-app";
-    let cmd = common::special_commands_command(name);
-    common::assert_matches(
-        snapbox::file!["snapshots/special_commands.fig.js"],
-        clap_complete_fig::Fig,
-        cmd,
-        name,
-    );
-}
-
-#[test]
-fn quoting() {
-    let name = "my-app";
-    let cmd = common::quoting_command(name);
-    common::assert_matches(
-        snapbox::file!["snapshots/quoting.fig.js"],
-        clap_complete_fig::Fig,
-        cmd,
-        name,
-    );
-}
-
-#[test]
-fn aliases() {
-    let name = "my-app";
-    let cmd = common::aliases_command(name);
-    common::assert_matches(
-        snapbox::file!["snapshots/aliases.fig.js"],
-        clap_complete_fig::Fig,
-        cmd,
-        name,
-    );
-}
-
-#[test]
-fn sub_subcommands() {
-    let name = "my-app";
-    let cmd = common::sub_subcommands_command(name);
-    common::assert_matches(
-        snapbox::file!["snapshots/sub_subcommands.fig.js"],
-        clap_complete_fig::Fig,
-        cmd,
-        name,
-    );
-}
-
-#[test]
-fn value_hint() {
-    let name = "my-app";
-    let cmd = common::value_hint_command(name);
-    common::assert_matches(
-        snapbox::file!["snapshots/value_hint.fig.js"],
-        clap_complete_fig::Fig,
-        cmd,
-        name,
-    );
-}
diff --git a/clap_complete_fig/tests/snapshots/aliases.fig.js b/clap_complete_fig/tests/snapshots/aliases.fig.js
deleted file mode 100644
index 678c3a8a98b..00000000000
--- a/clap_complete_fig/tests/snapshots/aliases.fig.js
+++ /dev/null
@@ -1,33 +0,0 @@
-const completion: Fig.Spec = {
-  name: "my-app",
-  description: "testing bash completions",
-  options: [
-    {
-      name: ["-o", "-O", "--option", "--opt"],
-      description: "cmd option",
-      isRepeatable: true,
-      args: {
-        name: "option",
-        isOptional: true,
-      },
-    },
-    {
-      name: ["-f", "-F", "--flag", "--flg"],
-      description: "cmd flag",
-    },
-    {
-      name: ["-h", "--help"],
-      description: "Print help",
-    },
-    {
-      name: ["-V", "--version"],
-      description: "Print version",
-    },
-  ],
-  args: {
-    name: "positional",
-    isOptional: true,
-  },
-};
-
-export default completion;
diff --git a/clap_complete_fig/tests/snapshots/basic.fig.js b/clap_complete_fig/tests/snapshots/basic.fig.js
deleted file mode 100644
index 5c9b929c57a..00000000000
--- a/clap_complete_fig/tests/snapshots/basic.fig.js
+++ /dev/null
@@ -1,54 +0,0 @@
-const completion: Fig.Spec = {
-  name: "my-app",
-  description: "",
-  subcommands: [
-    {
-      name: "test",
-      description: "Subcommand with a second line",
-      options: [
-        {
-          name: "-d",
-          isRepeatable: true,
-        },
-        {
-          name: "-c",
-        },
-        {
-          name: ["-h", "--help"],
-          description: "Print help",
-        },
-      ],
-    },
-    {
-      name: "help",
-      description: "Print this message or the help of the given subcommand(s)",
-      subcommands: [
-        {
-          name: "test",
-          description: "Subcommand with a second line",
-        },
-        {
-          name: "help",
-          description: "Print this message or the help of the given subcommand(s)",
-        },
-      ],
-    },
-  ],
-  options: [
-    {
-      name: "-c",
-    },
-    {
-      name: "-v",
-      exclusiveOn: [
-        "-c",
-      ],
-    },
-    {
-      name: ["-h", "--help"],
-      description: "Print help",
-    },
-  ],
-};
-
-export default completion;
diff --git a/clap_complete_fig/tests/snapshots/feature_sample.fig.js b/clap_complete_fig/tests/snapshots/feature_sample.fig.js
deleted file mode 100644
index e5d8d4a3e16..00000000000
--- a/clap_complete_fig/tests/snapshots/feature_sample.fig.js
+++ /dev/null
@@ -1,75 +0,0 @@
-const completion: Fig.Spec = {
-  name: "my-app",
-  description: "Tests completions",
-  subcommands: [
-    {
-      name: "test",
-      description: "tests things",
-      options: [
-        {
-          name: "--case",
-          description: "the case to test",
-          isRepeatable: true,
-          args: {
-            name: "case",
-            isOptional: true,
-          },
-        },
-        {
-          name: ["-h", "--help"],
-          description: "Print help",
-        },
-        {
-          name: ["-V", "--version"],
-          description: "Print version",
-        },
-      ],
-    },
-    {
-      name: "help",
-      description: "Print this message or the help of the given subcommand(s)",
-      subcommands: [
-        {
-          name: "test",
-          description: "tests things",
-        },
-        {
-          name: "help",
-          description: "Print this message or the help of the given subcommand(s)",
-        },
-      ],
-    },
-  ],
-  options: [
-    {
-      name: ["-c", "-C", "--config", "--conf"],
-      description: "some config file",
-      isRepeatable: true,
-    },
-    {
-      name: ["-h", "--help"],
-      description: "Print help",
-    },
-    {
-      name: ["-V", "--version"],
-      description: "Print version",
-    },
-  ],
-  args: [
-    {
-      name: "file",
-      isOptional: true,
-      template: "filepaths",
-    },
-    {
-      name: "choice",
-      isOptional: true,
-      suggestions: [
-        "first",
-        "second",
-      ],
-    },
-  ]
-};
-
-export default completion;
diff --git a/clap_complete_fig/tests/snapshots/quoting.fig.js b/clap_complete_fig/tests/snapshots/quoting.fig.js
deleted file mode 100644
index 31c244d2b4b..00000000000
--- a/clap_complete_fig/tests/snapshots/quoting.fig.js
+++ /dev/null
@@ -1,136 +0,0 @@
-const completion: Fig.Spec = {
-  name: "my-app",
-  description: "",
-  subcommands: [
-    {
-      name: "cmd-single-quotes",
-      description: "Can be 'always', 'auto', or 'never'",
-      options: [
-        {
-          name: ["-h", "--help"],
-          description: "Print help",
-        },
-      ],
-    },
-    {
-      name: "cmd-double-quotes",
-      description: "Can be \"always\", \"auto\", or \"never\"",
-      options: [
-        {
-          name: ["-h", "--help"],
-          description: "Print help",
-        },
-      ],
-    },
-    {
-      name: "cmd-backticks",
-      description: "For more information see `echo test`",
-      options: [
-        {
-          name: ["-h", "--help"],
-          description: "Print help",
-        },
-      ],
-    },
-    {
-      name: "cmd-backslash",
-      description: "Avoid '\\n'",
-      options: [
-        {
-          name: ["-h", "--help"],
-          description: "Print help",
-        },
-      ],
-    },
-    {
-      name: "cmd-brackets",
-      description: "List packages [filter]",
-      options: [
-        {
-          name: ["-h", "--help"],
-          description: "Print help",
-        },
-      ],
-    },
-    {
-      name: "cmd-expansions",
-      description: "Execute the shell command with $SHELL",
-      options: [
-        {
-          name: ["-h", "--help"],
-          description: "Print help",
-        },
-      ],
-    },
-    {
-      name: "help",
-      description: "Print this message or the help of the given subcommand(s)",
-      subcommands: [
-        {
-          name: "cmd-single-quotes",
-          description: "Can be 'always', 'auto', or 'never'",
-        },
-        {
-          name: "cmd-double-quotes",
-          description: "Can be \"always\", \"auto\", or \"never\"",
-        },
-        {
-          name: "cmd-backticks",
-          description: "For more information see `echo test`",
-        },
-        {
-          name: "cmd-backslash",
-          description: "Avoid '\\n'",
-        },
-        {
-          name: "cmd-brackets",
-          description: "List packages [filter]",
-        },
-        {
-          name: "cmd-expansions",
-          description: "Execute the shell command with $SHELL",
-        },
-        {
-          name: "help",
-          description: "Print this message or the help of the given subcommand(s)",
-        },
-      ],
-    },
-  ],
-  options: [
-    {
-      name: "--single-quotes",
-      description: "Can be 'always', 'auto', or 'never'",
-    },
-    {
-      name: "--double-quotes",
-      description: "Can be \"always\", \"auto\", or \"never\"",
-    },
-    {
-      name: "--backticks",
-      description: "For more information see `echo test`",
-    },
-    {
-      name: "--backslash",
-      description: "Avoid '\\n'",
-    },
-    {
-      name: "--brackets",
-      description: "List packages [filter]",
-    },
-    {
-      name: "--expansions",
-      description: "Execute the shell command with $SHELL",
-    },
-    {
-      name: ["-h", "--help"],
-      description: "Print help",
-    },
-    {
-      name: ["-V", "--version"],
-      description: "Print version",
-    },
-  ],
-};
-
-export default completion;
diff --git a/clap_complete_fig/tests/snapshots/special_commands.fig.js b/clap_complete_fig/tests/snapshots/special_commands.fig.js
deleted file mode 100644
index 591e3ba5572..00000000000
--- a/clap_complete_fig/tests/snapshots/special_commands.fig.js
+++ /dev/null
@@ -1,143 +0,0 @@
-const completion: Fig.Spec = {
-  name: "my-app",
-  description: "Tests completions",
-  subcommands: [
-    {
-      name: "test",
-      description: "tests things",
-      options: [
-        {
-          name: "--case",
-          description: "the case to test",
-          isRepeatable: true,
-          args: {
-            name: "case",
-            isOptional: true,
-          },
-        },
-        {
-          name: ["-h", "--help"],
-          description: "Print help",
-        },
-        {
-          name: ["-V", "--version"],
-          description: "Print version",
-        },
-      ],
-    },
-    {
-      name: "some_cmd",
-      description: "tests other things",
-      options: [
-        {
-          name: "--config",
-          description: "the other case to test",
-          hidden: true,
-          isRepeatable: true,
-          requiresEquals: true,
-          args: {
-            name: "config",
-            isOptional: true,
-          },
-        },
-        {
-          name: ["-h", "--help"],
-          description: "Print help",
-        },
-        {
-          name: ["-V", "--version"],
-          description: "Print version",
-        },
-      ],
-      args: {
-        name: "path",
-        isVariadic: true,
-        isOptional: true,
-      },
-    },
-    {
-      name: ["some-cmd-with-hyphens", "hyphen"],
-      options: [
-        {
-          name: ["-h", "--help"],
-          description: "Print help",
-        },
-        {
-          name: ["-V", "--version"],
-          description: "Print version",
-        },
-      ],
-    },
-    {
-      name: "some-hidden-cmd",
-      hidden: true,
-      options: [
-        {
-          name: ["-h", "--help"],
-          description: "Print help",
-        },
-        {
-          name: ["-V", "--version"],
-          description: "Print version",
-        },
-      ],
-    },
-    {
-      name: "help",
-      description: "Print this message or the help of the given subcommand(s)",
-      subcommands: [
-        {
-          name: "test",
-          description: "tests things",
-        },
-        {
-          name: "some_cmd",
-          description: "tests other things",
-        },
-        {
-          name: "some-cmd-with-hyphens",
-        },
-        {
-          name: "some-hidden-cmd",
-          hidden: true,
-        },
-        {
-          name: "help",
-          description: "Print this message or the help of the given subcommand(s)",
-        },
-      ],
-    },
-  ],
-  options: [
-    {
-      name: ["-c", "-C", "--config", "--conf"],
-      description: "some config file",
-      isRepeatable: true,
-    },
-    {
-      name: ["-h", "--help"],
-      description: "Print help",
-    },
-    {
-      name: ["-V", "--version"],
-      description: "Print version",
-    },
-  ],
-  args: [
-    {
-      name: "file",
-      isOptional: true,
-      template: "filepaths",
-    },
-    {
-      name: "choice",
-      isOptional: true,
-      suggestions: [
-        "first",
-        "second",
-      ],
-    },
-  ]
-};
-
-export default completion;
diff --git a/clap_complete_fig/tests/snapshots/sub_subcommands.fig.js b/clap_complete_fig/tests/snapshots/sub_subcommands.fig.js
deleted file mode 100644
index bdea7422ebe..00000000000
--- a/clap_complete_fig/tests/snapshots/sub_subcommands.fig.js
+++ /dev/null
@@ -1,141 +0,0 @@
-const completion: Fig.Spec = {
-  name: "my-app",
-  description: "Tests completions",
-  subcommands: [
-    {
-      name: "test",
-      description: "tests things",
-      options: [
-        {
-          name: "--case",
-          description: "the case to test",
-          isRepeatable: true,
-          args: {
-            name: "case",
-            isOptional: true,
-          },
-        },
-        {
-          name: ["-h", "--help"],
-          description: "Print help",
-        },
-        {
-          name: ["-V", "--version"],
-          description: "Print version",
-        },
-      ],
-    },
-    {
-      name: "some_cmd",
-      description: "top level subcommand",
-      subcommands: [
-        {
-          name: "sub_cmd",
-          description: "sub-subcommand",
-          options: [
-            {
-              name: "--config",
-              description: "the other case to test",
-              isRepeatable: true,
-              args: {
-                name: "config",
-                isOptional: true,
-                suggestions: [
-                  "Lest quotes aren't escaped.",
-                ],
-              },
-            },
-            {
-              name: ["-h", "--help"],
-              description: "Print help",
-            },
-            {
-              name: ["-V", "--version"],
-              description: "Print version",
-            },
-          ],
-        },
-        {
-          name: "help",
-          description: "Print this message or the help of the given subcommand(s)",
-          subcommands: [
-            {
-              name: "sub_cmd",
-              description: "sub-subcommand",
-            },
-            {
-              name: "help",
-              description: "Print this message or the help of the given subcommand(s)",
-            },
-          ],
-        },
-      ],
-      options: [
-        {
-          name: ["-h", "--help"],
-          description: "Print help",
-        },
-        {
-          name: ["-V", "--version"],
-          description: "Print version",
-        },
-      ],
-    },
-    {
-      name: "help",
-      description: "Print this message or the help of the given subcommand(s)",
-      subcommands: [
-        {
-          name: "test",
-          description: "tests things",
-        },
-        {
-          name: "some_cmd",
-          description: "top level subcommand",
-          subcommands: [
-            {
-              name: "sub_cmd",
-              description: "sub-subcommand",
-            },
-          ],
-        },
-        {
-          name: "help",
-          description: "Print this message or the help of the given subcommand(s)",
-        },
-      ],
-    },
-  ],
-  options: [
-    {
-      name: ["-c", "-C", "--config", "--conf"],
-      description: "some config file",
-      isRepeatable: true,
-    },
-    {
-      name: ["-h", "--help"],
-      description: "Print help",
-    },
-    {
-      name: ["-V", "--version"],
-      description: "Print version",
-    },
-  ],
-  args: [
-    {
-      name: "file",
-      isOptional: true,
-      template: "filepaths",
-    },
-    {
-      name: "choice",
-      isOptional: true,
-      suggestions: [
-        "first",
-        "second",
-      ],
-    },
-  ]
-};
-
-export default completion;
diff --git a/clap_complete_fig/tests/snapshots/value_hint.fig.js b/clap_complete_fig/tests/snapshots/value_hint.fig.js
deleted file mode 100644
index 5fa6d4ce50d..00000000000
--- a/clap_complete_fig/tests/snapshots/value_hint.fig.js
+++ /dev/null
@@ -1,133 +0,0 @@
-const completion: Fig.Spec = {
-  name: "my-app",
-  description: "",
-  options: [
-    {
-      name: "--choice",
-      isRepeatable: true,
-      args: {
-        name: "choice",
-        isOptional: true,
-        suggestions: [
-          "bash",
-          "fish",
-          "zsh",
-        ],
-      },
-    },
-    {
-      name: "--unknown",
-      isRepeatable: true,
-      args: {
-        name: "unknown",
-        isOptional: true,
-      },
-    },
-    {
-      name: "--other",
-      isRepeatable: true,
-      args: {
-        name: "other",
-        isOptional: true,
-      },
-    },
-    {
-      name: ["-p", "--path"],
-      isRepeatable: true,
-      args: {
-        name: "path",
-        isOptional: true,
-        template: "filepaths",
-      },
-    },
-    {
-      name: ["-f", "--file"],
-      isRepeatable: true,
-      args: {
-        name: "file",
-        isOptional: true,
-        template: "filepaths",
-      },
-    },
-    {
-      name: ["-d", "--dir"],
-      isRepeatable: true,
-      args: {
-        name: "dir",
-        isOptional: true,
-        template: "folders",
-      },
-    },
-    {
-      name: ["-e", "--exe"],
-      isRepeatable: true,
-      args: {
-        name: "exe",
-        isOptional: true,
-        template: "filepaths",
-      },
-    },
-    {
-      name: "--cmd-name",
-      isRepeatable: true,
-      args: {
-        name: "cmd_name",
-        isOptional: true,
-        isCommand: true,
-      },
-    },
-    {
-      name: ["-c", "--cmd"],
-      isRepeatable: true,
-      args: {
-        name: "cmd",
-        isOptional: true,
-        isCommand: true,
-      },
-    },
-    {
-      name: ["-u", "--user"],
-      isRepeatable: true,
-      args: {
-        name: "user",
-        isOptional: true,
-      },
-    },
-    {
-      name: ["-H", "--host"],
-      isRepeatable: true,
-      args: {
-        name: "host",
-        isOptional: true,
-      },
-    },
-    {
-      name: "--url",
-      isRepeatable: true,
-      args: {
-        name: "url",
-        isOptional: true,
-      },
-    },
-    {
-      name: "--email",
-      isRepeatable: true,
-      args: {
-        name: "email",
-        isOptional: true,
-      },
-    },
-    {
-      name: ["-h", "--help"],
-      description: "Print help",
-    },
-  ],
-  args: {
-    name: "command_with_args",
-    isVariadic: true,
-    isOptional: true,
-    isCommand: true,
-  },
-};
-
-export default completion;