Update path comp in ps1
This commit is contained in:
parent
24220d8e07
commit
3ba25af848
@ -14,10 +14,10 @@ import style.font;
|
||||
string ps1(Opts opt) {
|
||||
string ps;
|
||||
|
||||
string pathstr = path(opt.pathlen);
|
||||
string pathstr = path(opt.pathlen).set(Color.magenta).set(Font.italic).set(Font.bold);
|
||||
|
||||
ps ~= "\n";
|
||||
ps ~= (",-(" ~ pathstr.set(Color.magenta) ~ ")").set(Color.black);
|
||||
ps ~= (",-(" ~ pathstr ~ ")".set(Color.black)).set(Color.black);
|
||||
ps ~= "\n";
|
||||
|
||||
ps ~= ("'-(" ~ to!string(opt.status) ~ ") ").set(Color.black); // prompt char
|
||||
|
@ -5,5 +5,11 @@ import std.conv;
|
||||
import style.color;
|
||||
|
||||
string set(string s, int code) {
|
||||
return ("%{\x1b[" ~ to!string(code) ~ "m%}") ~ s ~ ("%{\x1b[" ~ to!string((Color.reset + 0)) ~ "m%}");
|
||||
return ("%{\x1b[" ~ to!string(code) ~ "m%}") ~ s ~ (
|
||||
"%{\x1b[" ~ to!string((Color.reset + 0)) ~ "m%}");
|
||||
}
|
||||
|
||||
string set(string s, int code, bool close) {
|
||||
return ("%{\x1b[" ~ to!string(code) ~ "m%}") ~ s ~ (close ? (
|
||||
"%{\x1b[" ~ to!string((Color.reset + 0)) ~ "m%}") : "");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user