diff options
author | Robby Zambito <contact@robbyzambito.me> | 2021-10-24 01:18:07 -0400 |
---|---|---|
committer | Robby Zambito <contact@robbyzambito.me> | 2021-10-24 01:18:07 -0400 |
commit | 7380a987dd77c2129d0add9c8ff5238640052724 (patch) | |
tree | 8aee5e01b35648ec5ebc53430a035411b39d0674 | |
parent | 963358fe9b8f7399cff7e8cb73232cb6a4907bb3 (diff) |
Initialize and tear down history for readline
-rw-r--r-- | rvsh.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -194,6 +194,7 @@ int main(void) { put_stream_rev(bash_output_f); + using_history(); while ((line = readline(strrev(prompt = get_bash_prompt()))) != NULL) { add_history(line); @@ -214,6 +215,7 @@ int main(void) { perror("End"); } + rl_clear_history(); free(prompt); return EXIT_SUCCESS; } |