diff options
| author | Christopher Uhlig | 2025-01-14 20:21:31 +0100 |
|---|---|---|
| committer | Christopher Uhlig | 2025-01-14 20:21:31 +0100 |
| commit | ed75abf31c8e1f576df566ccf36bc7cf8b0e7ec5 (patch) | |
| tree | 60b1e8e36a7146400033e0593df63805441cb2a9 | |
| parent | 430521cc47e9f47fbd1005fade9251c31d9f3f18 (diff) | |
| download | minishell-ed75abf31c8e1f576df566ccf36bc7cf8b0e7ec5.tar.gz minishell-ed75abf31c8e1f576df566ccf36bc7cf8b0e7ec5.zip | |
fixe ? added a export return maybe ussles
| -rw-r--r-- | _obj/builtins_part_one.o | bin | 0 -> 3264 bytes | |||
| -rw-r--r-- | _obj/builtins_part_two.o | bin | 0 -> 2660 bytes | |||
| -rw-r--r-- | _obj/collect_redirs.o | bin | 0 -> 2776 bytes | |||
| -rw-r--r-- | _obj/debug_tools.o | bin | 0 -> 736 bytes | |||
| -rw-r--r-- | _obj/env.o | bin | 0 -> 1896 bytes | |||
| -rw-r--r-- | _obj/env_to_strlst.o | bin | 0 -> 1384 bytes | |||
| -rw-r--r-- | _obj/execute_cmd.o | bin | 0 -> 3192 bytes | |||
| -rw-r--r-- | _obj/format_string.o | bin | 0 -> 2132 bytes | |||
| -rw-r--r-- | _obj/free_node.o | bin | 0 -> 1472 bytes | |||
| -rw-r--r-- | _obj/free_token.o | bin | 0 -> 1168 bytes | |||
| -rw-r--r-- | _obj/get_cmd_path.o | bin | 0 -> 2024 bytes | |||
| -rw-r--r-- | _obj/init.o | bin | 0 -> 1064 bytes | |||
| -rw-r--r-- | _obj/interpreter.o | bin | 0 -> 2592 bytes | |||
| -rw-r--r-- | _obj/main.o | bin | 0 -> 1184 bytes | |||
| -rw-r--r-- | _obj/new_node.o | bin | 0 -> 1488 bytes | |||
| -rw-r--r-- | _obj/new_token.o | bin | 0 -> 1244 bytes | |||
| -rw-r--r-- | _obj/parse_cmd.o | bin | 0 -> 1472 bytes | |||
| -rw-r--r-- | _obj/parser.o | bin | 0 -> 1812 bytes | |||
| -rw-r--r-- | _obj/print_ast.o | bin | 0 -> 620 bytes | |||
| -rw-r--r-- | _obj/repl.o | bin | 0 -> 1200 bytes | |||
| -rw-r--r-- | _obj/signal_handling.o | bin | 0 -> 1388 bytes | |||
| -rw-r--r-- | _obj/tokenizer.o | bin | 0 -> 3000 bytes | |||
| -rw-r--r-- | garbage | 440 | ||||
| -rw-r--r-- | lib/libft/_obj/ft_atoi.o | bin | 0 -> 932 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_atol.o | bin | 0 -> 948 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_bzero.o | bin | 0 -> 676 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_calloc.o | bin | 0 -> 752 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_isalnum.o | bin | 0 -> 704 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_isalpha.o | bin | 0 -> 680 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_isascii.o | bin | 0 -> 664 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_isdigit.o | bin | 0 -> 664 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_isprint.o | bin | 0 -> 664 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_isspace.o | bin | 0 -> 672 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_itoa.o | bin | 0 -> 1236 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_lstadd_back_bonus.o | bin | 0 -> 716 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_lstadd_front_bonus.o | bin | 0 -> 652 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_lstclear_bonus.o | bin | 0 -> 780 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_lstdelone_bonus.o | bin | 0 -> 688 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_lstiter_bonus.o | bin | 0 -> 712 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_lstlast_bonus.o | bin | 0 -> 696 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_lstmap_bonus.o | bin | 0 -> 932 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_lstnew_bonus.o | bin | 0 -> 732 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_lstsize_bonus.o | bin | 0 -> 704 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_memchr.o | bin | 0 -> 724 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_memcmp.o | bin | 0 -> 740 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_memcpy.o | bin | 0 -> 764 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_memmove.o | bin | 0 -> 824 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_memset.o | bin | 0 -> 684 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_printaddr.o | bin | 0 -> 1128 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_printf.o | bin | 0 -> 2996 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_printhex.o | bin | 0 -> 1012 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_printnbr.o | bin | 0 -> 1704 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_putchar_fd.o | bin | 0 -> 680 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_putendl_fd.o | bin | 0 -> 860 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_putnbr_fd.o | bin | 0 -> 1088 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_putstr_fd.o | bin | 0 -> 740 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_split.o | bin | 0 -> 1936 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_strcat.o | bin | 0 -> 756 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_strchr.o | bin | 0 -> 756 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_strcmp.o | bin | 0 -> 748 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_strcpy.o | bin | 0 -> 700 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_strdup.o | bin | 0 -> 816 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_striteri.o | bin | 0 -> 696 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_strjoin.o | bin | 0 -> 1044 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_strlcat.o | bin | 0 -> 896 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_strlcpy.o | bin | 0 -> 872 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_strlen.o | bin | 0 -> 660 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_strmapi.o | bin | 0 -> 864 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_strncmp.o | bin | 0 -> 824 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_strncpy.o | bin | 0 -> 728 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_strnstr.o | bin | 0 -> 984 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_strrchr.o | bin | 0 -> 744 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_strtrim.o | bin | 0 -> 1232 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_substr.o | bin | 0 -> 912 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_tolower.o | bin | 0 -> 664 bytes | |||
| -rw-r--r-- | lib/libft/_obj/ft_toupper.o | bin | 0 -> 664 bytes | |||
| -rw-r--r-- | lib/libft/_obj/get_next_line.o | bin | 0 -> 1860 bytes | |||
| -rw-r--r-- | lib/libft/_obj/get_next_line_utils.o | bin | 0 -> 1384 bytes | |||
| -rw-r--r-- | lib/libft/libft.a | bin | 0 -> 55752 bytes | |||
| -rwxr-xr-x | minishell | bin | 0 -> 71552 bytes | |||
| -rw-r--r-- | src/builtins_part_one.c | 6 | ||||
| -rw-r--r-- | src/builtins_part_two.c | 7 | ||||
| -rw-r--r-- | src/env_to_strlst.c | 6 | ||||
| -rw-r--r-- | src/execute_cmd.c | 4 | ||||
| -rw-r--r-- | src/interpreter.c | 4 | ||||
| -rw-r--r-- | src/main.c | 5 |
86 files changed, 216 insertions, 256 deletions
diff --git a/_obj/builtins_part_one.o b/_obj/builtins_part_one.o Binary files differnew file mode 100644 index 0000000..e724cde --- /dev/null +++ b/_obj/builtins_part_one.o diff --git a/_obj/builtins_part_two.o b/_obj/builtins_part_two.o Binary files differnew file mode 100644 index 0000000..591351b --- /dev/null +++ b/_obj/builtins_part_two.o diff --git a/_obj/collect_redirs.o b/_obj/collect_redirs.o Binary files differnew file mode 100644 index 0000000..e9dfedc --- /dev/null +++ b/_obj/collect_redirs.o diff --git a/_obj/debug_tools.o b/_obj/debug_tools.o Binary files differnew file mode 100644 index 0000000..eaf039b --- /dev/null +++ b/_obj/debug_tools.o diff --git a/_obj/env.o b/_obj/env.o Binary files differnew file mode 100644 index 0000000..2db2bf1 --- /dev/null +++ b/_obj/env.o diff --git a/_obj/env_to_strlst.o b/_obj/env_to_strlst.o Binary files differnew file mode 100644 index 0000000..aef9925 --- /dev/null +++ b/_obj/env_to_strlst.o diff --git a/_obj/execute_cmd.o b/_obj/execute_cmd.o Binary files differnew file mode 100644 index 0000000..dd2108c --- /dev/null +++ b/_obj/execute_cmd.o diff --git a/_obj/format_string.o b/_obj/format_string.o Binary files differnew file mode 100644 index 0000000..34e623e --- /dev/null +++ b/_obj/format_string.o diff --git a/_obj/free_node.o b/_obj/free_node.o Binary files differnew file mode 100644 index 0000000..5f03965 --- /dev/null +++ b/_obj/free_node.o diff --git a/_obj/free_token.o b/_obj/free_token.o Binary files differnew file mode 100644 index 0000000..846891a --- /dev/null +++ b/_obj/free_token.o diff --git a/_obj/get_cmd_path.o b/_obj/get_cmd_path.o Binary files differnew file mode 100644 index 0000000..089c6cb --- /dev/null +++ b/_obj/get_cmd_path.o diff --git a/_obj/init.o b/_obj/init.o Binary files differnew file mode 100644 index 0000000..15686e9 --- /dev/null +++ b/_obj/init.o diff --git a/_obj/interpreter.o b/_obj/interpreter.o Binary files differnew file mode 100644 index 0000000..ede17a9 --- /dev/null +++ b/_obj/interpreter.o diff --git a/_obj/main.o b/_obj/main.o Binary files differnew file mode 100644 index 0000000..3c519b7 --- /dev/null +++ b/_obj/main.o diff --git a/_obj/new_node.o b/_obj/new_node.o Binary files differnew file mode 100644 index 0000000..01bb91a --- /dev/null +++ b/_obj/new_node.o diff --git a/_obj/new_token.o b/_obj/new_token.o Binary files differnew file mode 100644 index 0000000..769a27f --- /dev/null +++ b/_obj/new_token.o diff --git a/_obj/parse_cmd.o b/_obj/parse_cmd.o Binary files differnew file mode 100644 index 0000000..d958bed --- /dev/null +++ b/_obj/parse_cmd.o diff --git a/_obj/parser.o b/_obj/parser.o Binary files differnew file mode 100644 index 0000000..2bd36cc --- /dev/null +++ b/_obj/parser.o diff --git a/_obj/print_ast.o b/_obj/print_ast.o Binary files differnew file mode 100644 index 0000000..11b1189 --- /dev/null +++ b/_obj/print_ast.o diff --git a/_obj/repl.o b/_obj/repl.o Binary files differnew file mode 100644 index 0000000..a33185f --- /dev/null +++ b/_obj/repl.o diff --git a/_obj/signal_handling.o b/_obj/signal_handling.o Binary files differnew file mode 100644 index 0000000..b209798 --- /dev/null +++ b/_obj/signal_handling.o diff --git a/_obj/tokenizer.o b/_obj/tokenizer.o Binary files differnew file mode 100644 index 0000000..6301661 --- /dev/null +++ b/_obj/tokenizer.o @@ -499,217 +499,214 @@ und in parse cmd collect args and x format args seems to work later test x -Test 1: ✅ echo hello world -Test 2: ✅ echo "hello world" -Test 3: ✅ echo 'hello world' -Test 4: ✅ echo hello'world' -Test 5: ✅ echo hello""world -Test 6: ✅ echo '' -Test 7: ✅ echo "$PWD" -Test 8: ✅ echo '$PWD' - - - -Test 9: ❌ echo "aspas ->'" string formater checken +Test 1: ✅ echo hello world +Test 2: ✅ echo "hello world" +Test 3: ✅ echo 'hello world' +Test 4: ✅ echo hello'world' +Test 5: ✅ echo hello""world +Test 6: ✅ echo '' +Test 7: ✅ echo "$PWD" +Test 8: ✅ echo '$PWD' + +format_string problem +Test 9: ❌ echo "aspas ->'" mini output = (aspas ->") bash output = (aspas ->') -Test 10: ❌ echo "aspas -> ' " +Test 10: ❌ echo "aspas -> ' " mini output = (aspas -> ") bash output = (aspas -> ' ) -Test 11: ✅ echo 'aspas ->"' -Test 12: ✅ echo 'aspas -> " ' - - -Test 13: ❌ echo "> >> < * ? [ ] | ; [ ] || && ( ) & # $ <<" +Test 11: ✅ echo 'aspas ->"' +Test 12: ✅ echo 'aspas -> " ' +Test 13: ❌ echo "> >> < * ? [ ] | ; [ ] || && ( ) & # $ <<" mini output = (> >> < README.md bash.supp bash_outfiles bonus bonus_bonus builtins extras local.supp loop.out manual_tests mini_outfiles os_specific outfiles pipes redirects syntax test_files tester wildcards ? [ ] | ; [ ] || && ( ) & # ) bash output = (> >> < README.md bash.supp bash_outfiles bonus bonus_bonus builtins extras local.supp loop.out manual_tests mini_outfiles os_specific outfiles pipes redirects syntax test_files tester wildcards ? [ ] | ; [ ] || && ( ) & # $ <<) -Test 14: ✅ echo '> >> < * ? [ ] | ; [ ] || && ( ) & # $ <<' -Test 15: ❌ echo "exit_code ->$? user ->$USER home -> $HOME" -mini output = (exit_code ->/Users/dkaiser) -bash output = (exit_code ->0 user ->dkaiser home -> /Users/dkaiser) -Test 16: ✅ echo 'exit_code ->$? user ->$USER home -> $HOME' - -string formater checken -Test 17: ❌ echo "$" -mini output = (../minishell) +Test 14: ✅ echo '> >> < * ? [ ] | ; [ ] || && ( ) & # $ <<' +Test 15: ❌ echo "exit_code ->$? user ->$USER home -> $HOME" +mini output = (exit_code ->/Users/chuhlig) +bash output = (exit_code ->0 user ->chuhlig home -> /Users/chuhlig) +Test 16: ✅ echo 'exit_code ->$? user ->$USER home -> $HOME' +Test 17: ❌ echo "$" +mini output = (0) bash output = ($) -Test 18: ✅ echo '$' -Test 19: ❌ echo $ -mini output = (../minishell) +Test 18: ✅ echo '$' +Test 19: ❌ echo $ +mini output = (0) bash output = ($) -Test 20: ❌ echo $? -mini output = () -bash output = (0) -Test 21: ❌ echo $?HELLO +Test 20: ✅ echo $? +Test 21: ❌ echo $?HELLO mini output = () bash output = (0HELLO) -Test 22: ✅ pwd -Test 23: ✅ pwd oi -Test 24: ✅ export hello -Test 25: ✅ export HELLO=123 -Test 26: ❌ export A- -mini exit code = 0 -bash exit code = 1 +Test 22: ✅ pwd +Test 23: ✅ pwd oi + +Test 24: ❌ export hello //stupid +mini exit code = 1 +bash exit code = 0 +Test 25: ✅ export HELLO=123 +Test 26: ✅⚠️ export A- mini error = () bash error = ( not a valid identifier) -Test 27: ✅ export HELLO=123 A -Test 28: ✅ export HELLO="123 A-" -Test 29: ✅ export hello world -Test 30: ❌ export HELLO-=123 + fucking extra function for identifier + +Test 27: ❌ export HELLO=123 A +mini exit code = 1 +bash exit code = 0 +auch dum +Test 28: ✅ export HELLO="123 A-" +Test 29: ❌ export hello world +mini exit code = 1 +bash exit code = 0 +Test 30: ❌ export HELLO-=123 mini exit code = 0 bash exit code = 1 mini error = () bash error = ( not a valid identifier) -Test 31: ❌ export = +Test 31: ❌ export = mini exit code = 0 bash exit code = 1 mini error = () bash error = ( not a valid identifier) -Test 32: ❌ export 123 -mini exit code = 0 -bash exit code = 1 +Test 32: ✅⚠️ export 123 mini error = () bash error = ( not a valid identifier) -Test 33: ✅ unset -Test 34: ✅ unset HELLO -Test 35: ✅ unset HELLO1 HELLO2 -Test 36: ✅ unset HOME -Test 37: ✅ unset PATH -Test 38: ✅ unset SHELL -Test 39: ❌ cd $PWD +Test 33: ✅ unset +Test 34: ✅ unset HELLO +Test 35: ✅ unset HELLO1 HELLO2 +Test 36: ✅ unset HOME +Test 37: ✅ unset PATH +Test 38: ✅ unset SHELL + + +Test 39: ❌ cd $PWD mini exit code = 139 bash exit code = 0 -Test 40: ❌ cd $PWD hi +Test 40: ❌ cd $PWD hi mini exit code = 139 bash exit code = 0 -Test 41: ❌ cd 123123 +Test 41: ❌ cd 123123 mini exit code = 139 bash exit code = 1 mini error = () bash error = ( No such file or directory) -Test 42: ❌ exit 123 -mini exit code = 0 -bash exit code = 123 -Test 43: ❌ exit 298 -mini exit code = 0 -bash exit code = 42 -Test 44: ❌ exit +100 -mini exit code = 0 -bash exit code = 100 -Test 45: ❌ exit "+100" -mini exit code = 0 -bash exit code = 100 -Test 46: ❌ exit +"100" -mini exit code = 0 -bash exit code = 100 -Test 47: ❌ exit -100 -mini exit code = 0 -bash exit code = 156 -Test 48: ❌ exit "-100" -mini exit code = 0 -bash exit code = 156 -Test 49: ❌ exit -"100" -mini exit code = 0 -bash exit code = 156 -Test 50: ❌ exit hello + +Test 42: ✅ exit 123 +Test 43: ✅ exit 298 +Test 44: ✅ exit +100 +Test 45: ✅ exit "+100" +Test 46: ✅ exit +"100" +Test 47: ✅ exit -100 +Test 48: ✅ exit "-100" +Test 49: ✅ exit -"100" + +needs a update +Test 50: ❌ exit hello mini exit code = 0 bash exit code = 255 mini error = () bash error = ( numeric argument required) -Test 51: ❌ exit 42 world -mini exit code = 0 + +edge case +Test 51: ❌ exit 42 world +mini exit code = 42 bash exit code = 1 mini error = () bash error = ( too many arguments) -Test 52: ❌ -mini exit code = -bash exit code = 0 +Test 52: ✅ ———————————— pipes -Test 53: ✅ env | sort | grep -v SHLVL | grep -v ^_ -Test 54: ✅ cat ./test_files/infile_big | grep oi -Test 55: ✅ cat minishell.h | grep ");"$ -Test 56: ✅ export GHOST=123 | env | grep GHOST +Test 53: ❌ env | sort | grep -v SHLVL | grep -v ^_ +mini output = (?=0 COLORTERM=truecolor GIT_ASKPASS=/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass.sh HOME=/Users/chuhlig LANG=en_US.UTF-8 LOGNAME=chuhlig MallocNanoZone=0 ORIGINAL_XDG_CURRENT_DESKTOP=undefined PATH=/Users/chuhlig/goinfre/.brew/bin:/Users/chuhlig/goinfre/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/munki:/Library/Apple/usr/bin:/Users/chuhlig/goinfre/.brew/bin:/Users/chuhlig/Library/Application Support/Code/User/globalStorage/github.copilot-chat/debugCommand PWD=/Users/chuhlig/Desktop/minishell/minishell_tester SHELL=/bin/zsh SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.8vcs8lnaog/Listeners TERM=xterm-256color TERM_PROGRAM=vscode TERM_PROGRAM_VERSION=1.96.2 TMPDIR=/var/folders/zz/zyxvpxvq6csfxvn_n000ckjr0034mf/T/ USER=chuhlig USER_ZDOTDIR=/Users/chuhlig VSCODE_GIT_ASKPASS_EXTRA_ARGS= VSCODE_GIT_ASKPASS_MAIN=/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass-main.js VSCODE_GIT_ASKPASS_NODE=/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) VSCODE_GIT_IPC_HANDLE=/var/folders/zz/zyxvpxvq6csfxvn_n000ckjr0034mf/T/vscode-git-a7f217e79d.sock VSCODE_INJECTION=1 XPC_FLAGS=0x0 XPC_SERVICE_NAME=0 ZDOTDIR=/Users/chuhlig) +bash output = (COLORTERM=truecolor GIT_ASKPASS=/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass.sh HOME=/Users/chuhlig LANG=en_US.UTF-8 LOGNAME=chuhlig MallocNanoZone=0 ORIGINAL_XDG_CURRENT_DESKTOP=undefined PATH=/Users/chuhlig/goinfre/.brew/bin:/Users/chuhlig/goinfre/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/munki:/Library/Apple/usr/bin:/Users/chuhlig/goinfre/.brew/bin:/Users/chuhlig/Library/Application Support/Code/User/globalStorage/github.copilot-chat/debugCommand PWD=/Users/chuhlig/Desktop/minishell/minishell_tester SHELL=/bin/zsh SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.8vcs8lnaog/Listeners TERM=xterm-256color TERM_PROGRAM=vscode TERM_PROGRAM_VERSION=1.96.2 TMPDIR=/var/folders/zz/zyxvpxvq6csfxvn_n000ckjr0034mf/T/ USER=chuhlig USER_ZDOTDIR=/Users/chuhlig VSCODE_GIT_ASKPASS_EXTRA_ARGS= VSCODE_GIT_ASKPASS_MAIN=/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass-main.js VSCODE_GIT_ASKPASS_NODE=/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) VSCODE_GIT_IPC_HANDLE=/var/folders/zz/zyxvpxvq6csfxvn_n000ckjr0034mf/T/vscode-git-a7f217e79d.sock VSCODE_INJECTION=1 XPC_FLAGS=0x0 XPC_SERVICE_NAME=0 ZDOTDIR=/Users/chuhlig) +Test 54: ✅ cat ./test_files/infile_big | grep oi +Test 55: ✅ cat minishell.h | grep ");"$ +Test 56: ✅ export GHOST=123 | env | grep GHOST ———————————— redirects -Test 57: ✅ grep hi <./test_files/infile -Test 58: ✅ grep hi "<infile" < ./test_files/infile -Test 59: ✅ echo hi < ./test_files/infile bye bye -Test 60: ✅ grep hi <./test_files/infile_big <./test_files/infile -Test 61: ❌ echo <"./test_files/infile" "bonjour 42" +Test 57: ✅ grep hi <./test_files/infile +Test 58: ✅ grep hi "<infile" < ./test_files/infile +Test 59: ✅ echo hi < ./test_files/infile bye bye +Test 60: ✅ grep hi <./test_files/infile_big <./test_files/infile + + +Test 61: ❌ echo <"./test_files/infile" "bonjour 42" string handling issue mini output = () bash output = (bonjour 42) mini exit code = 1 bash exit code = 0 mini error = ( No such file or directory) bash error = () -Test 62: ❌ cat <"./test_files/file name with spaces" +Test 62: ❌ cat <"./test_files/file name with spaces" mini output = () bash output = (😈 😈 😈 This will break your minishell 😈 😈 😈) mini exit code = 1 bash exit code = 0 mini error = ( No such file or directory) bash error = () -Test 63: ✅ cat <./test_files/infile_big ./test_files/infile -Test 64: ✅ cat <"1""2""3""4""5" -Test 65: ✅ echo <"./test_files/infile" <missing <"./test_files/infile" -Test 66: ✅ echo <missing <"./test_files/infile" <missing -Test 67: ❌ cat <"./test_files/infile" +Test 63: ✅ cat <./test_files/infile_big ./test_files/infile +Test 64: ✅ cat <"1""2""3""4""5" +Test 65: ✅ echo <"./test_files/infile" <missing <"./test_files/infile" +Test 66: ✅ echo <missing <"./test_files/infile" <missing +Test 67: ❌ cat <"./test_files/infile" mini output = () bash output = (hi hello world 42) mini exit code = 1 bash exit code = 0 mini error = ( No such file or directory) bash error = () -Test 68: ❌ echo <"./test_files/infile_big" | cat <"./test_files/infile" +Test 68: ❌ echo <"./test_files/infile_big" | cat <"./test_files/infile" mini output = () bash output = (hi hello world 42) mini exit code = 1 bash exit code = 0 mini error = ( No such file or directory No such file or directory) bash error = () -Test 69: ✅⚠️ echo <"./test_files/infile_big" | cat "./test_files/infile" +Test 69: ✅⚠️ echo <"./test_files/infile_big" | cat "./test_files/infile" mini error = ( No such file or directory) bash error = () -Test 70: ❌ echo <"./test_files/infile_big" | echo <"./test_files/infile" +Test 70: ❌ echo <"./test_files/infile_big" | echo <"./test_files/infile" mini exit code = 1 bash exit code = 0 mini error = ( No such file or directory No such file or directory) bash error = () -Test 71: ❌ echo hi | cat <"./test_files/infile" +Test 71: ❌ echo hi | cat <"./test_files/infile" mini output = () bash output = (hi hello world 42) mini exit code = 1 bash exit code = 0 mini error = ( No such file or directory) bash error = () -Test 72: ✅ echo hi | cat "./test_files/infile" -Test 73: ✅⚠️ cat <"./test_files/infile" | echo hi +Test 72: ✅ echo hi | cat "./test_files/infile" +Test 73: ✅⚠️ cat <"./test_files/infile" | echo hi mini error = ( No such file or directory) bash error = ( Broken pipe) -Test 74: ❌ cat <"./test_files/infile" | grep hello +Test 74: ❌ cat <"./test_files/infile" | grep hello mini output = () bash output = (hello) mini exit code = 1 bash exit code = 0 mini error = ( No such file or directory) bash error = () -Test 75: ✅⚠️ cat <"./test_files/infile_big" | echo hi +Test 75: ✅⚠️ cat <"./test_files/infile_big" | echo hi mini error = ( No such file or directory) bash error = ( Broken pipe) -Test 76: ✅ cat <missing -Test 77: ✅ cat <missing | cat -Test 78: ✅ cat <missing | echo oi -Test 79: ❌ cat <missing | cat <"./test_files/infile" +Test 76: ✅ cat <missing +Test 77: ✅ cat <missing | cat +Test 78: ✅ cat <missing | echo oi +Test 79: ❌ cat <missing | cat <"./test_files/infile" tokenizer check again + mini output = () bash output = (hi hello world 42) mini exit code = 1 bash exit code = 0 -mini error = ( No such file or directory No such file or directory) +mini error = ( No such file or directory No such file or directory) should be esier to find bash error = ( No such file or directory) -Test 80: ✅ echo <123 <456 hi | echo 42 -Test 81: ✅ ls >./outfiles/outfile01 -Test 82: ✅ ls > ./outfiles/outfile01 -Test 83: ✅ echo hi > ./outfiles/outfile01 bye -Test 84: ❌ ls >./outfiles/outfile01 >./outfiles/outfile02 +Test 80: ✅ echo <123 <456 hi | echo 42 +Test 81: ✅ ls >./outfiles/outfile01 +Test 82: ✅ ls > ./outfiles/outfile01 +Test 83: ✅ echo hi > ./outfiles/outfile01 bye + + +check this extra + +Test 84: ❌ ls >./outfiles/outfile01 >./outfiles/outfile02 Only in ./bash_outfiles: outfile01 mini outfiles: README.md @@ -751,12 +748,12 @@ syntax test_files tester wildcards -Test 85: ❌ ls >./outfiles/outfile01 >./test_files/invalid_permission +Test 85: ❌ ls >./outfiles/outfile01 >./test_files/invalid_permission Only in ./bash_outfiles: outfile01 mini outfiles: cat: ./mini_outfiles/*: No such file or directory bash outfiles: -Test 86: ❌ ls >"./outfiles/outfile with spaces" +Test 86: ❌ ls >"./outfiles/outfile with spaces" Only in ./bash_outfiles: outfile with spaces mini outfiles: cat: ./mini_outfiles/*: No such file or directory @@ -784,7 +781,7 @@ mini exit code = 1 bash exit code = 0 mini error = ( No such file or directory) bash error = () -Test 87: ❌ ls >"./outfiles/outfile""1""2""3""4""5" +Test 87: ❌ ls >"./outfiles/outfile""1""2""3""4""5" Only in ./bash_outfiles: outfile12345 mini outfiles: cat: ./mini_outfiles/*: No such file or directory @@ -812,15 +809,15 @@ mini exit code = 1 bash exit code = 0 mini error = ( No such file or directory) bash error = () -Test 88: ❌ ls >"./outfiles/outfile01" >./test_files/invalid_permission >"./outfiles/outfile02" +Test 88: ❌ ls >"./outfiles/outfile01" >./test_files/invalid_permission >"./outfiles/outfile02" Only in ./bash_outfiles: outfile01 mini outfiles: cat: ./mini_outfiles/*: No such file or directory bash outfiles: mini error = ( No such file or directory) bash error = ( Permission denied) -Test 89: ✅ ls >./test_files/invalid_permission >"./outfiles/outfile01" >./test_files/invalid_permission -Test 90: ❌ cat <"./test_files/infile" >"./outfiles/outfile01" +Test 89: ✅ ls >./test_files/invalid_permission >"./outfiles/outfile01" >./test_files/invalid_permission +Test 90: ❌ cat <"./test_files/infile" >"./outfiles/outfile01" Only in ./bash_outfiles: outfile01 mini outfiles: cat: ./mini_outfiles/*: No such file or directory @@ -833,28 +830,28 @@ mini exit code = 1 bash exit code = 0 mini error = ( No such file or directory) bash error = () -Test 91: ✅ echo hi >./outfiles/outfile01 | echo bye -Test 92: ❌ echo hi >./outfiles/outfile01 >./outfiles/outfile02 | echo bye +Test 91: ✅ echo hi >./outfiles/outfile01 | echo bye +Test 92: ❌ echo hi >./outfiles/outfile01 >./outfiles/outfile02 | echo bye Only in ./bash_outfiles: outfile01 mini outfiles: hi bash outfiles: hi -Test 93: ✅ echo hi | echo >./outfiles/outfile01 bye -Test 94: ❌ echo hi | echo bye >./outfiles/outfile01 >./outfiles/outfile02 +Test 93: ✅ echo hi | echo >./outfiles/outfile01 bye +Test 94: ❌ echo hi | echo bye >./outfiles/outfile01 >./outfiles/outfile02 Only in ./bash_outfiles: outfile01 mini outfiles: bye bash outfiles: bye -Test 95: ✅ echo hi >./outfiles/outfile01 | echo bye >./outfiles/outfile02 -Test 96: ❌ echo hi >./outfiles/outfile01 >./test_files/invalid_permission | echo bye +Test 95: ✅ echo hi >./outfiles/outfile01 | echo bye >./outfiles/outfile02 +Test 96: ❌ echo hi >./outfiles/outfile01 >./test_files/invalid_permission | echo bye Only in ./bash_outfiles: outfile01 mini outfiles: cat: ./mini_outfiles/*: No such file or directory bash outfiles: -Test 97: ✅ echo hi >./test_files/invalid_permission | echo bye -Test 98: ❌ echo hi >./test_files/invalid_permission >./outfiles/outfile01 | echo bye +Test 97: ✅ echo hi >./test_files/invalid_permission | echo bye +Test 98: ❌ echo hi >./test_files/invalid_permission >./outfiles/outfile01 | echo bye Only in ./mini_outfiles: outfile01 mini outfiles: hi @@ -862,8 +859,8 @@ bash outfiles: cat: ./bash_outfiles/*: No such file or directory mini error = () bash error = ( Permission denied) -Test 99: ✅ echo hi | echo bye >./test_files/invalid_permission -Test 100: ❌ echo hi | >./outfiles/outfile01 echo bye >./test_files/invalid_permission +Test 99: ✅ echo hi | echo bye >./test_files/invalid_permission +Test 100: ❌ echo hi | >./outfiles/outfile01 echo bye >./test_files/invalid_permission Only in ./bash_outfiles: outfile01 mini outfiles: cat: ./mini_outfiles/*: No such file or directory @@ -872,7 +869,10 @@ mini exit code = 139 bash exit code = 1 mini error = () bash error = ( Permission denied) -Test 101: ❌ echo hi | echo bye >./test_files/invalid_permission >./outfiles/outfile01 + +update for this. + +Test 101: ❌ echo hi | echo bye >./test_files/invalid_permission >./outfiles/outfile01 Only in ./mini_outfiles: outfile01 mini outfiles: bye @@ -882,32 +882,32 @@ mini exit code = 0 bash exit code = 1 mini error = () bash error = ( Permission denied) -Test 102: ✅⚠️ cat <"./test_files/infile" >./test_files/invalid_permission +Test 102: ✅⚠️ cat <"./test_files/infile" >./test_files/invalid_permission mini error = ( No such file or directory) bash error = ( Permission denied) -Test 103: ✅⚠️ cat >./test_files/invalid_permission <"./test_files/infile" +Test 103: ✅⚠️ cat >./test_files/invalid_permission <"./test_files/infile" mini error = ( No such file or directory) bash error = ( Permission denied) -Test 104: ✅ cat <missing >./outfiles/outfile01 -Test 105: ❌ cat >./outfiles/outfile01 <missing +Test 104: ✅ cat <missing >./outfiles/outfile01 +Test 105: ❌ cat >./outfiles/outfile01 <missing Only in ./bash_outfiles: outfile01 mini outfiles: cat: ./mini_outfiles/*: No such file or directory bash outfiles: -Test 106: ✅ cat <missing >./test_files/invalid_permission -Test 107: ✅⚠️ cat >./test_files/invalid_permission <missing +Test 106: ✅ cat <missing >./test_files/invalid_permission +Test 107: ✅⚠️ cat >./test_files/invalid_permission <missing mini error = ( No such file or directory) bash error = ( Permission denied) -Test 108: ❌ cat >./outfiles/outfile01 <missing >./test_files/invalid_permission +Test 108: ❌ cat >./outfiles/outfile01 <missing >./test_files/invalid_permission Only in ./bash_outfiles: outfile01 mini outfiles: cat: ./mini_outfiles/*: No such file or directory bash outfiles: -Test 109: ✅ ls >>./outfiles/outfile01 -Test 110: ✅ ls >> ./outfiles/outfile01 -Test 111: ✅ ls >>./outfiles/outfile01 >./outfiles/outfile01 -Test 112: ✅ ls >./outfiles/outfile01 >>./outfiles/outfile01 -Test 113: ❌ ls >./outfiles/outfile01 >>./outfiles/outfile01 >./outfiles/outfile02 +Test 109: ✅ ls >>./outfiles/outfile01 +Test 110: ✅ ls >> ./outfiles/outfile01 +Test 111: ✅ ls >>./outfiles/outfile01 >./outfiles/outfile01 +Test 112: ✅ ls >./outfiles/outfile01 >>./outfiles/outfile01 +Test 113: ❌ ls >./outfiles/outfile01 >>./outfiles/outfile01 >./outfiles/outfile02 Only in ./bash_outfiles: outfile01 mini outfiles: README.md @@ -949,7 +949,7 @@ syntax test_files tester wildcards -Test 114: ❌ ls >>./outfiles/outfile01 >>./outfiles/outfile02 +Test 114: ❌ ls >>./outfiles/outfile01 >>./outfiles/outfile02 Only in ./bash_outfiles: outfile01 mini outfiles: README.md @@ -991,8 +991,8 @@ syntax test_files tester wildcards -Test 115: ✅ ls >>./test_files/invalid_permission -Test 116: ❌ ls >>./test_files/invalid_permission >>./outfiles/outfile01 +Test 115: ✅ ls >>./test_files/invalid_permission +Test 116: ❌ ls >>./test_files/invalid_permission >>./outfiles/outfile01 Only in ./mini_outfiles: outfile01 mini outfiles: README.md @@ -1020,12 +1020,12 @@ mini exit code = 0 bash exit code = 1 mini error = () bash error = ( Permission denied) -Test 117: ❌ ls >>./outfiles/outfile01 >>./test_files/invalid_permission +Test 117: ❌ ls >>./outfiles/outfile01 >>./test_files/invalid_permission Only in ./bash_outfiles: outfile01 mini outfiles: cat: ./mini_outfiles/*: No such file or directory bash outfiles: -Test 118: ❌ ls >./outfiles/outfile01 >>./test_files/invalid_permission >>./outfiles/outfile02 +Test 118: ❌ ls >./outfiles/outfile01 >>./test_files/invalid_permission >>./outfiles/outfile02 Only in ./bash_outfiles: outfile01 Only in ./mini_outfiles: outfile02 mini outfiles: @@ -1053,27 +1053,27 @@ mini exit code = 0 bash exit code = 1 mini error = () bash error = ( Permission denied) -Test 119: ✅ ls <missing >>./test_files/invalid_permission >>./outfiles/outfile02 -Test 120: ✅⚠️ ls >>./test_files/invalid_permission >>./outfiles/outfile02 <missing +Test 119: ✅ ls <missing >>./test_files/invalid_permission >>./outfiles/outfile02 +Test 120: ✅⚠️ ls >>./test_files/invalid_permission >>./outfiles/outfile02 <missing mini error = ( No such file or directory) bash error = ( Permission denied) -Test 121: ✅ echo hi >>./outfiles/outfile01 | echo bye -Test 122: ❌ echo hi >>./outfiles/outfile01 >>./outfiles/outfile02 | echo bye +Test 121: ✅ echo hi >>./outfiles/outfile01 | echo bye +Test 122: ❌ echo hi >>./outfiles/outfile01 >>./outfiles/outfile02 | echo bye Only in ./bash_outfiles: outfile01 mini outfiles: hi bash outfiles: hi -Test 123: ✅ echo hi | echo >>./outfiles/outfile01 bye -Test 124: ❌ echo hi | echo bye >>./outfiles/outfile01 >>./outfiles/outfile02 +Test 123: ✅ echo hi | echo >>./outfiles/outfile01 bye +Test 124: ❌ echo hi | echo bye >>./outfiles/outfile01 >>./outfiles/outfile02 Only in ./bash_outfiles: outfile01 mini outfiles: bye bash outfiles: bye -Test 125: ✅ echo hi >>./outfiles/outfile01 | echo bye >>./outfiles/outfile02 -Test 126: ✅ echo hi >>./test_files/invalid_permission | echo bye -Test 127: ❌ echo hi >>./test_files/invalid_permission >./outfiles/outfile01 | echo bye +Test 125: ✅ echo hi >>./outfiles/outfile01 | echo bye >>./outfiles/outfile02 +Test 126: ✅ echo hi >>./test_files/invalid_permission | echo bye +Test 127: ❌ echo hi >>./test_files/invalid_permission >./outfiles/outfile01 | echo bye Only in ./mini_outfiles: outfile01 mini outfiles: hi @@ -1081,149 +1081,103 @@ bash outfiles: cat: ./bash_outfiles/*: No such file or directory mini error = () bash error = ( Permission denied) -Test 128: ✅ echo hi | echo bye >>./test_files/invalid_permission -Test 129: ❌ echo hi | echo >>./outfiles/outfile01 bye >./test_files/invalid_permission +Test 128: ✅ echo hi | echo bye >>./test_files/invalid_permission +Test 129: ❌ echo hi | echo >>./outfiles/outfile01 bye >./test_files/invalid_permission Only in ./bash_outfiles: outfile01 mini outfiles: cat: ./mini_outfiles/*: No such file or directory bash outfiles: -Test 130: ✅ cat <minishell.h>./outfiles/outfile -Test 131: ✅ cat <minishell.h|ls +Test 130: ✅ cat <minishell.h>./outfiles/outfile +Test 131: ✅ cat <minishell.h|ls ———————————— extras -Test 132: ❌ -mini exit code = -bash exit code = 0 +Test 132: ✅ - -Test 133: ❌ $PWD +udpate this +Test 133: ❌ $PWD mini exit code = 1 bash exit code = 126 mini error = ( Permission denied) bash error = ( is a directory) - - -Test 134: ❌ $EMPTY +Test 134: ❌ $EMPTY mini exit code = 1 bash exit code = 0 mini error = ( Permission denied) bash error = () - -Test 135: ❌ $EMPTY echo hi +Test 135: ❌ $EMPTY echo hi mini output = () bash output = (hi) mini exit code = 1 bash exit code = 0 mini error = ( Permission denied) bash error = () -Test 136: ❌ ./test_files/invalid_permission -mini output = (./test_files/invalid_permission: command not found) +Test 136: ❌ ./test_files/invalid_permission +mini output = (command not found) bash output = () mini exit code = 1 bash exit code = 126 mini error = () bash error = ( Permission denied) -Test 137: ❌ ./missing.out -mini output = (./missing.out: command not found) +Test 137: ❌ ./missing.out +mini output = (command not found) bash output = () mini exit code = 1 bash exit code = 127 mini error = () bash error = ( No such file or directory) - - -Test 138: ❌ missing.out -mini output = (missing.out: command not found) +Test 138: ❌ missing.out +mini output = (command not found) bash output = () mini exit code = 1 bash exit code = 127 mini error = () bash error = ( command not found) - - -Test 139: ❌ "aaa" -mini output = (aaa: command not found) +Test 139: ❌ "aaa" +mini output = (command not found) bash output = () mini exit code = 1 bash exit code = 127 mini error = () bash error = ( command not found) - - -Test 140: ❌ test_files -mini output = (test_files: command not found) +Test 140: ❌ test_files +mini output = (command not found) bash output = () mini exit code = 1 bash exit code = 127 mini error = () bash error = ( command not found) -Test 141: ❌ ./test_files +Test 141: ❌ ./test_files mini exit code = 1 bash exit code = 126 mini error = ( Permission denied) bash error = ( is a directory) - - -Test 142: ❌ /test_files +Test 142: ❌ /test_files mini exit code = 1 bash exit code = 127 - -Test 143: ❌ minishell.h -mini output = (minishell.h: command not found) +Test 143: ❌ minishell.h +mini output = (command not found) bash output = () mini exit code = 1 bash exit code = 127 mini error = () bash error = ( command not found) -Test 144: ❌ $ +Test 144: ❌ $ +mini output = (command not found) +bash output = () mini exit code = 1 bash exit code = 127 mini error = () bash error = ( command not found) -Test 145: ❌ $? +Test 145: ❌ $? +mini output = (command not found) +bash output = () mini exit code = 1 bash exit code = 127 -mini error = ( Permission denied) +mini error = () bash error = ( command not found) -Test 146: ❌ README.md -mini output = (README.md: command not found) +Test 146: ❌ README.md +mini output = (command not found) bash output = () mini exit code = 1 bash exit code = 127 mini error = () -bash error = ( command not found) -74/146 -😭 😭 😭 -Collapse - - - - -1 - - - - - - - - - - - - -Message dkaiser - - - - - - - - - -Shift + Return to add a new line - - - - -Slack needs your permission to enable notifications. Enable notifications
\ No newline at end of file +bash error = ( command not found)
\ No newline at end of file diff --git a/lib/libft/_obj/ft_atoi.o b/lib/libft/_obj/ft_atoi.o Binary files differnew file mode 100644 index 0000000..efcdc0d --- /dev/null +++ b/lib/libft/_obj/ft_atoi.o diff --git a/lib/libft/_obj/ft_atol.o b/lib/libft/_obj/ft_atol.o Binary files differnew file mode 100644 index 0000000..3126061 --- /dev/null +++ b/lib/libft/_obj/ft_atol.o diff --git a/lib/libft/_obj/ft_bzero.o b/lib/libft/_obj/ft_bzero.o Binary files differnew file mode 100644 index 0000000..64ddf3a --- /dev/null +++ b/lib/libft/_obj/ft_bzero.o diff --git a/lib/libft/_obj/ft_calloc.o b/lib/libft/_obj/ft_calloc.o Binary files differnew file mode 100644 index 0000000..39c2c05 --- /dev/null +++ b/lib/libft/_obj/ft_calloc.o diff --git a/lib/libft/_obj/ft_isalnum.o b/lib/libft/_obj/ft_isalnum.o Binary files differnew file mode 100644 index 0000000..3aecc58 --- /dev/null +++ b/lib/libft/_obj/ft_isalnum.o diff --git a/lib/libft/_obj/ft_isalpha.o b/lib/libft/_obj/ft_isalpha.o Binary files differnew file mode 100644 index 0000000..da20b01 --- /dev/null +++ b/lib/libft/_obj/ft_isalpha.o diff --git a/lib/libft/_obj/ft_isascii.o b/lib/libft/_obj/ft_isascii.o Binary files differnew file mode 100644 index 0000000..2262942 --- /dev/null +++ b/lib/libft/_obj/ft_isascii.o diff --git a/lib/libft/_obj/ft_isdigit.o b/lib/libft/_obj/ft_isdigit.o Binary files differnew file mode 100644 index 0000000..a0e0f40 --- /dev/null +++ b/lib/libft/_obj/ft_isdigit.o diff --git a/lib/libft/_obj/ft_isprint.o b/lib/libft/_obj/ft_isprint.o Binary files differnew file mode 100644 index 0000000..8cf5033 --- /dev/null +++ b/lib/libft/_obj/ft_isprint.o diff --git a/lib/libft/_obj/ft_isspace.o b/lib/libft/_obj/ft_isspace.o Binary files differnew file mode 100644 index 0000000..f6f10e8 --- /dev/null +++ b/lib/libft/_obj/ft_isspace.o diff --git a/lib/libft/_obj/ft_itoa.o b/lib/libft/_obj/ft_itoa.o Binary files differnew file mode 100644 index 0000000..447812f --- /dev/null +++ b/lib/libft/_obj/ft_itoa.o diff --git a/lib/libft/_obj/ft_lstadd_back_bonus.o b/lib/libft/_obj/ft_lstadd_back_bonus.o Binary files differnew file mode 100644 index 0000000..566f7fc --- /dev/null +++ b/lib/libft/_obj/ft_lstadd_back_bonus.o diff --git a/lib/libft/_obj/ft_lstadd_front_bonus.o b/lib/libft/_obj/ft_lstadd_front_bonus.o Binary files differnew file mode 100644 index 0000000..f456510 --- /dev/null +++ b/lib/libft/_obj/ft_lstadd_front_bonus.o diff --git a/lib/libft/_obj/ft_lstclear_bonus.o b/lib/libft/_obj/ft_lstclear_bonus.o Binary files differnew file mode 100644 index 0000000..cbf23d7 --- /dev/null +++ b/lib/libft/_obj/ft_lstclear_bonus.o diff --git a/lib/libft/_obj/ft_lstdelone_bonus.o b/lib/libft/_obj/ft_lstdelone_bonus.o Binary files differnew file mode 100644 index 0000000..c357699 --- /dev/null +++ b/lib/libft/_obj/ft_lstdelone_bonus.o diff --git a/lib/libft/_obj/ft_lstiter_bonus.o b/lib/libft/_obj/ft_lstiter_bonus.o Binary files differnew file mode 100644 index 0000000..139d20d --- /dev/null +++ b/lib/libft/_obj/ft_lstiter_bonus.o diff --git a/lib/libft/_obj/ft_lstlast_bonus.o b/lib/libft/_obj/ft_lstlast_bonus.o Binary files differnew file mode 100644 index 0000000..0f262f1 --- /dev/null +++ b/lib/libft/_obj/ft_lstlast_bonus.o diff --git a/lib/libft/_obj/ft_lstmap_bonus.o b/lib/libft/_obj/ft_lstmap_bonus.o Binary files differnew file mode 100644 index 0000000..d4ed0b6 --- /dev/null +++ b/lib/libft/_obj/ft_lstmap_bonus.o diff --git a/lib/libft/_obj/ft_lstnew_bonus.o b/lib/libft/_obj/ft_lstnew_bonus.o Binary files differnew file mode 100644 index 0000000..98420b2 --- /dev/null +++ b/lib/libft/_obj/ft_lstnew_bonus.o diff --git a/lib/libft/_obj/ft_lstsize_bonus.o b/lib/libft/_obj/ft_lstsize_bonus.o Binary files differnew file mode 100644 index 0000000..1ce926d --- /dev/null +++ b/lib/libft/_obj/ft_lstsize_bonus.o diff --git a/lib/libft/_obj/ft_memchr.o b/lib/libft/_obj/ft_memchr.o Binary files differnew file mode 100644 index 0000000..23efe3d --- /dev/null +++ b/lib/libft/_obj/ft_memchr.o diff --git a/lib/libft/_obj/ft_memcmp.o b/lib/libft/_obj/ft_memcmp.o Binary files differnew file mode 100644 index 0000000..ca68348 --- /dev/null +++ b/lib/libft/_obj/ft_memcmp.o diff --git a/lib/libft/_obj/ft_memcpy.o b/lib/libft/_obj/ft_memcpy.o Binary files differnew file mode 100644 index 0000000..253e17e --- /dev/null +++ b/lib/libft/_obj/ft_memcpy.o diff --git a/lib/libft/_obj/ft_memmove.o b/lib/libft/_obj/ft_memmove.o Binary files differnew file mode 100644 index 0000000..df18bef --- /dev/null +++ b/lib/libft/_obj/ft_memmove.o diff --git a/lib/libft/_obj/ft_memset.o b/lib/libft/_obj/ft_memset.o Binary files differnew file mode 100644 index 0000000..be0b314 --- /dev/null +++ b/lib/libft/_obj/ft_memset.o diff --git a/lib/libft/_obj/ft_printaddr.o b/lib/libft/_obj/ft_printaddr.o Binary files differnew file mode 100644 index 0000000..64e9dea --- /dev/null +++ b/lib/libft/_obj/ft_printaddr.o diff --git a/lib/libft/_obj/ft_printf.o b/lib/libft/_obj/ft_printf.o Binary files differnew file mode 100644 index 0000000..44aedad --- /dev/null +++ b/lib/libft/_obj/ft_printf.o diff --git a/lib/libft/_obj/ft_printhex.o b/lib/libft/_obj/ft_printhex.o Binary files differnew file mode 100644 index 0000000..5ef814f --- /dev/null +++ b/lib/libft/_obj/ft_printhex.o diff --git a/lib/libft/_obj/ft_printnbr.o b/lib/libft/_obj/ft_printnbr.o Binary files differnew file mode 100644 index 0000000..278895f --- /dev/null +++ b/lib/libft/_obj/ft_printnbr.o diff --git a/lib/libft/_obj/ft_putchar_fd.o b/lib/libft/_obj/ft_putchar_fd.o Binary files differnew file mode 100644 index 0000000..e3a7ad2 --- /dev/null +++ b/lib/libft/_obj/ft_putchar_fd.o diff --git a/lib/libft/_obj/ft_putendl_fd.o b/lib/libft/_obj/ft_putendl_fd.o Binary files differnew file mode 100644 index 0000000..5ff74c8 --- /dev/null +++ b/lib/libft/_obj/ft_putendl_fd.o diff --git a/lib/libft/_obj/ft_putnbr_fd.o b/lib/libft/_obj/ft_putnbr_fd.o Binary files differnew file mode 100644 index 0000000..1de6482 --- /dev/null +++ b/lib/libft/_obj/ft_putnbr_fd.o diff --git a/lib/libft/_obj/ft_putstr_fd.o b/lib/libft/_obj/ft_putstr_fd.o Binary files differnew file mode 100644 index 0000000..bc970e3 --- /dev/null +++ b/lib/libft/_obj/ft_putstr_fd.o diff --git a/lib/libft/_obj/ft_split.o b/lib/libft/_obj/ft_split.o Binary files differnew file mode 100644 index 0000000..d5df61b --- /dev/null +++ b/lib/libft/_obj/ft_split.o diff --git a/lib/libft/_obj/ft_strcat.o b/lib/libft/_obj/ft_strcat.o Binary files differnew file mode 100644 index 0000000..f749d90 --- /dev/null +++ b/lib/libft/_obj/ft_strcat.o diff --git a/lib/libft/_obj/ft_strchr.o b/lib/libft/_obj/ft_strchr.o Binary files differnew file mode 100644 index 0000000..fea0b41 --- /dev/null +++ b/lib/libft/_obj/ft_strchr.o diff --git a/lib/libft/_obj/ft_strcmp.o b/lib/libft/_obj/ft_strcmp.o Binary files differnew file mode 100644 index 0000000..5c7286b --- /dev/null +++ b/lib/libft/_obj/ft_strcmp.o diff --git a/lib/libft/_obj/ft_strcpy.o b/lib/libft/_obj/ft_strcpy.o Binary files differnew file mode 100644 index 0000000..d556c8f --- /dev/null +++ b/lib/libft/_obj/ft_strcpy.o diff --git a/lib/libft/_obj/ft_strdup.o b/lib/libft/_obj/ft_strdup.o Binary files differnew file mode 100644 index 0000000..e052b40 --- /dev/null +++ b/lib/libft/_obj/ft_strdup.o diff --git a/lib/libft/_obj/ft_striteri.o b/lib/libft/_obj/ft_striteri.o Binary files differnew file mode 100644 index 0000000..e8264a9 --- /dev/null +++ b/lib/libft/_obj/ft_striteri.o diff --git a/lib/libft/_obj/ft_strjoin.o b/lib/libft/_obj/ft_strjoin.o Binary files differnew file mode 100644 index 0000000..bb8a89e --- /dev/null +++ b/lib/libft/_obj/ft_strjoin.o diff --git a/lib/libft/_obj/ft_strlcat.o b/lib/libft/_obj/ft_strlcat.o Binary files differnew file mode 100644 index 0000000..e7aff81 --- /dev/null +++ b/lib/libft/_obj/ft_strlcat.o diff --git a/lib/libft/_obj/ft_strlcpy.o b/lib/libft/_obj/ft_strlcpy.o Binary files differnew file mode 100644 index 0000000..695a120 --- /dev/null +++ b/lib/libft/_obj/ft_strlcpy.o diff --git a/lib/libft/_obj/ft_strlen.o b/lib/libft/_obj/ft_strlen.o Binary files differnew file mode 100644 index 0000000..2c66545 --- /dev/null +++ b/lib/libft/_obj/ft_strlen.o diff --git a/lib/libft/_obj/ft_strmapi.o b/lib/libft/_obj/ft_strmapi.o Binary files differnew file mode 100644 index 0000000..345a34a --- /dev/null +++ b/lib/libft/_obj/ft_strmapi.o diff --git a/lib/libft/_obj/ft_strncmp.o b/lib/libft/_obj/ft_strncmp.o Binary files differnew file mode 100644 index 0000000..683c861 --- /dev/null +++ b/lib/libft/_obj/ft_strncmp.o diff --git a/lib/libft/_obj/ft_strncpy.o b/lib/libft/_obj/ft_strncpy.o Binary files differnew file mode 100644 index 0000000..5585d29 --- /dev/null +++ b/lib/libft/_obj/ft_strncpy.o diff --git a/lib/libft/_obj/ft_strnstr.o b/lib/libft/_obj/ft_strnstr.o Binary files differnew file mode 100644 index 0000000..4f42fd4 --- /dev/null +++ b/lib/libft/_obj/ft_strnstr.o diff --git a/lib/libft/_obj/ft_strrchr.o b/lib/libft/_obj/ft_strrchr.o Binary files differnew file mode 100644 index 0000000..c6b2a16 --- /dev/null +++ b/lib/libft/_obj/ft_strrchr.o diff --git a/lib/libft/_obj/ft_strtrim.o b/lib/libft/_obj/ft_strtrim.o Binary files differnew file mode 100644 index 0000000..b4ac15c --- /dev/null +++ b/lib/libft/_obj/ft_strtrim.o diff --git a/lib/libft/_obj/ft_substr.o b/lib/libft/_obj/ft_substr.o Binary files differnew file mode 100644 index 0000000..eebbca7 --- /dev/null +++ b/lib/libft/_obj/ft_substr.o diff --git a/lib/libft/_obj/ft_tolower.o b/lib/libft/_obj/ft_tolower.o Binary files differnew file mode 100644 index 0000000..940856f --- /dev/null +++ b/lib/libft/_obj/ft_tolower.o diff --git a/lib/libft/_obj/ft_toupper.o b/lib/libft/_obj/ft_toupper.o Binary files differnew file mode 100644 index 0000000..137ae03 --- /dev/null +++ b/lib/libft/_obj/ft_toupper.o diff --git a/lib/libft/_obj/get_next_line.o b/lib/libft/_obj/get_next_line.o Binary files differnew file mode 100644 index 0000000..d5cbdc5 --- /dev/null +++ b/lib/libft/_obj/get_next_line.o diff --git a/lib/libft/_obj/get_next_line_utils.o b/lib/libft/_obj/get_next_line_utils.o Binary files differnew file mode 100644 index 0000000..0eecbe7 --- /dev/null +++ b/lib/libft/_obj/get_next_line_utils.o diff --git a/lib/libft/libft.a b/lib/libft/libft.a Binary files differnew file mode 100644 index 0000000..cec79c2 --- /dev/null +++ b/lib/libft/libft.a diff --git a/minishell b/minishell Binary files differnew file mode 100755 index 0000000..75d5573 --- /dev/null +++ b/minishell diff --git a/src/builtins_part_one.c b/src/builtins_part_one.c index 9f50157..f3bcfc0 100644 --- a/src/builtins_part_one.c +++ b/src/builtins_part_one.c @@ -6,7 +6,7 @@ /* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/08/09 17:01:16 by chuhlig #+# #+# */ -/* Updated: 2025/01/14 16:51:05 by chuhlig ### ########.fr */ +/* Updated: 2025/01/14 19:51:59 by chuhlig ### ########.fr */ /* */ /* ************************************************************************** */ @@ -129,13 +129,15 @@ int export(char **av, t_env **env) } current->value = ft_strdup(tmp + 1); } + else + return (1); } return (0); } void set_return_code(int return_code, t_env **env) { - t_env *cur; + t_env *cur; cur = check_existing(*env, "?"); if (cur) diff --git a/src/builtins_part_two.c b/src/builtins_part_two.c index 5af6c68..05d6943 100644 --- a/src/builtins_part_two.c +++ b/src/builtins_part_two.c @@ -6,7 +6,7 @@ /* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/10/25 20:52:16 by chuhlig #+# #+# */ -/* Updated: 2025/01/14 14:26:39 by chuhlig ### ########.fr */ +/* Updated: 2025/01/14 19:31:17 by chuhlig ### ########.fr */ /* */ /* ************************************************************************** */ @@ -101,6 +101,11 @@ int ft_env(t_env *env) { while (env != NULL) { + if (strchr(env->name, '?')) + { + env = env->next; + continue ; + } printf("%s", env->name); printf("=%s\n", env->value); env = env->next; diff --git a/src/env_to_strlst.c b/src/env_to_strlst.c index 40aaf9d..a1ab7cc 100644 --- a/src/env_to_strlst.c +++ b/src/env_to_strlst.c @@ -6,7 +6,7 @@ /* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/12/17 19:22:28 by chuhlig #+# #+# */ -/* Updated: 2025/01/14 14:10:49 by chuhlig ### ########.fr */ +/* Updated: 2025/01/14 19:34:10 by chuhlig ### ########.fr */ /* */ /* ************************************************************************** */ @@ -29,7 +29,7 @@ char **env_to_strlst(t_env *env) if (ft_strchr(cur->name, '?')) { cur = cur->next; - continue; + continue ; } size++; cur = cur->next; @@ -42,7 +42,7 @@ char **env_to_strlst(t_env *env) while (i < size) { if (ft_strchr(cur->name, '?')) - cur = cur->next; + cur = cur->next; result[i] = get_var_assign(cur); cur = cur->next; i++; diff --git a/src/execute_cmd.c b/src/execute_cmd.c index b9faf71..525f333 100644 --- a/src/execute_cmd.c +++ b/src/execute_cmd.c @@ -6,7 +6,7 @@ /* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/12/17 19:21:35 by chuhlig #+# #+# */ -/* Updated: 2025/01/14 16:56:24 by chuhlig ### ########.fr */ +/* Updated: 2025/01/14 19:55:18 by chuhlig ### ########.fr */ /* */ /* ************************************************************************** */ @@ -85,7 +85,7 @@ int execute_cmd(t_cmd *cmd, t_env **env) cmd_path = get_cmd_path(cmd->args[0], *env); if (!cmd_path) { - printf("command not found\n"); + perror("command not found"); exit(EXIT_FAILURE); } execve(cmd_path, cmd->args, env_to_strlst(*env)); diff --git a/src/interpreter.c b/src/interpreter.c index af1eb82..a1d3823 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -6,7 +6,7 @@ /* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/12/17 19:15:49 by chuhlig #+# #+# */ -/* Updated: 2025/01/14 16:59:45 by chuhlig ### ########.fr */ +/* Updated: 2025/01/14 19:52:27 by chuhlig ### ########.fr */ /* */ /* ************************************************************************** */ @@ -22,7 +22,7 @@ int handle_redirections(t_redirection *redirs) fd = open(redirs[0].specifier, O_RDONLY); if (fd < 0) { - perror(redirs[0].specifier); + perror("open"); return (-1); } dup2(fd, STDIN_FILENO); @@ -6,7 +6,7 @@ /* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/06/22 17:14:03 by dkaiser #+# #+# */ -/* Updated: 2025/01/14 15:29:20 by chuhlig ### ########.fr */ +/* Updated: 2025/01/14 18:41:15 by chuhlig ### ########.fr */ /* */ /* ************************************************************************** */ @@ -24,8 +24,7 @@ int main(int argc, char *argv[], char *envp[]) if (init()) return (1); getenvlst(&env, envp); - - set_return_code(0, &env); + set_return_code(0, &env); repl("Minishell $ ", &env, &promptflag); free_envlst(&env); return (0); |
