summaryrefslogtreecommitdiff
path: root/source/prompt
diff options
context:
space:
mode:
authorShav Kinderlehrer <[email protected]>2023-08-09 15:05:26 -0400
committerShav Kinderlehrer <[email protected]>2023-08-09 15:05:26 -0400
commit24c94e510ab9c016542b287e060c992c195d7987 (patch)
treeb7cd353d3bf4a6a4220fde5c4b6a878c97c23022 /source/prompt
parentdd5c94c3174cc0fee0cbae4b51d47589894d0e5d (diff)
downloadprim-24c94e510ab9c016542b287e060c992c195d7987.tar.gz
prim-24c94e510ab9c016542b287e060c992c195d7987.zip
Start add basic prompt
Diffstat (limited to 'source/prompt')
-rw-r--r--source/prompt/preexec.d7
-rw-r--r--source/prompt/ps1.d9
2 files changed, 13 insertions, 3 deletions
diff --git a/source/prompt/preexec.d b/source/prompt/preexec.d
new file mode 100644
index 0000000..eb2d365
--- /dev/null
+++ b/source/prompt/preexec.d
@@ -0,0 +1,7 @@
+module prompt.preexec;
+
+import comp.hr;
+
+string preexec(int col) {
+ return hr(col);
+}
diff --git a/source/prompt/ps1.d b/source/prompt/ps1.d
index 338afe8..9bf8021 100644
--- a/source/prompt/ps1.d
+++ b/source/prompt/ps1.d
@@ -1,11 +1,14 @@
module prompt.ps1;
+import comp.hr;
+import style.color;
+
string ps1(int col) {
string ps;
- foreach (i; 0 .. col) {
- ps ~= '—';
- }
+ ps ~= hr(col);
+
+ ps ~= "> ".setColor(Color.magenta);
return ps;
}