-
Notifications
You must be signed in to change notification settings - Fork 573
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
standardizing how the account flag is used in our CLI #4736
Conversation
description: 'The account to send money from', | ||
description: 'The account to send coins from', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coins is more consistent with the description of the command and of other fields in the command
@@ -26,7 +26,7 @@ export class PostCommand extends IronfishCommand { | |||
...RemoteFlags, | |||
account: Flags.string({ | |||
description: 'The account that created the raw transaction', | |||
required: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by default not required
What does |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I might actually prefer to go the opposite way and move towards deprecating single character flags like -f
and use the full --account
: it's only intuitive to me that f
would be an account for send -f(rom)
I wanted to keep |
@hughy i feel like single letter is a common pattern for many CLI interfaces, so i personally don't like the idea of deprecating single characters. I agree that |
530e095
to
eac885e
Compare
It might be worth to keep (or deprecate, without removing) If you want to go the deprecation route, you can add code to detect when it's used and show a warning like "-f is going away in version x.y.z; please switch to -a" (or similar) |
My vote is for keeping -f with deprecation warning, and making -a the universal. I think having single letter flags is useful for power users, having |
eac885e
to
ee84e91
Compare
I reverted the change to |
6382a84
to
e1ddff6
Compare
e1ddff6
to
0938478
Compare
Summary
These are the ways we enter the account in our CLI:
-f
flag-a
--account
As a user want the experience to be as consistent as possible. Provide the account with the same flag. If the account is not provided, use the default account.
This change goes through our CLI commands and attempts to make the way we enter the account consistent.
Testing Plan
Documentation
Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference)? If yes, link a
related documentation pull request for the website.
Breaking Change
Is this a breaking change? If yes, add notes below on why this is breaking and
what additional work is required, if any.