antirez / antirez/linenoise

Way to Iterate Through History

未關閉
#213 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C
星號
4.4k
分支
741
PR 合併指標
30 天內沒有已合併 PR

描述

As far as I can tell, linenoise does not provide a way to read lines in history via its API. I think this would be useful. I think a way to implement this could be to allow `history` to be iterated on.

perhaps something like...

```c
struct HistoryIter {
char ** history; // a pointer to the history, same type as history itself (perhaps the same reference or a copy)
int count; // the number of lines in history
}

struct HistoryIter linenoiseGetHistory();

```

or maybe a macro...

```c

char * line;
LINENOISE_HISTORY_FOREACH_LINE(line) {
...
}
```

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。