Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verb aliases #90

Open
kirillkovalenko opened this issue Aug 20, 2013 · 11 comments
Open

Verb aliases #90

kirillkovalenko opened this issue Aug 20, 2013 · 11 comments

Comments

@kirillkovalenko
Copy link

I suggest implementing verb aliases. For example: hg rename, hg move, hg mv is the same command.

@nemec
Copy link
Collaborator

nemec commented Aug 21, 2013

This can be trivially fixed in the short term by setting AllowMultiple to true on the VerbAttribute.

@gsscoder
Copy link
Owner

gsscoder commented Jul 9, 2015

@kirillkovalenko, this is a nice idea! 👍 Thansk!

@gsscoder
Copy link
Owner

gsscoder commented Jul 9, 2015

@nemec, an example?

@kirillkovalenko
Copy link
Author

@gsscoder are you really back? the issue is almost 2 y.o. now.

@gsscoder
Copy link
Owner

@kirillkovalenko, check the project activity

this is the state of art of Command Line Parser Library 2.0.x-alpha: https://github.com/gsscoder/commandline/wiki/Latest-Version

@gsscoder
Copy link
Owner

commandlineactivity

githubactivity

@kirillkovalenko
Copy link
Author

There could be even more sugar. Many tools allow using a shorter form of a verb or command (e.g. 'hg o' instead of 'hg out') provided that this shorter form is not ambiguous, and if it is ambiguous a nice hint is provided in the error message, e.g. 'hg: command 'a' is ambiguous: add addremove annotate archive'

@gsscoder
Copy link
Owner

@kirillkovalenko, this alias is implicit like:

[Verb("add")] class AddOptions { }
[Verb("commit")] class CommitOptions { }

Will allow a, c or explicitly defined:

[Verb("add", Alias=new[] {"a"})] class AddOptions { }
[Verb("commit", Alias=new[] {"cm", "cmt"})] class CommitOptions { }

?

@rmunn
Copy link
Contributor

rmunn commented Sep 10, 2015

👍 from me for this feature. I could use verb aliases in my current project, if they were available.

@nemec
Copy link
Collaborator

nemec commented Sep 18, 2015

@gsscoder what I meant was allowing the following:

[Verb("ci")]
[Verb("commit")] 
class CommitOptions { }

@gsscoder
Copy link
Owner

@nemec, it's another vaiable solution... :)

Anyway as announced in #213 this is an enhancement and will be the implementation is in any case post poned after 2.0.* gains stable status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants