Skip to content

Commit

Permalink
Move some tab complete messages to debug mode only (#3739)
Browse files Browse the repository at this point in the history
  • Loading branch information
JRoy authored Oct 22, 2020
1 parent 9cda595 commit 80e7558
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,17 @@ protected final List<String> tabCompleteCommand(final CommandSource sender, fina
}

final int numArgs = args.length - index - 1;
ess.getLogger().info(numArgs + " " + index + " " + Arrays.toString(args));
if (ess.getSettings().isDebug()) {
ess.getLogger().info(numArgs + " " + index + " " + Arrays.toString(args));
}
String[] effectiveArgs = new String[numArgs];
System.arraycopy(args, index, effectiveArgs, 0, numArgs);
if (effectiveArgs.length == 0) {
effectiveArgs = new String[] {""};
}
ess.getLogger().info(command + " -- " + Arrays.toString(effectiveArgs));
if (ess.getSettings().isDebug()) {
ess.getLogger().info(command + " -- " + Arrays.toString(effectiveArgs));
}

return command.tabComplete(sender.getSender(), label, effectiveArgs);
}
Expand Down

0 comments on commit 80e7558

Please sign in to comment.