try $XDG_DATA_HOME before $HOME for REPL history directory
This commit is contained in:
parent
ff36205a34
commit
35abd7f7e8
@ -743,7 +743,8 @@ int main(int argc, char* argv[]) {
|
||||
cbqn_init_replxx();
|
||||
Replxx* replxx = replxx_init();
|
||||
|
||||
char* history_dir = getenv("HOME");
|
||||
char* history_dir = getenv("XDG_DATA_HOME");
|
||||
if (!history_dir) history_dir = getenv("HOME");
|
||||
if (!history_dir) history_dir = ".";
|
||||
B p1 = utf8Decode0(history_dir);
|
||||
B p2 = path_rel(p1, m_c8vec_0(".cbqn_repl_history"));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user