Cluster: redis-trib help output improved.
Show options if any. Clarify that for some command any node address is ok.
This commit is contained in:
parent
595ab5f26b
commit
2c9f8fc22b
@ -857,12 +857,18 @@ ALLOWED_OPTIONS={
|
||||
}
|
||||
|
||||
def show_help
|
||||
puts "Usage: redis-trib <command> <options> <arguments ...>"
|
||||
puts
|
||||
puts "Usage: redis-trib <command> <options> <arguments ...>\n\n"
|
||||
COMMANDS.each{|k,v|
|
||||
puts " #{k.ljust(10)} #{v[2]}"
|
||||
o = ""
|
||||
if ALLOWED_OPTIONS[k]
|
||||
ALLOWED_OPTIONS[k].each{|optname,has_arg|
|
||||
o += "--#{optname}" + (has_arg ? " <arg>" : "") + " "
|
||||
}
|
||||
puts
|
||||
end
|
||||
o = "[#{o.strip}]" if o.length > 0
|
||||
puts " #{k.ljust(10)} #{v[2]} #{o}"
|
||||
}
|
||||
puts "\nFor check, fix, reshard, you can specify host:port of any working node.\n"
|
||||
end
|
||||
|
||||
# Sanity check
|
||||
|
Loading…
x
Reference in New Issue
Block a user