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 #6

Closed
ericnewton76 opened this issue Nov 4, 2017 · 13 comments · Fixed by #636
Closed

Verb aliases #6

ericnewton76 opened this issue Nov 4, 2017 · 13 comments · Fixed by #636

Comments

@ericnewton76
Copy link
Member

Issue by kirillkovalenko
Tuesday Aug 20, 2013 at 17:19 GMT
Originally opened as gsscoder/commandline#90


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

@ericnewton76
Copy link
Member Author

Comment by nemec
Wednesday Aug 21, 2013 at 05:37 GMT


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

@ericnewton76
Copy link
Member Author

Comment by gsscoder
Thursday Jul 09, 2015 at 17:40 GMT


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

@ericnewton76
Copy link
Member Author

Comment by gsscoder
Thursday Jul 09, 2015 at 17:41 GMT


@nemec, an example?

@ericnewton76
Copy link
Member Author

Comment by kirillkovalenko
Friday Jul 10, 2015 at 09:01 GMT


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

@ericnewton76
Copy link
Member Author

Comment by gsscoder
Friday Jul 10, 2015 at 11:04 GMT


@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

@ericnewton76
Copy link
Member Author

Comment by gsscoder
Friday Jul 10, 2015 at 11:08 GMT


commandlineactivity

githubactivity

@ericnewton76
Copy link
Member Author

Comment by kirillkovalenko
Friday Jul 10, 2015 at 13:05 GMT


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'

@ericnewton76
Copy link
Member Author

Comment by gsscoder
Friday Jul 10, 2015 at 15:36 GMT


@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 { }

?

@ericnewton76
Copy link
Member Author

Comment by rmunn
Thursday Sep 10, 2015 at 08:18 GMT


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

@ericnewton76
Copy link
Member Author

Comment by nemec
Friday Sep 18, 2015 at 19:02 GMT


@gsscoder what I meant was allowing the following:

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

@ericnewton76
Copy link
Member Author

Comment by gsscoder
Saturday Sep 26, 2015 at 06:43 GMT


@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.

@Rohansi
Copy link

Rohansi commented Aug 14, 2019

Was this issue forgotten? Still doesn't seem to be supported in any way.

@moh-hassan
Copy link
Collaborator

PR is welcome to support Verb aliases.

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

Successfully merging a pull request may close this issue.

3 participants