Axel Belinfante <Axe...@cs...> writes:
> We are still using modules 2.2b (with some patches,
> which I posted to this list already some time ago) in our group,
> and I haven't followed the developments closely,
> but maybe someone knows the answer to this question:
>
> has support been added for the rc shell (from plan9) or the es shell?
I dunno about that since I haven't followed it enough either to figure
which is the `latest' or `current' version, but I hacked in es support
in 2.2b a long time ago and include the patches here, FWIW. I think
they should also work with rc. Hope it's helpful.
/assar
--- init-1.1.c Tue Feb 29 20:35:06 2000
+++ init.c Tue Feb 29 20:34:54 2000
@@ -276,6 +276,10 @@
shell_startups[1] = ".zshenv";
shell_startups[2] = ".zlogin";
shell_startups[3] = NULL;
+ } else if((strcmp("es", shell_name) == 0)) {
+ shell_startups = (char**) malloc(2*sizeof(char*));
+ shell_startups[0] = ".esrc";
+ shell_startups[3] = NULL;
} else {
shell_startups = (char**) malloc(1*sizeof(char*));
shell_startups[0] = NULL;
--- utility.c 1994/12/03 00:03:34 1.1
+++ utility.c 1994/12/04 02:41:56 1.2
@@ -619,6 +619,8 @@
fprintf(stdout, "(setenv \"%s\" \"%s\")\n", var, val);
} else if(!strcmp((char*) shell_derelict, "perl")) {
fprintf(stdout, "$ENV{'%s'} = \"%s\"%c", var, val, cmd_separator);
+ } else if(!strcmp((char*) shell_derelict, "es")) {
+ fprintf(stdout, "%s=%s%c", var, val, cmd_separator);
} else {
fprintf(stderr,
"ERROR in output_set_shell_variable(): Unrecognized shell derelict %s\n",
@@ -639,6 +641,8 @@
fprintf(stdout, "(setenv \"%s\" nil)\n", var);
} else if(!strcmp((char*) shell_derelict, "perl")) {
fprintf(stdout, "delete $ENV{'%s'}%c", var, cmd_separator);
+ } else if(!strcmp((char*) shell_derelict, "es")) {
+ fprintf(stdout, "%s=%c", var, cmd_separator);
} else {
fprintf(stderr,
"ERROR in output_unset_shell_variable(): Unrecognized shell derelict %s\n",
@@ -663,6 +667,8 @@
return strcpy(shell_derelict, "emacs");
} else if(!strcmp((char*) name, "perl")) {
return strcpy(shell_derelict, "perl");
+ } else if(!strcmp((char*) name, "es")) {
+ return strcpy(shell_derelict, "es");
}
return NULL;
@@ -767,6 +773,8 @@
*/
fprintf(aliasfile, "alias %s='%s'%c", var, val, alias_separator);
}
+ } else if(!strcmp(shell_derelict, "es")) {
+ fprintf(aliasfile, "fn %s { %s }%c", var, val, alias_separator);
}
return TCL_OK;
}
@@ -819,8 +827,9 @@
fprintf(aliasfile, "unalias %s%c", var, alias_separator);
fprintf(aliasfile, "unset -f %s%c", var, alias_separator);
}
+ } else if(!strcmp(shell_derelict, "es")) {
+ fprintf(aliasfile, "fn %s;", var, alias_separator);
}
-
return TCL_OK;
}
--- /dev/null Tue Feb 29 20:04:35 2000
+++ init/es.in Sat Dec 3 00:42:55 1994
@@ -0,0 +1,11 @@
+exec_prefix=@prefix@
+
+fn module args {
+ eval `{$exec_prefix/bin/modulecmd es $args}
+}
+
+MODULESHOME=@prefix@
+
+if {~ $MODULEPATH ()} {
+ MODULEPATH=@prefix@/modulefiles
+}
|