X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=src%2Fprompt.cpp;h=5b2e0487ae0284f95d7beccfcabbd2504c7e35e7;hb=f5b6ded9977a1df7f102c65666c9b0a89d7a4a6c;hp=6c98b7cf2749474acabc2946ceb0e13090f0faf7;hpb=fceb27bfab238cbc5d1f2498b7c2b2e7bb871ba4;p=gen-shell.git diff --git a/src/prompt.cpp b/src/prompt.cpp index 6c98b7c..5b2e048 100644 --- a/src/prompt.cpp +++ b/src/prompt.cpp @@ -27,17 +27,6 @@ #include #include #include -#include - -static std::vector 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 contexts; @@ -66,33 +55,10 @@ int promptAdd (const std::string& context) return 0; } -//////////////////////////////////////////////////////////////////////////////// -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") - + Color::colorize ("\002 " + contexts[i] + " \001", contextColors[i % contextColors.size ()]) - + "\002"; - else - combined += (combined != "" ? " " : "") + contexts[i]; - - if (combined != "") - combined += ' '; - - return combined; -} - //////////////////////////////////////////////////////////////////////////////// std::string promptCompose () { -/* auto decoration = composeContexts (true); */ - // if (decoration.length ()) - // return "task " + decoration + "> "; - - return ">>>"; + return "% "; } ////////////////////////////////////////////////////////////////////////////////