Commit graph

274 commits

Author SHA1 Message Date
46c288c858
wordlist: add a function to debug-print a wordlist 2025-03-21 10:44:37 +01:00
Jérôme Guélen
b58848e091
Expansion: fix but still a problem matching '.'
Problem in the coherence of behaviour regarding ownership with star expansion
fixed.
2025-03-21 10:42:46 +01:00
Jérôme Guélen
da06c0d4e0
Expansion: one little problem remaining with * expansion and . 2025-03-21 10:16:00 +01:00
Jérôme Guélen
2da7f03a66
Expansion: Test directory for future portability
Tests to be readjusted for portability.
2025-03-21 10:15:10 +01:00
f0755cd6c4
tests: some fixes 2025-03-21 10:14:37 +01:00
Jérôme Guélen
ea3ecaaf31
Expansion: temporarily sharing broken version 2025-03-21 10:14:37 +01:00
Jérôme Guélen
0f8b18b32f
Expansion: Fixed inclusions and Norm checked
Now on to remake tests properly.
2025-03-21 10:14:37 +01:00
Jérôme Guélen
bed41f4a6f
Expansion: A fix attempt
No time left to check before going home
2025-03-21 10:14:34 +01:00
Jérôme Guélen
35d391a813
Expansion: Pre dividing of filepath_from_env
I still need to implement the cleaning of filename that is passed to expand_star
Recheck .h files in case I forgot to declare some of my functions in them.
Recheck if the Makefile indeed has all the sources listed.
Rework the tests after the evolution of our structures.
2025-03-21 10:13:54 +01:00
Jérôme Guélen
fc12d8e057
Expansion: fix: algo was wrong for wildcard
Hopefully, this is a proper fix. This commit serves mainly to save
advancement.
2025-03-21 10:12:56 +01:00
Jérôme Guélen
1766e8d1ba
Expansion: not dealing with potential directory yet 2025-03-21 10:11:58 +01:00
Jérôme Guélen
efae95950e
Expansion: pre split discussion
I forgot to code the minishell_split function.
2025-03-21 10:11:58 +01:00
Jérôme Guélen
de53d2b8bc
Expansion: Norm recheck 2025-03-21 10:11:58 +01:00
Jérôme Guélen
a41f10eda3
Expansion: wildcard exp v1.0
Checks still need to be made.
2025-03-21 10:11:58 +01:00
Jérôme Guélen
e7f12b54e9
Expansion: A version of quicksort for wordlists
It is intended to be used with the full version not the direct quicksort
as the direct one is not currently correctly protected against end index
being out of bounds.
2025-03-21 10:11:55 +01:00
Jérôme Guélen
95d9f6282a
Expansion: refactor in progress 2025-03-21 10:10:30 +01:00
Jérôme Guélen
ce24304e34
Expansion: post-rebasing 2025-03-21 10:10:30 +01:00
dd4f109d38
fix(worddesc_create): need to initialize mark_string 2025-03-21 10:10:17 +01:00
63df02aec5
fix: does not compile 2025-03-21 10:09:32 +01:00
Jérôme Guélen
174449cde7
Expansion: correction of type conflict
Tests done.
2025-03-21 10:09:32 +01:00
Jérôme Guélen
0703fece88
Expansion: Added a brute force word search
Just in case
2025-03-21 10:09:32 +01:00
Jérôme Guélen
63f94dc215
Expansion: Put back to norm in word search 2025-03-21 10:09:32 +01:00
Jérôme Guélen
768f1b3cb6
Expansion: Added research of words in text
An implementation of the Knuth, Morris and Pratt algorithm for the research
of the first occurrence of a word in a text.
2025-03-21 10:09:32 +01:00
Jérôme Guélen
fa383c4f17
Expansion: variable substitution V1 attempt
Norm has been checked, test are not up to date. Wildcard management and
filename expansions still to be done.
2025-03-21 10:09:28 +01:00
Jérôme Guélen
e348040ea4
Subst: A norm NON-compliant and incomplete version
The code does not update flags yet and is to be refactored to conform to the
norm.
Tests required but needing a new version of the wordsplitting code.
2025-03-21 10:07:32 +01:00
Jérôme Guélen
2dd54e2827
Exp : Quick logic fix 2025-03-21 10:04:25 +01:00
Jérôme Guélen
ed1d8b18fe
Expansion : text replacement in a string 2025-03-21 10:04:25 +01:00
d30a39d907
here_doc: prepare handling for variable expansion in here_doc
This is waiting on #23 to be merged to work
2025-03-11 14:58:13 +01:00
47f449d804
here_doc: handle unexpected EOF 2025-03-11 14:58:13 +01:00
7c6d061c6c
here_doc: handle input with correct end marker 2025-03-11 14:58:13 +01:00
a6d1386574
here_doc: handle input with only an end marker 2025-03-11 14:58:13 +01:00
442aa85e84
here_doc: null marker returns error 2025-03-11 14:58:13 +01:00
99babbf6d2
here_doc: generate random filenames 2025-03-11 14:58:13 +01:00
0486368a07
buffer: add ft_buffer_to_charptr function 2025-03-11 14:58:13 +01:00
cae2dfe4d6
here_doc: basic setup 2025-03-11 14:58:13 +01:00
588faccf69
norm: fix small norm error 2025-03-11 14:58:13 +01:00
d196649106
redirection parsing: handle other types of redirection 2025-03-11 14:58:13 +01:00
47ac767f2a
redirection parsing: check for null in arguments 2025-03-11 14:58:13 +01:00
d9dfac106d
redirection parsing refactor: put redirection found actions in subroutine 2025-03-11 14:57:58 +01:00
5df876bba3
redirection parsing: detect malformed redirection 2025-03-10 16:57:02 +01:00
06dd3c3e83
redirection parings: handle redirections not at start 2025-03-10 16:34:15 +01:00
4116c2d92f
wordlist: add destroy_idx and pop_idx functions 2025-03-10 16:08:59 +01:00
ad5eb4cc34
wordlist: add a function to debug-print a wordlist 2025-03-10 15:10:18 +01:00
2a1660865d
redirection parsing: use redir_type_from_worddesc 2025-03-10 15:10:18 +01:00
e7946b4192
redirection parsing: add missing null check 2025-03-10 15:10:18 +01:00
b0439c9d7d
redirection parsing: get redirection type from worddesc 2025-03-10 15:10:18 +01:00
a20ea8315d
redirection parsing: handle > at start of wordlist 2025-03-10 15:10:18 +01:00
541bad80c0
redirection parsing: add utility functions for t_redir_list 2025-03-10 15:10:18 +01:00
b0c34f36ef
redirection parsing: add utility function for t_redirection 2025-03-10 15:10:18 +01:00
cf517bb7f8
redirection parsing: define types in own files 2025-03-10 15:10:18 +01:00