Add commands to tab complete
parent
09fe40abd9
commit
c024147504
3
chat.c
3
chat.c
|
@ -75,8 +75,9 @@ int main(int argc, char *argv[]) {
|
|||
if (!chat.nick) chat.nick = prompt("Name: ");
|
||||
chat.user = strdup(chat.nick);
|
||||
|
||||
signal(SIGINT, sigint);
|
||||
inputTab();
|
||||
|
||||
signal(SIGINT, sigint);
|
||||
uiInit();
|
||||
uiLog(L"Traveling...");
|
||||
uiDraw();
|
||||
|
|
2
chat.h
2
chat.h
|
@ -73,6 +73,8 @@ const wchar_t *editTail(void);
|
|||
bool edit(bool meta, bool ctrl, wchar_t ch);
|
||||
|
||||
void handle(char *line);
|
||||
|
||||
void inputTab(void);
|
||||
void input(char *line);
|
||||
|
||||
void tabTouch(const char *word);
|
||||
|
|
2
edit.c
2
edit.c
|
@ -126,7 +126,7 @@ static void complete(void) {
|
|||
free(wcs);
|
||||
|
||||
size_t pos = line.tab - line.buf;
|
||||
if (!pos) {
|
||||
if (!pos && line.tab[0] != L'/') {
|
||||
insert(L':');
|
||||
} else if (pos >= 2) {
|
||||
if (line.buf[pos - 2] == L':' || line.buf[pos - 2] == L',') {
|
||||
|
|
Loading…
Reference in New Issue