mirror of
https://github.com/alibaba/arthas.git
synced 2026-11-30 15:33:59 +00:00
improve history command
This commit is contained in:
1 parent
744beefe0e
commit
d667bc12f0
1 file changed
+2
-3
@@ -15,6 +15,7 @@ import com.taobao.middleware.cli.annotations.Option;
|
|||||||
import com.taobao.middleware.cli.annotations.Summary;
|
import com.taobao.middleware.cli.annotations.Summary;
|
||||||
|
|
||||||
import io.termd.core.readline.Readline;
|
import io.termd.core.readline.Readline;
|
||||||
|
import io.termd.core.util.Helper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -62,9 +63,7 @@ public class HistoryCommand extends AnnotatedCommand {
|
|||||||
for (int i = 0; i < n; ++i) {
|
for (int i = 0; i < n; ++i) {
|
||||||
int[] line = history.get(n - i - 1);
|
int[] line = history.get(n - i - 1);
|
||||||
sb.append(String.format("%5s ", size - (n - i - 1)));
|
sb.append(String.format("%5s ", size - (n - i - 1)));
|
||||||
for (int codePoint : line) {
|
Helper.appendCodePoints(line, sb);
|
||||||
sb.append(Character.toChars(codePoint));
|
|
||||||
}
|
|
||||||
sb.append('\n');
|
sb.append('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user