Adding entered command to history
This commit is contained in:
parent
61b2327d3c
commit
e57c3a3ed6
|
@ -168,6 +168,8 @@ void cmd_loop() {
|
||||||
|
|
||||||
do {
|
do {
|
||||||
cmd = readline("> ");
|
cmd = readline("> ");
|
||||||
|
add_history(cmd);
|
||||||
|
|
||||||
if (cmd == NULL)
|
if (cmd == NULL)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -206,7 +208,6 @@ void cmd_loop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_commands(argc, argv);
|
parse_commands(argc, argv);
|
||||||
add_history(cmd_start);
|
|
||||||
|
|
||||||
free(cmd);
|
free(cmd);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue