~emersion/mrsh

ref: a3e8e0570630cbafa59a9a6ae6ee64409c03b852 mrsh/include/builtin.h -rw-r--r-- 868 bytes
a3e8e057Drew DeVault Implement eval builtin 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef _BUILTIN_H
#define _BUILTIN_H

struct mrsh_state;

typedef int (*mrsh_builtin_func_t)(struct mrsh_state *state,
	int argc, char *argv[]);

void print_escaped(const char *value);

int builtin_alias(struct mrsh_state *state, int argc, char *argv[]);
int builtin_cd(struct mrsh_state *state, int argc, char *argv[]);
int builtin_colon(struct mrsh_state *state, int argc, char *argv[]);
int builtin_exit(struct mrsh_state *state, int argc, char *argv[]);
int builtin_eval(struct mrsh_state *state, int argc, char *argv[]);
int builtin_source(struct mrsh_state *state, int argc, char *argv[]);
int builtin_times(struct mrsh_state *state, int argc, char *argv[]);

int set(struct mrsh_state *state, int argc, char *argv[], bool cmdline);
int builtin_set(struct mrsh_state *state, int argc, char *argv[]);
const char *print_options(struct mrsh_state *state);

#endif