From 059db0c1394a904cc83bed3cac2d9c5d6cef7bb0 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 4 Sep 2024 14:26:44 -0500 Subject: [PATCH] docs(complete): Clarify what flags we're using --- clap_complete/src/env/shells.rs | 2 +- .../exhaustive/fish/fish/completions/exhaustive.fish | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clap_complete/src/env/shells.rs b/clap_complete/src/env/shells.rs index 2c527d94..2d177168 100644 --- a/clap_complete/src/env/shells.rs +++ b/clap_complete/src/env/shells.rs @@ -226,7 +226,7 @@ impl EnvCompleter for Fish { writeln!( buf, - r#"complete -x -c {bin} -a "({var}=fish "'{completer}'" -- (commandline --current-process --tokenize --cut-at-cursor) (commandline --current-token))""# + r#"complete --exclusive --command {bin} --arguments "({var}=fish "'{completer}'" -- (commandline --current-process --tokenize --cut-at-cursor) (commandline --current-token))""# ) } fn write_complete( diff --git a/clap_complete/tests/snapshots/home/dynamic-env/exhaustive/fish/fish/completions/exhaustive.fish b/clap_complete/tests/snapshots/home/dynamic-env/exhaustive/fish/fish/completions/exhaustive.fish index 0aae8215..b36cb34a 100644 --- a/clap_complete/tests/snapshots/home/dynamic-env/exhaustive/fish/fish/completions/exhaustive.fish +++ b/clap_complete/tests/snapshots/home/dynamic-env/exhaustive/fish/fish/completions/exhaustive.fish @@ -1 +1 @@ -complete -x -c exhaustive -a "(COMPLETE=fish "'exhaustive'" -- (commandline --current-process --tokenize --cut-at-cursor) (commandline --current-token))" +complete --exclusive --command exhaustive --arguments "(COMPLETE=fish "'exhaustive'" -- (commandline --current-process --tokenize --cut-at-cursor) (commandline --current-token))"