Index: trunk/Ohana/src/opihi/lib.shell/CommandOps.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/CommandOps.c	(revision 42807)
+++ trunk/Ohana/src/opihi/lib.shell/CommandOps.c	(revision 42808)
@@ -59,8 +59,8 @@
 
   free (commands[Nc].name);
-  for (i = Nc + 1; i < Ncommands; i++)
+  for (i = Nc + 1; i < Ncommands; i++) {
     commands[i - 1] = commands[i];
+  }
   Ncommands --;
-  REALLOCATE (commands, Command, Ncommands);
   return (TRUE);
 }
Index: trunk/Ohana/src/opihi/lib.shell/ListOps.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/ListOps.c	(revision 42807)
+++ trunk/Ohana/src/opihi/lib.shell/ListOps.c	(revision 42808)
@@ -133,4 +133,7 @@
 }
 
+// this should return TRUE (is start of a new list-type environment)
+// if the word following 'macro' is not one of the following:
+// 'list', 'delete', 'read', 'write', 'edit'
 int is_macro_create (char *line) {
 
@@ -150,12 +153,16 @@
   if (this_macro == NULL) return (FALSE);
 
+  // the other macro subcommands do NOT start a new list environment
+  if (!strcmp("create", this_macro)) {
+    free (this_macro);
+    return (TRUE);
+  }
+
   cmd = find_macro_command (this_macro);
   free (this_macro);
 
-  if (cmd == NULL) {
-    return (FALSE);
-  }
-
-  return (TRUE);
+  if (cmd == NULL) return (TRUE);
+
+  return (FALSE);
 }
 
Index: trunk/Ohana/src/opihi/lib.shell/MacroOps.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/MacroOps.c	(revision 42807)
+++ trunk/Ohana/src/opihi/lib.shell/MacroOps.c	(revision 42808)
@@ -111,6 +111,7 @@
 
   FreeMacro (&macros[Nm]);
-  for (i = Nm + 1; i < Nmacros; i++)
+  for (i = Nm + 1; i < Nmacros; i++) {
     macros[i - 1] = macros[i];
+  }
   Nmacros --;
   return (TRUE);
Index: trunk/Ohana/src/opihi/lib.shell/macro_create.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/macro_create.c	(revision 42807)
+++ trunk/Ohana/src/opihi/lib.shell/macro_create.c	(revision 42808)
@@ -45,5 +45,5 @@
     cmd[0].func = macro_exec;
     AddCommand (cmd);
-    free (cmd);
+    free (cmd); // 
     macro = NewMacro (argv[1]);
   } else { /**** Old Macro ****/
