terminal prompt needs to be recyclable

This commit is contained in:
2025-02-03 03:01:06 -05:00
parent 390ff9bccf
commit 49a62df236
14 changed files with 179 additions and 116 deletions

View File

@ -0,0 +1,10 @@
import { working_dir } from "../fs"
import rgb, { cyan, green } from "./color"
const GetWorkingDir = () => working_dir === "user" ? "~" : working_dir
export default function Prompt() {
const user = cyan("user")
const dir = green(GetWorkingDir())
return <p>{user}@host {dir}{"> "}</p>
}