]> git.armaanb.net Git - gen-shell.git/blobdiff - src/prompt.cpp
added argument parsing with Sarge
[gen-shell.git] / src / prompt.cpp
index 5b594983ade912ae5068b4ab2ddfd83386305559..493425a9a6b03854932b0f7f2b23f67a0dad0b41 100644 (file)
 #include <vector>
 #include <string>
 
-static std::vector <std::string> contextColors = {
-  "bold white on red",
-  "bold white on blue",
-  "bold white on green",
-  "bold white on magenta",
-  "black on cyan",
-  "black on yellow",
-  "black on white",
-};
+////////////////////////////////////////////////////////////////////////////////
 
 static std::vector <std::string> contexts;
-
 std::string composeContexts (bool pretty = false);
 
-////////////////////////////////////////////////////////////////////////////////
 int promptClear ()
 {
   contexts.clear ();
   return 0;
 }
 
-////////////////////////////////////////////////////////////////////////////////
 int promptRemove ()
 {
   if (contexts.size ())
@@ -59,6 +48,7 @@ int promptRemove ()
 }
 
 ////////////////////////////////////////////////////////////////////////////////
+
 int promptAdd (const std::string& context)
 {
   contexts.push_back (context);
@@ -66,27 +56,10 @@ int promptAdd (const std::string& context)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-std::string composeContexts (bool pretty /* = false */)
-{
-  std::string combined;
-  for (unsigned int i = 0; i < contexts.size (); i++)
-    if (pretty)
-      combined += (combined != "" ? " " : "")
-                + std::string ("\001")
-                + "\002";
-    else
-      combined += (combined != "" ? " " : "") + contexts[i];
-
-  if (combined != "")
-    combined += ' ';
 
-  return combined;
-}
-
-////////////////////////////////////////////////////////////////////////////////
 std::string promptCompose ()
 {
-  return ">>>";
+  return "";
 }
 
 ////////////////////////////////////////////////////////////////////////////////