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

Allow applying multiple shortcuts to the same arg. #17

Closed
glennblock opened this Issue May 6, 2013 · 5 comments

Comments

Projects
None yet
3 participants
@glennblock

glennblock commented May 6, 2013

Currently the ArgShortcutAttribute is set to AllowMultiple=false. This prevents multiple shortcuts for the same arg.

I'd like to do something like this.

[ArgShortcut("h")]
[ArgShortcut("?")]
public bool Help { get; set; }

Allowing a user to specify -help, -h OR -?.

@BrendanThompson

This comment has been minimized.

Show comment
Hide comment
@BrendanThompson

BrendanThompson commented May 6, 2013

👍

@adamabdelhamed

This comment has been minimized.

Show comment
Hide comment
@adamabdelhamed

adamabdelhamed May 9, 2013

Owner

This is reasonable. I'll look into it.

Owner

adamabdelhamed commented May 9, 2013

This is reasonable. I'll look into it.

@adamabdelhamed

This comment has been minimized.

Show comment
Hide comment
@adamabdelhamed

adamabdelhamed May 22, 2013

Owner

If it helps you... In the meantime you can use the [ArgLongForm("?")] attribute which will add support for --? (double dash) but not -?. The long form attribute supports multiple already. It is also integrated into the usage output and will show as an alias for the command.

Owner

adamabdelhamed commented May 22, 2013

If it helps you... In the meantime you can use the [ArgLongForm("?")] attribute which will add support for --? (double dash) but not -?. The long form attribute supports multiple already. It is also integrated into the usage output and will show as an alias for the command.

@adamabdelhamed

This comment has been minimized.

Show comment
Hide comment
@adamabdelhamed

adamabdelhamed Jun 8, 2013

Owner

This is fixed now. You can use multiple [ArgShortcut] attributes in PowerArgs 1.7.0.0.

Owner

adamabdelhamed commented Jun 8, 2013

This is fixed now. You can use multiple [ArgShortcut] attributes in PowerArgs 1.7.0.0.

@glennblock

This comment has been minimized.

Show comment
Hide comment
@glennblock

glennblock Jun 8, 2013

Great!

-----Original Message-----
From: "Adam Abdelhamed" notifications@github.com
Sent: ‎6/‎8/‎2013 9:39 AM
To: "adamabdelhamed/PowerArgs" PowerArgs@noreply.github.com
Cc: "Glenn Block" glenn.block@gmail.com
Subject: Re: [PowerArgs] Allow applying multiple shortcuts to the same arg.(#17)

This is fixed now. You can use multiple [ArgShortcut] attributes in PowerArgs 1.7.0.0.

Reply to this email directly or view it on GitHub.

glennblock commented Jun 8, 2013

Great!

-----Original Message-----
From: "Adam Abdelhamed" notifications@github.com
Sent: ‎6/‎8/‎2013 9:39 AM
To: "adamabdelhamed/PowerArgs" PowerArgs@noreply.github.com
Cc: "Glenn Block" glenn.block@gmail.com
Subject: Re: [PowerArgs] Allow applying multiple shortcuts to the same arg.(#17)

This is fixed now. You can use multiple [ArgShortcut] attributes in PowerArgs 1.7.0.0.

Reply to this email directly or view it on GitHub.

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