-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.hpp
More file actions
41 lines (35 loc) · 869 Bytes
/
shell.hpp
File metadata and controls
41 lines (35 loc) · 869 Bytes
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
37
38
39
40
41
#ifndef SHELL_HPP
#define SHELL_HPP
#include<iomanip>
#include<unistd.h>
#include<sys/wait.h>
#include<chrono>
#include<sstream>
#include<string>
#include<vector>
#include<iostream>
#include<unistd.h>
#include<cstring>
#include<stdio.h>
#include<stdlib.h>
class shell{
public:
shell(){std::cout << "welcome to shell" << std::endl;
}
~shell(){}
void appendHistory(std::vector<std::string>);
void showHistory();
std::vector<std::string> retrieveHistory(int);
double getPtime();
void setPtime(double);
void pwd();
void changeDirectories(std::vector<std::string>);
void myHandler(int);
void executeCommand(std::vector<std::string>);
void executePipeCommand(std::vector<std::string>);
void handlePipe(std::vector<std::string>, std::vector<std::string>);
private:
std::vector<std::vector<std::string> > history;
double ptime;
};
#endif