summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p6.le-101.fr>2019-11-01 15:20:41 +0100
committerRudy Bousset <rbousset@z2r5p6.le-101.fr>2019-11-01 15:20:41 +0100
commit9f5b079ed0b2d315eab2c1870f7946d58893f0ca (patch)
treee99675d940e97a2e2a9c98f43a4652d536f4a471 /src/main.c
parentchanges (diff)
download42-minishell-9f5b079ed0b2d315eab2c1870f7946d58893f0ca.tar.gz
42-minishell-9f5b079ed0b2d315eab2c1870f7946d58893f0ca.tar.bz2
42-minishell-9f5b079ed0b2d315eab2c1870f7946d58893f0ca.tar.xz
42-minishell-9f5b079ed0b2d315eab2c1870f7946d58893f0ca.tar.zst
42-minishell-9f5b079ed0b2d315eab2c1870f7946d58893f0ca.zip
YO PICKED THE WRONG FOOL, HOUSE
Diffstat (limited to '')
-rw-r--r--src/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index bbbc92f..cf60fa2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -24,7 +24,6 @@ int
char c;
char *arg;
uint8_t i;
- int ret;
i = 0;
arg = NULL;
@@ -44,11 +43,16 @@ int
if (c == '\n')
break ;
arg[i] = c;
+ if (!ft_strncmp("", arg, 4))
+ {
+ arg = ft_get_last_line();
+ break ;
+ }
i++;
}
arg[i] = '\0';
ft_history(arg);
- ret = ft_process_arg(arg);
+ ft_process_arg(arg);
}
free(arg);
arg = NULL;