42sh 1.0.0
Create a shell in C
Loading...
Searching...
No Matches
shell.c File Reference

The file containing the shell functions. More...

Functions

mysh_tget_mysh (void)
 Get the shell structure.
 
mysh_tinit_shell (char **env)
 Initialize the shell structure.
 
void check_tty (void)
 Check if the shell is a tty and display the prompt if it is.
 
void shell (char **env)
 The shell loop.
 

Detailed Description

The file containing the shell functions.

Function Documentation

◆ check_tty()

void check_tty ( void )

Check if the shell is a tty and display the prompt if it is.

Returns
void

◆ get_mysh()

mysh_t * get_mysh ( void )

Get the shell structure.

Returns
mysh_t * The shell structure

◆ init_shell()

mysh_t * init_shell ( char ** env)

Initialize the shell structure.

Parameters
environThe environment variables
Returns
mysh_t * The shell structure

◆ shell()

void shell ( char ** env)

The shell loop.

Parameters
environThe environment variables
Returns
void