- Support whitespace around commands better, and support the @
  prefix better
- Enhance the set support to unset, display value error correctly
- Enhance the command line support for parms, and env var expansion
- Enhance the echo command to not loose whitespace, and display
  output with % signs better

diff --git a/programs/wcmd/builtins.c b/programs/wcmd/builtins.c
index 9fe9384..cdc18a6 100644
--- a/programs/wcmd/builtins.c
+++ b/programs/wcmd/builtins.c
@@ -181,7 +181,7 @@
     echo_mode = 0;
     return;
   }
-  WCMD_output (command);
+  WCMD_output_asis (command);    
   WCMD_output (newline);
 
 }
@@ -566,6 +566,7 @@
 LPVOID env;
 char *p;
 int status;
+char buffer[1048];                                                   
 
   if (strlen(param1) == 0) {
     env = GetEnvironmentStrings ();
@@ -578,14 +579,26 @@
   else {
     p = strchr (s, '=');
     if (p == NULL) {
-      WCMD_output ("Command Syntax: SET variable=value\n");
+
+      /* FIXME: Emulate Win98 for now, ie "SET C" looks ONLY for an    
+         environment variable C, whereas on NT it shows ALL variables  
+         starting with C.                                              
+       */                                                            
+      status = GetEnvironmentVariable(s, buffer, sizeof(buffer));    
+      if (status) {                                                  
+        WCMD_output("%s=%s\n", s, buffer);                           
+      } else {                                                       
+        WCMD_output ("Environment variable %s not defined\n", s);    
+      }                                                              
       return;
     }
     *p++ = '\0';
-    status = SetEnvironmentVariable (s, p);
+
+    if (strlen(p) == 0) p = 0x00;                                    
+    status = SetEnvironmentVariable (s, p);   
     if (!status) WCMD_print_error();
   }
-  WCMD_output (newline);
+  /* WCMD_output (newline);   @JED*/
 }
 
 /****************************************************************************