mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
Shell: Minimally implement the 'set' builtin
This only implements the printing and argv setting behaviours.
This commit is contained in:
parent
867f7da017
commit
5cb994d4dd
2 changed files with 90 additions and 19 deletions
|
@ -38,6 +38,7 @@
|
|||
__ENUMERATE_SHELL_BUILTIN(glob, InAllModes) \
|
||||
__ENUMERATE_SHELL_BUILTIN(unalias, InAllModes) \
|
||||
__ENUMERATE_SHELL_BUILTIN(unset, InAllModes) \
|
||||
__ENUMERATE_SHELL_BUILTIN(set, InAllModes) \
|
||||
__ENUMERATE_SHELL_BUILTIN(history, InAllModes) \
|
||||
__ENUMERATE_SHELL_BUILTIN(umask, InAllModes) \
|
||||
__ENUMERATE_SHELL_BUILTIN(not, InAllModes) \
|
||||
|
@ -479,15 +480,17 @@ private:
|
|||
// clang-format on
|
||||
};
|
||||
|
||||
bool m_should_ignore_jobs_on_next_exit { false };
|
||||
pid_t m_pid { 0 };
|
||||
|
||||
struct ShellFunction {
|
||||
DeprecatedString name;
|
||||
Vector<DeprecatedString> arguments;
|
||||
RefPtr<AST::Node> body;
|
||||
};
|
||||
|
||||
ErrorOr<String> serialize_function_definition(ShellFunction const&) const;
|
||||
|
||||
bool m_should_ignore_jobs_on_next_exit { false };
|
||||
pid_t m_pid { 0 };
|
||||
|
||||
HashMap<DeprecatedString, ShellFunction> m_functions;
|
||||
Vector<NonnullOwnPtr<LocalFrame>> m_local_frames;
|
||||
Promise::List m_active_promises;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue