Commit graph

48 commits

Author SHA1 Message Date
mcolonna
01722c4e21 merge 2024-07-04 12:02:56 +02:00
mcolonna
b6aed6ad78 things 2024-07-04 11:52:22 +02:00
joris schaft
668bd06c17 [FIX] export without arg 2024-07-03 19:01:35 +02:00
mcolonna
75150f95dd norm 2024-07-03 14:10:44 +02:00
mcolonna
6862a1913b fix: export builtin and other things *
fix: parse_command: syntaxes like: "hello"'hello'hello
fix: export builtin: "NAME=VALUE" syntax
fix: variables can contain digits
add: variables_nameisvalid()
change: dev/valgrind.sh
2024-07-03 12:18:16 +02:00
mcolonna
7d38a40717 fix: several builtins *
With the fork, the builtins didn't have access to the parent process values.
2024-07-01 14:33:38 +02:00
mcolonna
147743058d norm 2024-07-01 13:39:45 +02:00
mcolonna
3007dc9980 finish everything :) 2024-06-28 15:31:08 +02:00
mcolonna
532b4e959f [ADD] export builtin (unfinished) 2024-06-28 14:36:06 +02:00
mcolonna
f578b5311b dev: don't use t_variable where don't make sense *
also fix unset builtin
2024-06-28 13:15:05 +02:00
mcolonna
55459fae94 norminette 2024-06-28 12:58:51 +02:00
mcolonna
3f3028880b fix: signals (^C in $ cat) 2024-06-28 12:56:35 +02:00
mcolonna
368b46e82c merge 2024-06-28 12:06:17 +02:00
mcolonna
5b751b22fa little fixes 2024-06-28 11:45:42 +02:00
joris schaft
d72d88bded [FIX] fixed the cd builtin 2024-06-28 11:24:29 +02:00
mcolonna
5bece6093b [ADD] builtin unset 2024-06-27 16:08:38 +02:00
mcolonna
7c92b7fe56 merge 2024-06-27 15:55:32 +02:00
mcolonna
6b2360ab6b norminette: split parse_command.c 2024-06-27 14:53:45 +02:00
mcolonna
446a7655b6 fix: TODO and FIXME in the files 2024-06-25 15:46:19 +02:00
joris schaft
4af738e2ee [ADD] echo 2024-06-25 13:55:51 +02:00
mcolonna
f3a8866c56 merge 2024-06-25 13:42:15 +02:00
mcolonna
50096be197 change exec_builtins prototype 2024-06-25 13:38:36 +02:00
joris schaft
823c5b8ac8 [ADD] add some buitlin 2024-06-25 13:21:55 +02:00
mcolonna
ef11eb0c8c fix: $PATH checked from variables *
also fix variables assignment
2024-06-25 13:10:01 +02:00
mcolonna
0898d3b79a [ADD] signals handler *
also reorganize the code
2024-06-18 15:43:22 +02:00
mcolonna
44daaaf097 Merge manage variables with builtins & history 2024-06-06 16:37:28 +02:00
mcolonna
38170c7211 [ADD] manage variables *
Also:
- dev:
  - add docu
  - add fixes in TODO
  - add FIXME
2024-06-06 16:00:38 +02:00
joris schaft
d3fdd3bbf6 [ADD] cd builtin 2024-06-03 14:32:45 +02:00
joris schaft
1d6bd27675 [ADD] history 2024-05-31 13:47:33 +02:00
mcolonna
2ce36c258e Merge exec_command and parse_command modifications 2024-05-16 18:27:57 +02:00
mcolonna
d165229b59 norm 2024-05-16 18:11:08 +02:00
mcolonna
75bbeed855 libtfise 2024-05-16 17:32:07 +02:00
mcolonna
0c3d0ff95b make code more readable and fix things 2024-05-16 13:30:44 +02:00
joris schaft
9d70f4ccb2 [ADD] multiple pipe 2024-05-13 14:10:41 +02:00
mcolonna
74564daa52 libtfise everything 2024-05-01 18:00:40 +02:00
mcolonna
d7b4631701 redirections, empty command, parse errors++ 2024-04-30 16:27:59 +02:00
mcolonna
8d5ccfeb82 check some TODOs
- "is t_call.argv ended by NULL?"
- "does it return the good path if there is several possibilities?"
2024-04-29 15:56:49 +02:00
mcolonna
117631d50e manage errors 2024-04-29 15:49:12 +02:00
mcolonna
3a85b1a195 [FIX] wait all programs to end before prompting 2024-04-26 14:23:37 +02:00
mcolonna
149bafef88 check TODO 2024-04-26 12:33:38 +02:00
mcolonna
d90fc62be5 change execute_call() and fork_exec() prototypes 2024-04-26 12:28:23 +02:00
mcolonna
7df3184578 fix errors. Remaining errors:
- segfault when empty command
- doesn't wait for the end of the command before prompting
2024-04-25 18:15:37 +02:00
mcolonna
6066d0529b Merge exec_command() and parse_command() branchs 2024-04-25 17:47:21 +02:00
mcolonna
e3c98f2d22 [FIX] several things*
fix:
- free_tab(): useless line
- fork_exec(): comp error
change:
- search_path() works differently (doesn't modify path)
- execute_command() is changed accordingly
- get_path() now returns a non-const
2024-04-25 17:34:14 +02:00
mcolonna
af6488534b [ADD] parse_command() 2024-04-25 16:59:09 +02:00
mcolonna
24d8b38510 Merge branch 'mylan2' into mylan 2024-04-24 13:29:49 +02:00
mcolonna
2da8cbabdd add ask_command() and minishell_error() 2024-04-23 16:02:01 +02:00
mcolonna
a0ad80a375 basic functions to make 2024-04-23 14:55:47 +02:00