Skip to content

sadpenguinn/42sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42sh

42sh is a unix-like shell we developped with 4 team members in C. It is a final project in School 42, which opens up access to the First Internship. 42sh includes mandatory parts of two latest projects and many bonuses in the extra part. We implemented almost all.

Subject
Norm (42 code-style)

Compiling: make

Minishell Part

[✓] Prompt display
[✓] Run commands with their parameters and PATH monitoring
[✓] Error monitoring, without using errno, and return values of commands
[✓] Correct spaces and tabulations monitoring

21sh Part

[✓] Full edition of command line
[✓] Redirection and aggregation operators: >, >>, <<, <<, >&, <&, |, ;

42sh Part

Builtins:
[✓] cd
[✓] echo
[✓] exit
[✓] type
[✓] env
[✓] setenv
[✓] unsetenv
[✓] set
[✓] unset

[✓] &&, ||

[✓] Intern variable creation depending on syntax: name=value
[✓] Intern variable exportation to the environment, via built-in export
[✓] Possibility to list shell intern variables via built-in set (-n, -o options)
[✓] Intern and environement variables revocation, via built-in unset (-n, -v, -f options)
[✓] Environment variable creation for unique command, for instance: HOME=/tmp cd
[✓] Simple expansion of parameters depending on syntax ${} (no additionnal format required)
[✓] Exit code access of previously command via the expansion ${?}

[✓] Job control monitoring
[✓] Built-in jobs
[✓] Built-in fg
[✓] Built-in bg
[✓] &

[✓] Correct monitoring of signals

[✓] Each built-in must have enounced options by POSIX, except set / unset

[−] Inhibitors ” ’
[✓] Glob: * ? [] !

[✓] ~
[✓] ${parameter:-word}
[✓] ${parameter:=word}
[✓] ${parameter:?word}
[✓] ${parameter:+word}
[✓] ${#parameter}
[✓] ${parameter%}
[−] ${parameter%%}
[✓] ${parameter#}
[−] ${parameter##}
[✓] $[5 + 3 arithm]
[✓] $((5 + 3 arithm))

[✓] Control groups and sub-shells: (), {}
[✓] Control substitution: $()
[✓] Arithmetic expansion: (())
[✓] Process substitution: <(), >()

[✓] !!
[✓] !word
[✓] !number
[✓] !-number
[✓] File for history
[✓] Built-in fc
[✓] Search via Ctrl-R

[✓] Contextual autocomplete

[✓] Vi / Emacs mods

[✓] Alias management with built-ins alias / unalias

[✓] Hash table and built-in hash

[✓] Built-in test and operations: -b, -c, -d, -e, -f, -g, -L, -p, -r, -S, -s, -u, -w, -x, -z, =, !=, -eq, -ne, -ge, -lt, -le, !

[✓] Shell scripting (while, for, if, case, function, etc.)

[✓] Autocompletion for order/built-in parameters

[✓] Compliant with POSIX

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published