Skip to content

Commit 4f3ba98

Browse files
author
Magnus Röös
committed
hisory: don't store history if previous command was the same
1 parent e5c7c75 commit 4f3ba98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shell/history.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ history_add(const char *line)
2222
if (history.latest == NULL) {
2323
history.lines[0] = strdup(line);
2424
history.latest = history.lines;
25-
} else {
25+
} else if (strcmp(line, *history.latest)) {
2626
history.latest++;
2727
if (history.latest >= &history.lines[MAX_LINES])
2828
history.latest = history.lines;

0 commit comments

Comments
 (0)