ab6a4d6368
envp_get_val: add tests + make it more consistent with envp_get_key
...
In particular, this is what is now changed:
- if line is null or empty, return null
- if line contains no =, return an empty string
This way, if non-null is returned, that means that line was valid. If null is
returned, there is either an error with line, or malloc failed.
2025-02-19 14:34:09 +01:00
af90bec318
envp_get_key: fix buffer overflow if line contains no '='
2025-02-19 14:34:09 +01:00
da447a2491
env_manip: make it compile
2025-02-19 14:34:08 +01:00
Jérôme Guélen
f0a181315b
WIP: env: getting key and value from an envp entry
2025-02-19 14:34:08 +01:00
6e1552a35d
fix: ';' is not a metacharacter
...
Co-authored-by: jguelen <jguelen@student.42lehavre.fr>
2025-02-11 19:04:05 +01:00
71a4df1bb0
fix: stdio needs to be included before readline for compilation to work
2025-02-11 16:38:49 +01:00
Khaïs COLIN
7a99014485
new matcher: metacharacter (separates words)
2025-02-07 15:29:43 +01:00
Khaïs COLIN
6aabe49df1
read: do not display prompt if not in a tty
2025-02-07 15:29:43 +01:00
Khaïs COLIN
8bfdb04630
read: add commands to history
2025-02-07 15:29:43 +01:00
Khaïs COLIN
a23b639f78
read: read a line with readline and echo it back
2025-02-07 15:29:43 +01:00
Khaïs COLIN
08101e295a
minishell: add basic main function
2025-02-07 15:29:43 +01:00