Capitalizes subcommands & orders lexicographically

This commit is contained in:
Itamar Haber 2018-06-09 21:03:52 +03:00
parent 21ef0376fe
commit fefde6e3e4
7 changed files with 57 additions and 57 deletions

View File

@ -4178,27 +4178,27 @@ void clusterCommand(client *c) {
if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) { if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) {
const char *help[] = { const char *help[] = {
"addslots <slot> [slot ...] -- Assign slots to current node.", "ADDSLOTS <slot> [slot ...] -- Assign slots to current node.",
"bumpepoch -- Advance the cluster config epoch.", "BUMPEPOCH -- Advance the cluster config epoch.",
"count-failure-reports <node-id> -- Return number of failure reports for <node-id>.", "COUNT-failure-reports <node-id> -- Return number of failure reports for <node-id>.",
"countkeysinslot <slot> - Return the number of keys in <slot>.", "COUNTKEYSINSLOT <slot> - Return the number of keys in <slot>.",
"delslots <slot> [slot ...] -- Delete slots information from current node.", "DELSLOTS <slot> [slot ...] -- Delete slots information from current node.",
"failover [force|takeover] -- Promote current slave node to being a master.", "FAILOVER [force|takeover] -- Promote current slave node to being a master.",
"forget <node-id> -- Remove a node from the cluster.", "FORGET <node-id> -- Remove a node from the cluster.",
"getkeysinslot <slot> <count> -- Return key names stored by current node in a slot.", "GETKEYSINSLOT <slot> <count> -- Return key names stored by current node in a slot.",
"flushslots -- Delete current node own slots information.", "FLUSHSLOTS -- Delete current node own slots information.",
"info - Return onformation about the cluster.", "INFO - Return onformation about the cluster.",
"keyslot <key> -- Return the hash slot for <key>.", "KEYSLOT <key> -- Return the hash slot for <key>.",
"meet <ip> <port> [bus-port] -- Connect nodes into a working cluster.", "MEET <ip> <port> [bus-port] -- Connect nodes into a working cluster.",
"myid -- Return the node id.", "MYID -- Return the node id.",
"nodes -- Return cluster configuration seen by node. Output format:", "NODES -- Return cluster configuration seen by node. Output format:",
" <id> <ip:port> <flags> <master> <pings> <pongs> <epoch> <link> <slot> ... <slot>", " <id> <ip:port> <flags> <master> <pings> <pongs> <epoch> <link> <slot> ... <slot>",
"replicate <node-id> -- Configure current node as slave to <node-id>.", "REPLICATE <node-id> -- Configure current node as slave to <node-id>.",
"reset [hard|soft] -- Reset current node (default: soft).", "RESET [hard|soft] -- Reset current node (default: soft).",
"set-config-epoch <epoch> - Set config epoch of current node.", "SET-config-epoch <epoch> - Set config epoch of current node.",
"setslot <slot> (importing|migrating|stable|node <node-id>) -- Set slot state.", "SETSLOT <slot> (importing|migrating|stable|node <node-id>) -- Set slot state.",
"slaves <node-id> -- Return <node-id> slaves.", "SLAVES <node-id> -- Return <node-id> slaves.",
"slots -- Return information about slots range mappings. Each range is made of:", "SLOTS -- Return information about slots range mappings. Each range is made of:",
" start, end, master and replicas IP addresses, ports and ids", " start, end, master and replicas IP addresses, ports and ids",
NULL NULL
}; };

View File

@ -2121,10 +2121,10 @@ void configCommand(client *c) {
if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) { if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) {
const char *help[] = { const char *help[] = {
"get <pattern> -- Return parameters matching the glob-like <pattern> and their values.", "GET <pattern> -- Return parameters matching the glob-like <pattern> and their values.",
"set <parameter> <value> -- Set parameter to value.", "SET <parameter> <value> -- Set parameter to value.",
"resetstat -- Reset statistics reported by INFO.", "RESETSTAT -- Reset statistics reported by INFO.",
"rewrite -- Rewrite the configuration file.", "REWRITE -- Rewrite the configuration file.",
NULL NULL
}; };
addReplyHelp(c, help); addReplyHelp(c, help);

View File

@ -285,25 +285,25 @@ void computeDatasetDigest(unsigned char *final) {
void debugCommand(client *c) { void debugCommand(client *c) {
if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) { if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) {
const char *help[] = { const char *help[] = {
"assert -- Crash by assertion failed.", "ASSERT -- Crash by assertion failed.",
"change-repl-id -- Change the replication IDs of the instance. Dangerous, should be used only for testing the replication subsystem.", "CHANGE-REPL-ID -- Change the replication IDs of the instance. Dangerous, should be used only for testing the replication subsystem.",
"crash-and-recover <milliseconds> -- Hard crash and restart after <milliseconds> delay.", "CRASH-and-recover <milliseconds> -- Hard crash and restart after <milliseconds> delay.",
"digest -- Outputs an hex signature representing the current DB content.", "DIGEST -- Output a hex signature representing the current DB content.",
"htstats <dbid> -- Return hash table statistics of the specified Redis database.", "ERROR <string> -- Return a Redis protocol error with <string> as message. Useful for clients unit tests to simulate Redis errors.",
"loadaof -- Flush the AOF buffers on disk and reload the AOF in memory.", "HTSTATS <dbid> -- Return hash table statistics of the specified Redis database.",
"lua-always-replicate-commands (0|1) -- Setting it to 1 makes Lua replication defaulting to replicating single commands, without the script having to enable effects replication.", "LOADAOF -- Flush the AOF buffers on disk and reload the AOF in memory.",
"object <key> -- Show low level info about key and associated value.", "LUA-ALWAYS-REPLICATE-COMMANDS (0|1) -- Setting it to 1 makes Lua replication defaulting to replicating single commands, without the script having to enable effects replication.",
"panic -- Crash the server simulating a panic.", "OBJECT <key> -- Show low level info about key and associated value.",
"populate <count> [prefix] [size] -- Create <count> string keys named key:<num>. If a prefix is specified is used instead of the 'key' prefix.", "PANIC -- Crash the server simulating a panic.",
"reload -- Save the RDB on disk and reload it back in memory.", "POPULATE <count> [prefix] [size] -- Create <count> string keys named key:<num>. If a prefix is specified is used instead of the 'key' prefix.",
"restart -- Graceful restart: save config, db, restart.", "RELOAD -- Save the RDB on disk and reload it back in memory.",
"sdslen <key> -- Show low level SDS string info representing key and value.", "RESTART -- Graceful restart: save config, db, restart.",
"segfault -- Crash the server with sigsegv.", "SDSLEN <key> -- Show low level SDS string info representing key and value.",
"set-active-expire (0|1) -- Setting it to 0 disables expiring keys in background when they are not accessed (otherwise the Redis behavior). Setting it to 1 reenables back the default.", "SEGFAULT -- Crash the server with sigsegv.",
"sleep <seconds> -- Stop the server for <seconds>. Decimals allowed.", "SET-ACTIVE-EXPIRE (0|1) -- Setting it to 0 disables expiring keys in background when they are not accessed (otherwise the Redis behavior). Setting it to 1 reenables back the default.",
"structsize -- Return the size of different Redis core C structures.", "SLEEP <seconds> -- Stop the server for <seconds>. Decimals allowed.",
"ziplist <key> -- Show low level info about the ziplist encoding.", "STRUCTSIZE -- Return the size of different Redis core C structures.",
"error <string> -- Return a Redis protocol error with <string> as message. Useful for clients unit tests to simulate Redis errors.", "ZIPLIST <key> -- Show low level info about the ziplist encoding.",
NULL NULL
}; };
addReplyHelp(c, help); addReplyHelp(c, help);

View File

@ -327,9 +327,9 @@ void publishCommand(client *c) {
void pubsubCommand(client *c) { void pubsubCommand(client *c) {
if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) { if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) {
const char *help[] = { const char *help[] = {
"channels [<pattern>] -- Return the currently active channels matching a pattern (default: all).", "CHANNELS [<pattern>] -- Return the currently active channels matching a pattern (default: all).",
"numpat -- Return number of subscriptions to patterns.", "NUMPAT -- Return number of subscriptions to patterns.",
"numsub [channel-1 .. channel-N] -- Returns the number of subscribers for the specified channels (excluding patterns, default: none).", "NUMSUB [channel-1 .. channel-N] -- Returns the number of subscribers for the specified channels (excluding patterns, default: none).",
NULL NULL
}; };
addReplyHelp(c, help); addReplyHelp(c, help);

View File

@ -1457,11 +1457,11 @@ void evalShaCommand(client *c) {
void scriptCommand(client *c) { void scriptCommand(client *c) {
if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) { if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) {
const char *help[] = { const char *help[] = {
"debug (yes|sync|no) -- Set the debug mode for subsequent scripts executed.", "DEBUG (yes|sync|no) -- Set the debug mode for subsequent scripts executed.",
"exists <sha1> [<sha1> ...] -- Return information about the existence of the scripts in the script cache.", "EXISTS <sha1> [<sha1> ...] -- Return information about the existence of the scripts in the script cache.",
"flush -- Flush the Lua scripts cache. Very dangerous on slaves.", "FLUSH -- Flush the Lua scripts cache. Very dangerous on slaves.",
"kill -- Kill the currently executing Lua script.", "KILL -- Kill the currently executing Lua script.",
"load <script> -- Load a script into the scripts cache, without executing it.", "LOAD <script> -- Load a script into the scripts cache, without executing it.",
NULL NULL
}; };
addReplyHelp(c, help); addReplyHelp(c, help);

View File

@ -2826,9 +2826,9 @@ void commandCommand(client *c) {
if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) { if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) {
const char *help[] = { const char *help[] = {
"(no subcommand) -- Return details about all Redis commands.", "(no subcommand) -- Return details about all Redis commands.",
"count -- Return the total number of commands in this Redis server.", "COUNT -- Return the total number of commands in this Redis server.",
"getkeys <full-command> -- Return the keys from a full Redis command.", "GETKEYS <full-command> -- Return the keys from a full Redis command.",
"info [command-name ...] -- Return details about multiple Redis commands.", "INFO [command-name ...] -- Return details about multiple Redis commands.",
NULL NULL
}; };
addReplyHelp(c, help); addReplyHelp(c, help);

View File

@ -142,11 +142,11 @@ void slowlogReset(void) {
void slowlogCommand(client *c) { void slowlogCommand(client *c) {
if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) { if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) {
const char *help[] = { const char *help[] = {
"get [count] -- Return top entries from the slowlog (default: 10)." "GET [count] -- Return top entries from the slowlog (default: 10)."
" Entries are made of:", " Entries are made of:",
" id, timestamp, time in microseconds, arguments array, client IP and port, client name", " id, timestamp, time in microseconds, arguments array, client IP and port, client name",
"len -- Return the length of the slowlog.", "LEN -- Return the length of the slowlog.",
"reset -- Reset the slowlog.", "RESET -- Reset the slowlog.",
NULL NULL
}; };
addReplyHelp(c, help); addReplyHelp(c, help);