module prompt.ps1; import std.conv; import prim.opt; import comp.hr; import comp.path; import style; import style.color; import style.font; string ps1(Opts opt) { string ps; string pathstr = path(opt.pathlen).set(Color.magenta).set(Font.italic).set(Font.bold); ps ~= "\n"; ps ~= (",-(" ~ pathstr ~ ")".set(Color.black)).set(Color.black); ps ~= "\n"; ps ~= ("'-(" ~ to!string(opt.status) ~ ") ").set(Color.black); // prompt char ps ~= (opt.pchar ~ " ").set(Font.bold).set(opt.status == 0 ? Color.green : Color.red); return ps; }