aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lush.c2
-rw-r--r--src/lush.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/lush.c b/src/lush.c
index 297e373..0e647e9 100644
--- a/src/lush.c
+++ b/src/lush.c
@@ -1075,7 +1075,7 @@ static int run_command(lua_State *L, char ***commands) {
if (ext) {
ext++;
if (strcmp(ext, "lua") == 0) {
- return ((*builtin_func[4])(L, commands));
+ return ((*builtin_func[LUSH_LUA])(L, commands));
}
}
diff --git a/src/lush.h b/src/lush.h
index 06eb184..d067b36 100644
--- a/src/lush.h
+++ b/src/lush.h
@@ -19,6 +19,7 @@ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#define LUSH_H
#include <lua.h>
+#define LUSH_LUA 5
// alias
void lush_add_alias(const char *alias, const char *command);
@@ -57,6 +58,6 @@ extern char *prompt_format;
// history
char *lush_get_past_command(int pos);
-void lush_push_history(const char* line);
+void lush_push_history(const char *line);
#endif // LUSH_H