diff options
author | Shav Kinderlehrer <[email protected]> | 2023-08-10 11:13:22 -0400 |
---|---|---|
committer | Shav Kinderlehrer <[email protected]> | 2023-08-10 11:13:22 -0400 |
commit | 3ba25af848e9789a9a631590d9a251902ee18440 (patch) | |
tree | 1a8560007e810e18813f0162072440fe77964d59 /source/style/package.d | |
parent | 24220d8e07ebbf0d0644681de0403ecd364b255a (diff) | |
download | prim-3ba25af848e9789a9a631590d9a251902ee18440.tar.gz prim-3ba25af848e9789a9a631590d9a251902ee18440.zip |
Update path comp in ps1
Diffstat (limited to 'source/style/package.d')
-rw-r--r-- | source/style/package.d | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/style/package.d b/source/style/package.d index 57e87c2..2e5ff7f 100644 --- a/source/style/package.d +++ b/source/style/package.d @@ -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%}") : ""); } |