summaryrefslogtreecommitdiffstats
path: root/src/ft_process_arg.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p6.le-101.fr>2019-11-01 18:57:16 +0100
committerRudy Bousset <rbousset@z2r5p6.le-101.fr>2019-11-01 18:57:16 +0100
commit7cbf04d592608cf36832e25f9b41619df733e0ae (patch)
tree96c0d2006cd53fcbc2a628795b45b118ba9f3189 /src/ft_process_arg.c
parentNow deals with history (diff)
download42-minishell-7cbf04d592608cf36832e25f9b41619df733e0ae.tar.gz
42-minishell-7cbf04d592608cf36832e25f9b41619df733e0ae.tar.bz2
42-minishell-7cbf04d592608cf36832e25f9b41619df733e0ae.tar.xz
42-minishell-7cbf04d592608cf36832e25f9b41619df733e0ae.tar.zst
42-minishell-7cbf04d592608cf36832e25f9b41619df733e0ae.zip
commit
Diffstat (limited to '')
-rw-r--r--src/ft_process_arg.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/ft_process_arg.c b/src/ft_process_arg.c
index 6a2d155..8057e42 100644
--- a/src/ft_process_arg.c
+++ b/src/ft_process_arg.c
@@ -1,3 +1,16 @@
+/* ************************************************************************** */
+/* LE - / */
+/* / */
+/* ft_process_arg.c .:: .:/ . .:: */
+/* +:+:+ +: +: +:+:+ */
+/* By: rbousset <marvin@le-101.fr> +:+ +: +: +:+ */
+/* #+# #+ #+ #+# */
+/* Created: 2019/11/01 18:47:30 by rbousset #+# ## ## #+# */
+/* Updated: 2019/11/01 18:47:32 by rbousset ### #+. /#+ ###.fr */
+/* / */
+/* / */
+/* ************************************************************************** */
+
#include <libft.h>
#include <stdlib.h>
#include <minishell.h>
@@ -32,9 +45,7 @@ ft_process_arg(char *arg)
ft_process_arg(prev);
free(prev);
}
- else if (!ft_strncmp(com[0], "./", 2))
- ft_exec(com);
else
- return (ft_error(com[0], 127));
+ return (ft_exec(com));
return (0);
}