fix(history): fix history file write bug
This commit is contained in:
parent
e0c5cab7c8
commit
54ea6337e9
1 changed files with 2 additions and 2 deletions
4
main.c
4
main.c
|
@ -2,7 +2,7 @@
|
|||
* @Author: 1ridic
|
||||
* @Date: 2022-09-18 14:13:59
|
||||
* @Last Modified by: 1ridic
|
||||
* @Last Modified time: 2022-09-18 22:01:12
|
||||
* @Last Modified time: 2022-09-18 22:34:28
|
||||
*/
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
|
@ -33,7 +33,7 @@ int main(int argc, char *argv[]) {
|
|||
fprintf(stdout,"\033[H\033[J");
|
||||
/* open history file */
|
||||
extern FILE* hf;
|
||||
hf = fopen(strcat(getenv("HOME"), "/.dish_history"), "w");
|
||||
hf = fopen(strcat(getenv("HOME"), "/.dish_history"), "a+");
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stdout,"DEBUG is defined\n");
|
||||
|
|
Loading…
Reference in a new issue