aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/history.c4
-rw-r--r--src/lua_api.c8
-rw-r--r--test/run_tests.lua6
3 files changed, 8 insertions, 10 deletions
diff --git a/src/history.c b/src/history.c
index 93d6983..760461e 100644
--- a/src/history.c
+++ b/src/history.c
@@ -34,7 +34,7 @@ static char *get_history_path() {
return NULL;
}
- size_t path_length = strlen(pw->pw_dir) + strlen("/.lush/.history") + 1;
+ size_t path_length = strlen(pw->pw_dir) + strlen("/.lush_history") + 1;
char *path = malloc(path_length);
if (!path) {
perror("malloc");
@@ -42,7 +42,7 @@ static char *get_history_path() {
}
strcpy(path, pw->pw_dir);
- strcat(path, "/.lush/.history");
+ strcat(path, "/.lush_history");
return path;
}
diff --git a/src/lua_api.c b/src/lua_api.c
index a35a308..0e20752 100644
--- a/src/lua_api.c
+++ b/src/lua_api.c
@@ -95,9 +95,13 @@ void lua_run_init(lua_State *L) {
char script_path[64];
const char *home_dir = getenv("HOME");
if (home_dir != NULL) {
- snprintf(script_path, sizeof(script_path), "%s/.lush/init.lua",
+ snprintf(script_path, sizeof(script_path), "%s/.config/lush/init.lua",
home_dir);
- lua_load_script(L, script_path, NULL);
+ FILE *f = fopen(script_path, "r");
+ if (f != NULL) {
+ fclose(f);
+ lua_load_script(L, script_path, NULL);
+ }
}
}
diff --git a/test/run_tests.lua b/test/run_tests.lua
index 0f5c5bd..9f5f2e4 100644
--- a/test/run_tests.lua
+++ b/test/run_tests.lua
@@ -39,12 +39,6 @@ if rc == false then
lush.exit()
end
-print("\nTesting History...")
-rc = lush.exec("history_test.lua")
-if rc == false then
- lush.exit()
-end
-
print("\nTesting Environment Variables...")
rc = lush.exec("env_test.lua")
if rc == false then