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
commit bc3285abb0
Notes: sideshowbarker 2024-07-19 05:09:30 +09:00
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;