add set command and switch completely to . as an object seperator
[org.ibex.xt-crawshaw.git] / src / java / org / ibex / xt / shell / Env.java
index 6f37146..f09cc95 100644 (file)
@@ -17,14 +17,14 @@ public abstract class Env {
 
     /** Returns a path, based on console-style representation. */
     public String path(String c) {
-        if (c.equals("") || c.equals(".") || c.equals("/")) {
+        if (c.equals("") || c.equals(".")) {
             c = ".";
         } else if (c.equals("..")) {
+            c = path;
             c = c.substring(0, c.lastIndexOf('.'));
             if (c.equals("")) c = ".";
         } else {
-            if (c.charAt(0) != '/') c = path + "." + c;
-            c = c.replaceAll("/+", ".");
+            if (c.charAt(0) != '.') c = path + "." + c;
             if (c.length() > 1 && c.charAt(c.length() - 1) == '.')
                 c = c.substring(0, c.length() - 1);
         }