You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2019/12/16 01:53:23 UTC
[GitHub] [zookeeper] maoling commented on a change in pull request #1180:
ZOOKEEPER-3300 CLI "history" to show 10 commands
maoling commented on a change in pull request #1180: ZOOKEEPER-3300 CLI "history" to show 10 commands
URL: https://github.com/apache/zookeeper/pull/1180#discussion_r358027400
##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeperMain.java
##########
@@ -410,7 +410,7 @@ protected boolean processZKCmd(MyCommandOptions co) throws CliException, IOExcep
history.put(commandCount, history.get(i));
processCmd(cl);
} else if (cmd.equals("history")) {
- for (int i = commandCount - 10; i <= commandCount; ++i) {
+ for (int i = commandCount - 9; i <= commandCount; ++i) {
if (i < 0) {
Review comment:
Look at an example from linux cmd `history`, don't need to include the recent one: `history`
`for (int i = commandCount - 10; i < commandCount; ++i)` ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services