Livl Shell  0.1
Livl Shell is an intermediate reimplementation of the bash shell in C language.
builtin_commands.h
Go to the documentation of this file.
1 
7 #ifndef BUILTIN_COMMANDS_H
8 #define BUILTIN_COMMANDS_H
9 
10 #include <stdio.h>
11 #include <stdlib.h>
12 #include <unistd.h>
13 #include <string.h>
14 #include "typedef.h"
15 #include "constants.h"
16 #include "command_sequence.h"
17 #include "alias.h"
18 
25 int execute_builtin_command(const Command *command, CommandSequence *sequence);
26 
30 void pwd();
31 
36 void cd(const char *path);
37 
44 int is_builtin_command(const Command *command, const char *expected);
45 
52 int exit_shell(CommandSequence *sequence, int exit_code);
53 
58 void echo(const Command *command);
59 
60 #endif // BUILTIN_COMMANDS_H
CommandSequence
Struct that represents a command sequence.
Definition: typedef.h:123
echo
void echo(const Command *command)
Prints a message.
Definition: builtin_commands.c:40
alias.h
Managing livl-shell aliases.
Command
Struct that represents a command.
Definition: typedef.h:97
execute_builtin_command
int execute_builtin_command(const Command *command, CommandSequence *sequence)
Executes a command.
Definition: builtin_commands.c:49
cd
void cd(const char *path)
Changes the current directory.
Definition: builtin_commands.c:8
command_sequence.h
File containing the command sequence functions to manage the command sequence (commands and operators...
is_builtin_command
int is_builtin_command(const Command *command, const char *expected)
Checks if the command is a built-in command.
Definition: builtin_commands.c:3
exit_shell
int exit_shell(CommandSequence *sequence, int exit_code)
Exits the shell.
Definition: builtin_commands.c:29
pwd
void pwd()
Prints the current working directory.
Definition: builtin_commands.c:16
constants.h
Header file defining constants.
typedef.h
File containing all the typedefs used in the shell program.