diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_b_echo.c | 5 | ||||
-rw-r--r-- | src/ft_b_export.c | 13 | ||||
-rw-r--r-- | src/ft_f_fail.c | 1 |
3 files changed, 13 insertions, 6 deletions
diff --git a/src/ft_b_echo.c b/src/ft_b_echo.c index abaf564..c50bd8b 100644 --- a/src/ft_b_echo.c +++ b/src/ft_b_echo.c @@ -15,7 +15,10 @@ #include "ft_s_struct.h" #include "ft_u_utils.h" - /* TODO: norme, echo $variables, echo "quoted text" */ +/* TODO: norme, echo $variables, echo "quoted text", echo 'quoted text', */ +/* echo kill\nbackslash\nbut\nnot\nn, echo "quoted\nnew\nlines" */ +/* Might need to go full buffer */ + uint8_t ft_b_echo(char *args[], diff --git a/src/ft_b_export.c b/src/ft_b_export.c index be4d94d..767db08 100644 --- a/src/ft_b_export.c +++ b/src/ft_b_export.c @@ -50,25 +50,30 @@ uint8_t ft_b_export(char *args[], t_msh *msh) { - char **ptr; const uint64_t argc = ft_get_argc((const char**)args); - int8_t next; + char **ptr; + int8_t next; + uint8_t r; if (argc == 0) { return (ft_b_env(NULL, msh)); } ptr = args; + r = 0; while (*ptr) { next = 0; if (!ft_check_valid_identifier(*ptr)) { ft_fail_identifier("export", *ptr); + next = 1; + r = 1; } - ft_check_equals(*ptr); + if (next == 0 && !ft_check_equals(*ptr)) + next = 1; ptr++; } /* TODO: finish export */ - return (0); + return (r); } diff --git a/src/ft_f_fail.c b/src/ft_f_fail.c index 9a826ed..621702b 100644 --- a/src/ft_f_fail.c +++ b/src/ft_f_fail.c @@ -28,7 +28,6 @@ void ft_write_fail(concern, FT_FAIL_NO_OPTIONS); } - /* TODO: export failed identifier `123' */ void ft_fail_identifier(const char concern[], const char identifier[]) |