From 8f4797a38bf154f03f3ea5ca858d99cdee306442 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Mon, 3 Feb 2020 13:47:15 -0600 Subject: [PATCH] Update `cargo` completions to use dynamic `--example` options [ci skip] --- share/completions/cargo.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/completions/cargo.fish b/share/completions/cargo.fish index fa224265d..bd0736d4e 100644 --- a/share/completions/cargo.fish +++ b/share/completions/cargo.fish @@ -35,7 +35,7 @@ end for x in bench build run rustc test complete -c cargo -x -n "__fish_seen_subcommand_from $x" -l bin -d 'Only the specified binary' - complete -c cargo -x -n "__fish_seen_subcommand_from $x" -l example -d 'Only the specified example' + complete -c cargo -x -n "__fish_seen_subcommand_from $x" -l example -a "(cargo run --example 2>&1 | string replace -rf '^\s+' '')" end for x in build run rustc test