diff options
Diffstat (limited to 'src/readline.rs')
-rw-r--r-- | src/readline.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/readline.rs b/src/readline.rs index ea195ee..d689f95 100644 --- a/src/readline.rs +++ b/src/readline.rs | |||
@@ -12,6 +12,7 @@ use directories::ProjectDirs; | |||
12 | 12 | ||
13 | use regex::Regex; | 13 | use regex::Regex; |
14 | 14 | ||
15 | use crate::error::CalcError; | ||
15 | use crate::eval_math_expression; | 16 | use crate::eval_math_expression; |
16 | 17 | ||
17 | pub struct RLHelper { | 18 | pub struct RLHelper { |
@@ -67,6 +68,7 @@ impl Highlighter for LineHighlighter { | |||
67 | } | 68 | } |
68 | Owned(coloured) | 69 | Owned(coloured) |
69 | } | 70 | } |
71 | Err(CalcError::Help) => Owned(line.replace("help", "\x1b[36mhelp\x1b[0m")), | ||
70 | Err(_) => Owned(format!("\x1b[31m{}\x1b[0m", line)), | 72 | Err(_) => Owned(format!("\x1b[31m{}\x1b[0m", line)), |
71 | } | 73 | } |
72 | } | 74 | } |