-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcmdcode.h
More file actions
32 lines (28 loc) · 738 Bytes
/
cmdcode.h
File metadata and controls
32 lines (28 loc) · 738 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
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include "envar.h"
#include "path_handle.h"
extern char **environ;
#define CD 1
#define SETENV 2
#define UNSETENV 3
#define PRINTENV 4
#define SHOW_ALIAS 5
#define SET_ALIAS 6
#define UNSET_ALIAS 7
#define BYE 8
#define OTHER 9
void print_env();
void change_dir();
void set_env(char* env_var, char* val, int printOutput);
void unset_env(char* env_var, int printOutput);
void show_aliases();
void set_alias();
void unset_alias(char* name);
int executeOtherCommand(int cmd_ind); /* Handles execution of non-builtin commands*/
int is_alias(char* name);
char* get_alias_cmd(int index);
int check_infinite_alias(char* alias, char* cmd);