-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix ipfs help
bug #5557
#5573
fix ipfs help
bug #5557
#5573
Conversation
My review is squashed. |
cmd/ipfs/main.go
Outdated
if os.Args[1] == "help" { | ||
if len(os.Args) > 2 { | ||
os.Args = append(os.Args[:1], os.Args[2:]...) | ||
os.Args = append(os.Args, "-h") |
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 would switch it to --help
as -h
is a short help and --help
is a long help. (help help help :smile)
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.
Same in line 98.
@djdv @Kubuxu @Stebalien i have update the pr . And I have changed |
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.
The code seems good to me. One thing about tests. I wouldn't be adding help test cases in various files, instead, I would add a second test case to t0010-basic-commands.sh
(similar to All commands accept --help
test) that tests `ipfs help .
License: MIT Signed-off-by: Kejie Zhang <[email protected]>
License: MIT Signed-off-by: Kejie Zhang <[email protected]>
Thx for advice @Kubuxu.I have update my pr.Please help me review it again. |
This is a bit funky but, well, it was already kind of a hack. This should at least be less surprising for users. |
fix issue #5557
License: MIT
Signed-off-by: Kejie Zhang [email protected]