sophuwu.site > bashprompt
remove commented out blocks
sophuwu sophie@skisiel.com
Thu, 09 May 2024 03:44:46 +0200
commit

d00f684372dc1184475cf61479850b7fa1ae146f

parent

91ddcbc975500fc789311bf007d05219a955889c

1 files changed, 2 insertions(+), 8 deletions(-)

jump to
M src/prompt.cppsrc/prompt.cpp

@@ -170,9 +170,9 @@ while (st[i].length() < len) st[i] = " "+st[i];

st[i] = " " + st[i] + " "; } str ip = docmd("hostname -I | awk -F '.' ' { for(i=1;i<5;i++){printf(\"%.3d\", $i);}; } ' "); - PS1.add("\\$?", "190;180;30"); + PS1.add("\\$? ", "190;180;30"); PS1.add(emote(), std::to_string(randint(214)+30)); - PS1.add("|", "150;150;150"); + PS1.add(" |", "150;150;150"); str s = std::string(st[lineno%st.size()]); int s_len = (s.length()/4); if (s.length()%2==0) s_len++;

@@ -196,11 +196,5 @@ PS1.rain("$");

PS1.add(" "); PS1.set(); - /*str pwd; - try { pwd = std::string(getenv("PWD")); } - catch (std::exception e) { pwd = ""; } - if (user.back()=='\n')user.pop_back(); - output += " "; - output += pwd;*/ return 0; }