-
Notifications
You must be signed in to change notification settings - Fork 23.5k
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
Make shutdown command more intuitively with syntax #13153
base: unstable
Are you sure you want to change the base?
Conversation
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 believe we wrote it like that to avoid complex-looking syntax. In the docs, we described the it in text instead:
"ABORT cancels an ongoing shutdown and cannot be combined with other flags."
A that time, we didn't have the fancy auto-complete of options in redis-cli that we have now.
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
I have updated PR with your comment, to make it sense. Thanks for your comment. |
The JSON files from Redis are used automatically by redis.io for the syntax of each command, but all the written text documentation is in redis-doc. A PR in redis-doc is always welcome if you want to improve some text. |
Thanks for your reply. I'll write doc PR after merged, if needed :) |
This PR contains fix about missing syntax hint in #9872, which is added from Redis 7.0.
--
The point is that we cannot use ABORT with others.
But refer to redis.io, Syntax of command SHUTDOWN is below:
SHUTDOWN [NOSAVE | SAVE] [NOW] [FORCE] [ABORT]
Now in redis-cli of unstable branch, hint of shutdown does not seem properly like below:
When using
abort
with other flags, of course it is syntax error, but it seems like that we can use it together.--
What have been fixed
So, I wrote this minor fix PR to let us know right syntax properly:
When using one of
nosave, save, now, and force
, thenabort
will be disappeared in hint:Contrary, when using
abort
, then all of other flags will be disappeared:If I missed naming rule of argument in
src/commands/shutdown.json
, then please let me know.Best regards,