-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshellfunctions.h
More file actions
52 lines (36 loc) · 1.11 KB
/
Copy pathshellfunctions.h
File metadata and controls
52 lines (36 loc) · 1.11 KB
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
42
43
44
45
46
47
48
49
50
51
52
#ifndef FUNCTIONS_H
#define FUNCTIONS_H
#include "shell.h"
#include "shellfunctions.h"
#include "shellCmds.h"
/*initialize variables for shell*/
void initShell();
/*prints the command prompt*/
void printPrompt();
/*Print all commands that where entered*/
void printCommands();
/*reset shell global variables*/
void resetShell();
/*Check commands that where entered*/
int checkCmd();
/*check for and exapand aliases found in the command*/
int checkAlias();
/*execute the builtin commands*/
int execute();
/*execute the external commands*/
int executeOther();
/*handel occurence of an alias*/
int handleAlias(Cmd* cmd, Alias* alias, int position);
/*determine if there is a recursive alias*/
int isCircular(Alias* alias, int i);
/*find index of alias in alias_table*/
int findAlias(Alias* alias);
/*check if non-builin command is executable*/
int executable(Cmd* cmd, int index);
/*get local environment variable value*/
char* getLocalEnv(char * variable);
/*insert environment variable into string*/
char* insertEnvVal(char *str);
/*create multiple strings from wild card pattern*/
char* insertWildCard(char *str);
#endif