summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/readline.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/readline.rs b/src/readline.rs
index 365f5ec..8b3c847 100644
--- a/src/readline.rs
+++ b/src/readline.rs
@@ -12,7 +12,12 @@ impl Readline {
pub fn new() -> Self {
Self {
size: (24, 80),
- prompt: "$ ".into(),
+ prompt: if users::get_current_uid() == 0 {
+ "# "
+ } else {
+ "$ "
+ }
+ .into(),
input_line: "".into(),
pos: 0,
}