mirror of
https://github.com/corda/corda.git
synced 2025-02-21 09:51:57 +00:00
shell: list commands alphabetically
This commit is contained in:
parent
721728c8ab
commit
57a52f43a4
@ -36,8 +36,10 @@ public class RunShellCommand extends InteractiveShellCommand {
|
|||||||
private void emitHelp(InvocationContext<Map> context, StringToMethodCallParser<CordaRPCOps> parser) {
|
private void emitHelp(InvocationContext<Map> context, StringToMethodCallParser<CordaRPCOps> parser) {
|
||||||
// Sends data down the pipeline about what commands are available. CRaSH will render it nicely.
|
// Sends data down the pipeline about what commands are available. CRaSH will render it nicely.
|
||||||
// Each element we emit is a map of column -> content.
|
// Each element we emit is a map of column -> content.
|
||||||
Map<String, String> cmdsAndArgs = parser.getAvailableCommands();
|
Set<Map.Entry<String, String>> entries = parser.getAvailableCommands().entrySet();
|
||||||
for (Map.Entry<String, String> entry : cmdsAndArgs.entrySet()) {
|
ArrayList<Map.Entry<String, String>> entryList = new ArrayList<>(entries);
|
||||||
|
entryList.sort(Comparator.comparing(Map.Entry::getKey));
|
||||||
|
for (Map.Entry<String, String> entry : entryList) {
|
||||||
// Skip these entries as they aren't really interesting for the user.
|
// Skip these entries as they aren't really interesting for the user.
|
||||||
if (entry.getKey().equals("startFlowDynamic")) continue;
|
if (entry.getKey().equals("startFlowDynamic")) continue;
|
||||||
if (entry.getKey().equals("getProtocolVersion")) continue;
|
if (entry.getKey().equals("getProtocolVersion")) continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user