summaryrefslogtreecommitdiff
path: root/Source/Applications/Shell/Shell.class.h
blob: dd7ef3407efab2e656151b1417b5bda42724d877 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef DEF_SHELL_CLASS_H
#define DEF_SHELL_CLASS_H

#include <Binding/VirtualTerminal.class.h>
#include <Binding/FSNode.class.h>
#include <String.class.h>
#include <Map.class.h>

#include <App/ShellApp.proto.h>

#define PROMPTS_COLOR 5
#define PROMPTV_COLOR 9
#define ENTRY_COLOR 6
#define NORMAL_COLOR 7

struct shell_var_t {
	bool readonly;
	String value;
};

class Shell : public ShellApp {
	Map<String, shell_var_t> m_vars;

	void setupVars();

	public:
	Shell();

	int run();

	FSNode cwd;

	bool appRun(const String& name, Vector<String>& args);
};

#endif