Skip to content

v1.0.0

Latest
Compare
Choose a tag to compare
@LeaYeh LeaYeh released this 15 Jun 16:55
· 163 commits to main since this release
603b116

Support Features

Category Module Function Requirement Status
Frontend Lexer Tokenizing Tokenized user input into token list.
Support the PIPE character |.
Support logical AND &&.
Support logical OR ||.
Support left and right brackets () for SUBSHELL.
Support WORD representing basic words.
Support ASSIGNMENT_WORD = for variable assignments.
Frontend Parser Syntax Analysis Analyze syntax of token list and report syntax errors based on Shift-Reduce algorithm with predefined grammar rules and then output as command table list.
Frontend Expander Brace Expansion Perform brace expansion to generate multiple strings based on expressions enclosed in braces {}.
Tilde Expansion Perform tilde expansion to replace ~ with the current user's home directory path. 🛇
Parameter Expansion Perform parameter expansion to replace variables and special parameters in a string.
Command Substitution Perform command substitution to replace command output in a string. 🛇
Arithmetic Expansion Perform arithmetic expansion to evaluate mathematical expressions enclosed in $(()). 🛇
Process Substitution Perform process substitution to use the output of a command as a file or input to another command. 🛇
Word Splitting Perform word splitting to split a string into separate words based on spaces, tabs, and newlines.
Wildcard Expansion Perform filename expansion (globbing) to generate filenames matching a specified pattern.
Quote Removal Remove quotes from strings to interpret them as literal values.
Backend Builtins cd Implement cd with only a relative or absolute path.
echo Implement echo with option -n.
env Implement env with no options or arguments.
exit Implement exit with no options.
export Implement export with no options.
pwd Implement pwd with no options.
unset Implement unset with no options.
Backend Redirection IO Redirection Redirected 'STDIN' with input redirection by '<' operator.
Redirected 'HEREDOC' with input redirection by '<<' operator.
Redirected 'STDOUT' with output redirection by '>' operator.
Redirected 'STDOUT' append with output redirection by '>>' operator.
Subsell Redirection Implement redirections and pipes (| character).
Pipe Redirection Redirected 'STDIN'/'STDOUT' by 'pipe()'.
Cross-end Signal Signal Handling Handled 'ctrl-C' as 'SIGINT' as bash behavior.
Handled 'ctrl-D' as 'EOF' as bash behavior.
Handled 'ctrl-\' as 'SIGQUIT' as bash behavior.
Exception Handling Ignored 'SIGPIPE' in internal process and set it back as default in external commands sub-process.
Used 'SIGABRT' and 'SIGTERM' to raise internal critical error to all related process and handle it depends on scenario.

What's Changed

  • [STYLE] Modify all filename with common convention by @LeaYeh in #268
  • [FIX] Print exit msg to stderr by @itislu in #270
  • [FIX] Cleanup heredoc files by @itislu in #272
  • [REFACTOR] Merge SIGINT handling of heredoc with standard by @itislu in #273
  • [CD] Add norminette test to GH Actions by @itislu in #271
  • [BUILD] Add ffclean goal to Makefile by @itislu in #275
  • [FIX] Fix funcheck without -a option by @itislu in #277
  • [FIX] Fix heredoc for subshell redirect by @itislu in #278
  • [CI] Install funcheck in setup by @LeaYeh in #276
  • [CHORE] Avoid misleading ft_free_and_null()s by @itislu in #279
  • [CI] Add manually triggered norminette workflow by @itislu in #280
  • [CI/CD] Fix manually triggered norminette workflow by @itislu in #284
  • [CHORE] Change size_t to int by @itislu in #282
  • [DOC] Update readme document structure by @LeaYeh in #286
  • [DOC] Add tutorial about frontend implementation by @LeaYeh in #287
  • [CHORE] Add .gitattributes file for git LFS by @itislu in #288
  • [DOC] Add notes from tablet by @itislu in #289
  • [DOC] Add another process flow note by @itislu in #290
  • [STYLE] Fix norm issues of debug folder by @itislu in #291
  • [CI] Add possibility to manually trigger the test workflow for any branch by @itislu in #293
  • [FIX] Fix wrong null-expansion after word-splitting and quote combination by @itislu in #283
  • [STYLE] Various tiny style changes and change shell->exit_code to unsigned char by @itislu in #297
  • [CI] Trigger test workflow when add new tag version by @LeaYeh in #294
  • [FEAT] Implement wildcard expansion for the current directory by @itislu in #292
  • [FIX] Fix filename expansion in non-interactive mode by @itislu in #298
  • [STYLE] Rename expander variable names by @itislu in #299
  • [FEAT] Expand $$ to PID of shell by @itislu in #300
  • [FIX] Make read_input() more general and also us it in heredoc by @itislu in #301
  • [DOC] Update badge colors in README by @itislu in #302
  • [CHORE] Put read_input() into utils by @itislu in #303
  • [FEAT] Add welcome message after init shell by @LeaYeh in #285
  • [STYLE] Change all occurances of 2 to STDERR_FILENO by @itislu in #304
  • [STYLE] Make all local functions static by @itislu in #305
  • [STYLE] Shorten the name of the typedefs by @itislu in #308
  • [BUILD] Print version of compiler when compiling by @itislu in #310
  • [FIX] Fix PT_ROWS size by @itislu in #309
  • [BUILD] Change Makefile to always compile in parallel by @itislu in #311
  • [CHORE] Use enumed types whenever possible by @itislu in #312
  • [CHORE] Small simplifications in frontend by @itislu in #313
  • [STYLE] Rename token_node to token when not a t_list by @itislu in #314
  • [STYLE] Make function signatures consistent by @itislu in #315
  • [STYLE] Change color/style macro names and add them also to Makefile by @itislu in #316
  • [CI] Print the outputs of the failed testcases by @itislu in #317
  • [FIX] Fix issues detected by cppcheck by @itislu in #319
  • [LIB] Use bitwise operators in basic alphabet functions to improve performance by @itislu in #323
  • [DOC] Make wave emoji italic to make the C in 🌊rash more obvious by @itislu in #321
  • [FIX] Replace forbidden getpid() function with custom version by @itislu in #327
  • [BUILD] Makefile improvements by @itislu in #328
  • [REVERT] Revert PR #323 by @itislu in #326
  • [LIB] Combine get_next_line and ft_printf into libft and simplify Makefiles by @itislu in #320
  • [DOC] Add fitting links to README badges by @itislu in #330
  • [DOC] Add acronym for Crash to README by @itislu in #331
  • [FIX] Fix interleaved error messages by @itislu in #329
  • [FIX] Close STD fds for all processes by @LeaYeh in #144
  • [FIX] Fix error message when PATH is an empty string by @itislu in #332
  • [CI] Improve readability when the test printouts only follow after a bunch of combined test summaries by @itislu in #335
  • [FIX] Fix file removal error when Ctrl+C in heredoc by @itislu in #334
  • [FIX] Fix overflow check for exit builtin and add overflow-check functions to libft by @itislu in #333
  • [FIX] Fix cd - with OLDPWD="" not printing an empty line by @itislu in #337
  • [FIX] Fix SIGABRT misuse by switching to SIGUSR1 by @itislu in #338

Full Changelog: v0.0.2...v1.0.0