Make shutdown command more intuitively with syntax #13153
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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,