3
static Shell *shells[] = {
8
Shell *shelldefault = &shshell;
13
typedef struct Shellstack Shellstack;
21
Shellstack *shellstack;
29
return "shell name not found on line";
31
for(i=0; i<nelem(shells); i++)
32
if(shells[i]->matchname(w->s))
34
if(i == nelem(shells))
35
return "cannot determine shell type";
44
shellcmd = stow(shelldefault->name);
45
shellt = shelldefault;
46
setvar("MKSHELL", shellcmd);
55
s = Malloc(sizeof *s);
61
initshell(); /* reset to defaults */
69
if(shellstack == nil){
70
fprint(2, "internal shellstack error\n");
78
setvar("MKSHELL", shellcmd);