2026-03-21 19:41:43 +01:00

38 lines
732 B
C
Executable File

#include "slcore.h"
int process_line(char* line, char **envp) {
(void)line;
(void)envp;
return (0);
}
//READLINE IS REALLY FKN POWERFULL
int entry_shell(int ac, char **av, char **envp) {
(void)ac;
(void)av;
(void)envp;
int running = 1;
char *line = NULL;
//rl_parse_and_bind();
//rl_read_init_file();
//rl_terminal_name = (char*)"new";
//rl_readline_name = (char*)"custom";
//rl_instrean = (FILE*)NULL;
//rl_outstrean = (FILE*)NULL;
rl_initialize();
using_history();
rl_editing_mode = 1;
while (running) {
line = readline(":>");
if (!line ) {
running = 0;
}
if (*line) {
add_history(line);
}
rl_free (line);
line = NULL;
}
clear_history();
return (-1);
}