summaryrefslogtreecommitdiffstats
path: root/src/print.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/print.rs')
-rw-r--r--src/print.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/print.rs b/src/print.rs
index 78e67694c..0330af07e 100644
--- a/src/print.rs
+++ b/src/print.rs
@@ -87,6 +87,13 @@ pub fn get_prompt(context: Context) -> String {
}
write!(buf, "{}", ANSIStrings(&module_strings)).unwrap();
+ // escape \n and ! characters for tcsh
+ if let Shell::Tcsh = context.shell {
+ buf = buf.replace('!', "\\!");
+ // space is required before newline
+ buf = buf.replace('\n', " \\n");
+ }
+
buf
}