antirez / antirez/linenoise

Way to Iterate Through History

Aberta
#213 1 comentário 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
C
Estrelas
4.4k
Forks
741
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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) {
...
}
```

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.