diff --git a/builtins/src/main/java/org/jline/builtins/Commands.java b/builtins/src/main/java/org/jline/builtins/Commands.java index 5c91816c8..c872d20b3 100644 --- a/builtins/src/main/java/org/jline/builtins/Commands.java +++ b/builtins/src/main/java/org/jline/builtins/Commands.java @@ -191,7 +191,7 @@ public static void history(LineReader reader, PrintStream out, PrintStream err, AttributedStringBuilder sb = new AttributedStringBuilder(); sb.append(" "); sb.style(AttributedStyle.BOLD); - sb.append(String.format("%3d", entry.index())); + sb.append(String.format("%3d", entry.index() + 1)); sb.style(AttributedStyle.DEFAULT); if (opt.isSet("d")) { sb.append(" ");