Closed ProjektPhoenix closed 3 months ago
[DONE] added the parm env array to history functions
free(home) in history set up
move set up history behind env setup
consider using get_home again
[DONE] exit argument message: "argument" instead of "arguments" in error message
[DONE, i.e. not needed] place update_dollar_underscore function behind echo builtin
[done] use getcwd() to retrieve HOME if $HOME is not set
use getcwd() to retrieve HOME did NOT WORK when started with env -i ./minishell
[DONE] cd .. cool swag
fix exit status
[DONE] in function not_implemented_builtin(const char *id) correct ft_strncmp length
[DONE but needs further checks] move function restore fds inside execution of command, builtin, heredoc so not to execute it or perhaps better only in the execute list and before starting a new loop
[DONE] if exit status is 0, echo $?
resolves to 0 and then echo $_
should give 0 instead of nothing
[DONE] heredoc should accept duplicate/repeating delimiters (they do not need to be different)
[DONE] if heredoc delimiter is ~ or other expansion, do not expand
-> add further tokens that should be treated as delimiters
[DONE] ~~"<<1 <<2" leads to double free in old heredoc implementation -> no such error in new heredoc implementation~~
executing "./minishell | minishell" in minishell leads to freeze
[DONE] single backslash as heredoc input gets ignored/removed
[FIXED] just * as command produced a segmentation fault with the files I had in the directory at the time, apparently in or after token merge in expansion UPDATE: no segmentation fault but lots of memory leaks !!!
executing "./minishell | minishell" in minishell leads to freeze
it works now? just tried and it works
minishell: minishell command not found...
Oh ok, after that the bash freezes!
Start in bash and do bash | bash
then do ./minishell
bash: line 3: $'\E[?2004l\r\E[?2004hminishell': command not found
Also doing again
bash | bash
ls
total mess
at least
c4c1c1% zsh | zsh
c4c1c1% ls
zsh: bad pattern: ^[[?1h^[=^[[?1l^[
c4c1c1%
zle-line-init:printf:2: write error: broken pipe
zle-line-init:2: write error: broken pipe
c4c1c1%
EMPTY PARENTHESES I removed this check in the tokenizer and we can reintroduce it later
if (is_empty_parenthesis(data->input, *i, start))
return (scanner_error(data, "minishell: syntax error near unexpected token ')'"));
[SOLVED] unset "" test leads to memory leak of one byte, presumably through allocation in the double quote expansion also the function looks for "test" in env at index -1 (!?)
if "#" is found within valid parentheses, it should not be evaluated as a comment and lexing continued
[FIXED kinda]
check for empty parentheses when exiting the tokenizer ()
or '( ( ( ) ) ) but probably
(((^^)))` is fine :)
[FIXED]
and the *
as first token crashes the system :)
[FIXED!]
in heredoc $0
is not expanded @ProjektPhoenix
[DONE] [EDIT] I added back the token and it now return $ plus one digit only as DOLLAR_DIGIT
[DONE] Hard code $0 to expand to splash and the rest expands to nothing