1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:37:34 +00:00

Shell: Read and evaluate an init file on start

This behaviour is overridable with the `--skip-init' flag.
The default file is at '~/shell-init.sh'
This commit is contained in:
AnotherTest 2020-06-17 19:37:44 +04:30 committed by Andreas Kling
parent 3d6a035d0f
commit bc3285abb0
4 changed files with 38 additions and 12 deletions

View file

@ -64,8 +64,11 @@ class Shell : public Core::Object {
C_OBJECT(Shell);
public:
constexpr static auto init_file_path = "~/shell-init.sh";
int run_command(const StringView&);
RefPtr<Job> run_command(AST::Command&);
bool run_file(const String&);
bool run_builtin(int argc, const char** argv, int& retval);
void block_on_job(RefPtr<Job>);
String prompt() const;