spectre.console
spectre.console copied to clipboard
Alias for Branches
Would it be possible to add command like configurations, e.g. Alias and Description for branches? I am having an issue where my branch names are becoming fairly long, and would improve ease of use of my CLI if descriptions and aliases for branches were avaialable.
app.Configure(config =>
{
config.AddBranch<AddSettings>("add", add =>
{
add.Alias("a") // <-- or something similar
add.SetDescription("Add something");
add.AddCommand<AddPackageCommand>("package");
add.AddCommand<AddReferenceCommand>("reference");
})
});
@chrisdanna That sounds like a reasonable thing to add, and I can't see any problems with it. What do you think @phil-scott-78?
Personally I've run into the need once, too. The issue for me was the fact that users might expect or prefer a different name, e.g. add
/set
instead of insert
for branches that "add" multiple different things with a "subcommand" inside the branch.
That being said I wonder if it should be AddAlias(es)
and allow multiple aliases. I'm curious how to display the alias(es) in the help text 🤔
I see nothing wrong with adding it. It'd be a nice addition 👍
Hello, Can I try to fix this ?
@idormenco That would be great! 👍
How's it going @idormenco? 😄
Any news?
Hi @AlexSuprunQuali , sorry I did not worked on this issue. Please unassign me
Added PR addressing this issue, check #1131
All, thanks to @ilyahryapko you can now add an alias to a branch. This functionality has now been merged into main.