summaryrefslogtreecommitdiff
path: root/src/user/app/shell/shell.h
blob: a8f001292c31f7738a3768bc9c9484a8fa7f225e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#pragma once
#include <stdbool.h>
#include <stddef.h>

#define eprintf(fmt, ...) fprintf(stderr, "sh: "fmt"\n" __VA_OPT__(,) __VA_ARGS__)

struct redir {
	const char *stdout;
	bool append;
};

int parse(char *s, char **argv, size_t argvlen, struct redir *redir);
void run_args(int argc, char **argv, struct redir *redir);