aruu

[MIRROR] Actual replacement for Busybox | suckless
git clone https://git.daat.foo/aruu.git
Log | Files | Refs | README | LICENSE

redline.h (716B)


      1 /* see license file for copyright and license details */
      2 #ifndef REDLINE_H_
      3 #define REDLINE_H_
      4 
      5 #include <stddef.h>
      6 
      7 struct redlineCompletions {
      8   size_t len;
      9   char **cvec;
     10 };
     11 
     12 char *redline(const char *prompt);
     13 void  redlineSetCompletionCallback(void (*cb)(const char *, struct redlineCompletions *));
     14 void  redlineAddCompletion(struct redlineCompletions *lc, const char *str);
     15 void  redlineHistoryAdd(const char *line);
     16 void  redlineHistorySetMaxLen(int len);
     17 int   redlineHistorySave(const char *filename);
     18 int   redlineHistoryLoad(const char *filename);
     19 char *redlineHistoryGet(int idx);
     20 int   redlineHistoryLen(void);
     21 void  redlineSetMultiLine(int ml);
     22 void  redlineClearScreen(void);
     23 
     24 #endif /* REDLINE_H_ */