Skip to content

Commit

Permalink
In spin new/add, display only templates compatible with current command
Browse files Browse the repository at this point in the history
Signed-off-by: itowlson <[email protected]>
  • Loading branch information
itowlson committed Jan 21, 2025
1 parent 70f2d54 commit f5f501c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/commands/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ async fn prompt_template(

let opts = templates
.iter()
.filter(|t| t.supports_variant(variant))
.map(|t| format!("{} ({})", t.id(), t.description_or_empty()))
.collect::<Vec<_>>();
let noun = variant.prompt_noun();
Expand Down

0 comments on commit f5f501c

Please sign in to comment.