We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 281f8ae commit 4a86feeCopy full SHA for 4a86fee
1 file changed
clap_complete/tests/testsuite/engine.rs
@@ -263,6 +263,27 @@ goodbye-world
263
);
264
}
265
266
+#[test]
267
+fn suggest_subcommand_positional_after_escape() {
268
+ let mut cmd = Command::new("exhaustive").subcommand(Command::new("hello-world").arg(
269
+ clap::Arg::new("hello-world").value_parser([
270
+ PossibleValue::new("hello-world").help("Say hello to the world"),
271
+ "hello-moon".into(),
272
+ "goodbye-world".into(),
273
+ ]),
274
+ ));
275
+
276
+ assert_data_eq!(
277
+ complete!(cmd, "hello-world -- [TAB]"),
278
+ snapbox::str![[r#"
279
+hello-world Say hello to the world
280
+hello-moon
281
+goodbye-world
282
+--help Print help (see more with '--help')
283
+"#]],
284
+ );
285
+}
286
287
#[test]
288
fn suggest_argument_value() {
289
let mut cmd = Command::new("dynamic")
0 commit comments