myshell 2.0.0
Loading...
Searching...
No Matches
msh_builin_command.h
1//
2// Created by andrew on 11/14/23.
3//
4
5#ifndef MYSHELL_MSH_BUILIN_COMMAND_H
6#define MYSHELL_MSH_BUILIN_COMMAND_H
7
8#include <string>
9
10constexpr int DECLARATION_COMMAND = 1 << 0;
11
12using builtin_func_t = int (*)(int, char **);
13
19struct builtin {
20 builtin_func_t func;
21 int flags;
22
23 bool get_flag(int flag) const {
24 return flags & flag;
25 }
26};
27
28#endif //MYSHELL_MSH_BUILIN_COMMAND_H
The builtin command structure.
Definition msh_builin_command.h:19