Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.
/ 42-minishell Public archive

42 cursus project: Write a simple shell like bash. Learning about process and file descriptors

License

Notifications You must be signed in to change notification settings

42-josaykos/42-minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42-minishell

42 cursus project: Write a simple shell like bash. Learning about process and file descriptors

TODO:

  • piped commands exit_codes + redir exit_codes

  • export something without key=value pair should do nothing

  • error syntax when just pipe symbol

  • handle export without args + export whithout value

  • echo '\'

  • echo "hello\newline"

  • export VARIABLE=value; echo VARIABLE

  • echo "a\\ \ b c\" \'$SHELL\'"

  • export TEST="ls -l | cat -e"

  • handle SIGINT and SIGTERM in parse_cmdline(). Test: pwd; find /; date

  • disable raw_mode when parsing

  • improve signal handler printing characters + g_sig.sigint flag is missing

25/05:

  • exit codes unset "" test
  • export "" test=a
  • fix has_syntax_error function
  • echo bonjour >>> test
  • export test="ab[whitespaces]cd[whitespaces]ef" --> echo $test --> test="ab cd ef"
  • error message export $VAR=value if VAR doesn't exist in env
  • export $VAR=value
  • handle cd with multiples env args: cd $HOME/42cursus --> parsing/interpreter.c/handle_variables()
  • echo $USER$var\$USER$USER\$USERtest$USER
  • executable with absolut and relative path: cd srcs/ and ../minishell --> parsing/parse_path.c/is_exec_path()
  • handle error 126 when not an executable: ./srcs utils/error.c
  • . --> exit code 2
  • .. --> exit code 127
  • echo "bip | bip ; coyotte > < \" "
  • cat Makefile | grep pr | head -n 5 | cd file_not_exit --> exit code in pipes
  • ls | exit
  • pwd ; sleep 10 ; date --> exit code

Final tests ok 30/05:

  • ""
  • echo bonjour \; ls ---> escape character
  • echo bonjour > test\ 1 ---> escape character
  • echo $var bonjour ---> whitespace
  • export test=" foo bar " ; echo ""$test"" | cat -e
  • export test="file1 file2" ; >"$test" ---> error syntax

About

42 cursus project: Write a simple shell like bash. Learning about process and file descriptors

Topics

Resources

License

Stars

Watchers

Forks