| 428 | COMMANDN(history, history_, "i"); |
| 429 | |
| 430 | void savehistory() |
| 431 | { |
| 432 | stream *f = openfile(path("config/history", true), "w"); |
| 433 | if(!f) return; |
| 434 | loopv(history) |
| 435 | { |
| 436 | hline *h = history[i]; |
| 437 | if(!h->action && !h->prompt && strncmp(h->buf, "/ ", 2)) |
| 438 | f->printf("%s\n",h->buf); |
| 439 | } |
| 440 | delete f; |
| 441 | } |
| 442 | |
| 443 | void loadhistory() |
| 444 | { |