Commit Graph

78 Commits

Author SHA1 Message Date
marcnava-42cursus
39e5719183 terminado 2026-02-14 15:04:25 +01:00
marcnava-42cursus
c1e622947d fixed heredoc expansion 2026-02-14 14:37:56 +01:00
marcnava-42cursus
001709139b Merge branch 'fix/variable_expansion' into solo 2026-02-14 14:27:52 +01:00
marcnava-42cursus
73ed56aa16 heredoc and builtins fix 2026-02-14 14:26:58 +01:00
5852e8618f multiple fixes 2026-02-14 13:48:15 +01:00
marcnava-42cursus
ba40670ace Fixed variable expansion errors 2026-02-14 13:33:44 +01:00
marcnava-42cursus
dd6101edec A POR TODAAS 2026-02-14 06:14:59 +01:00
e2b734cf0c save commit 2026-02-14 05:48:18 +01:00
32b3bd72b5 fix: prompt was not being requested to hashmap 2026-02-14 02:05:49 +01:00
c95703b42b update: replaced set_env by set_var in export builtin 2026-02-14 02:02:52 +01:00
f4cfae1107 feat: added internal variables 2026-02-14 02:01:10 +01:00
marcnava-42cursus
6453abfda3 Fixed all norme from lexer, parser. minishell and builtins 2026-02-14 00:02:03 +01:00
marcnava-42cursus
637391470b Fixed exit using old code + updates 2026-02-13 22:05:25 +01:00
marcnava-42cursus
217505e3b0 Restored exit but adding isatty 2026-02-13 21:54:00 +01:00
3f17f7789c update: added isatty support and prompt usage 2026-02-13 20:18:26 +01:00
marcnava-42cursus
c166d0f77a feat: Added signals
Added functionality of the signals ctrl+d, ctrl+c and ctr+\
2026-02-13 18:11:48 +01:00
3e31447073 fix: fixed crash on non-existent variables
index was being moved to -1 if token was only the variable, this
probably works too for variables without value
2026-02-13 16:42:50 +01:00
c99e0a17a3 update: renamed variable 2026-02-13 15:08:41 +01:00
dc772d10c2 fix: syntax error on pipe at start was not being detected 2026-02-13 13:48:28 +01:00
e5d7fcf050 fix: fixed leak on variable expansion 2026-02-13 13:33:32 +01:00
d248819dfe fix: commands list was not being freed if the command line ended in pipe
error was reported but commands were being executed as the list was not
being freed
2026-02-13 09:29:24 +01:00
8f92cf269c fix: fixed crash when reading variables with underscore 2026-02-13 08:20:27 +01:00
d06e49274b Merge branch 'feature/executor-gl' into solo 2026-02-12 21:26:12 +01:00
83553a57d5 feat: added variable expansion
quote removal is not implemented yet in this commit
2026-02-12 21:18:50 +01:00
marcnava-42cursus
6bc2eab19b feat: Redirections applied
Now redirections work.
> redirects to a file
< reads the content of a file and set it to the input of a command
>> append the output of a command into a file
2026-02-12 20:28:05 +01:00
marcnava-42cursus
3c7ee5b161 Merge branch 'feature/builtins-gl' into feature/executor-gl
# Conflicts:
#	src/parser/parser.c
2026-02-12 18:36:05 +01:00
marcnava-42cursus
d1aad3ed20 Merge branch 'solo' into feature/executor-gl
# Conflicts:
#	src/parser/parser.c
2026-02-12 18:34:26 +01:00
8882929423 update: command list is now freed completely if any error ocurrs 2026-02-12 03:09:45 +01:00
843bdc0061 fix: invalid syntax error cause shown when there was no token following a redirection 2026-02-12 02:57:15 +01:00
ac4965ca6d fix: fixed multiple syntax error logging when redirection value is not a word
pointer is moved to the last position to avoid double logging
2026-02-11 10:12:20 +01:00
9d457f1040 norminette: added space after keyword 2026-02-11 08:37:02 +01:00
6b3d2ba5e0 fix: fixed segfault caused by invalid read
NULL value caused the error logger to crash
2026-02-11 08:36:05 +01:00
c493979a18 update: parser now uses tokens from lexer
fixes pending:
 - some functions are longer than norminette allows
 - find solution to a list of commands being returned, even though a
syntax error is found when processing tokens (maybe delegate some work
to the lexer and return only a syntax-valid list?)
2026-02-11 02:51:30 +01:00
marcnava-42cursus
df6ed1c5cc Executor working, need to validate with the parser fixed, all norme fixed 2026-02-11 02:29:45 +01:00
marcnava-42cursus
e02613253a Fixed command exit status and exec bugs, read relative and absolute paths and correctly resolved 2026-02-11 02:17:40 +01:00
marcnava-42cursus
ae578867b2 Moved find command in path to executor, fixed env save code 2026-02-11 02:09:12 +01:00
1715f2dd40 typo: fixed typo 2026-02-10 12:34:56 +01:00
63dd69b01c update: removed const modifier on token value
following steps on the parsing process can change its content
2026-02-10 09:24:18 +01:00
609a644fa9 update: token is now stored as value of the token instead of null
this change is made so that it is easier to print an error message when
invalid syntax
2026-02-10 09:20:46 +01:00
3d97d6506a fix: removed putendl on malloc 2026-02-10 08:54:11 +01:00
1f0f38e42f fix: removed putendl on free 2026-02-10 08:52:24 +01:00
97d8a6838f norminette: fixed line too long 2026-02-10 08:45:31 +01:00
6ad68a8752 update: added lexer 2026-02-09 23:11:33 +01:00
marcnava-42cursus
d39eca2c94 Fixed compilation 2026-02-09 22:48:12 +01:00
marcnava-42cursus
778e0c0481 Builtins fixed
The builtins wasnt protected, now all data received is protected, the hashmap addition is protected and added functionality of env, export and unset (not implemented in this version). Added fixed details documentation in docs/builtins_fixes.md generated by codex and created tests/builtins_edge_cases.sh to test all the builtins to work correctly
2026-02-09 22:08:45 +01:00
280fa51f94 save commit 2026-02-09 20:47:43 +01:00
e983f7fe64 update: builtins hashmap initialized and moved env hashmap initialization to set_envp() 2025-12-02 09:13:59 +01:00
b1cf1d8560 update: integrated hashmaps in builtins, and replaced command calls by builtins 2025-12-02 09:11:01 +01:00
dce51960b1 fix: fixed ignored result compilation errro 2025-12-01 16:31:02 +01:00
e9a07a6bfb fix: fixed compilation error 2025-12-01 14:12:15 +01:00