summaryrefslogtreecommitdiffstats
path: root/src/print.rs
diff options
context:
space:
mode:
authorVivek Malneedi <vivekmalneedi@gmail.com>2021-02-27 13:55:27 -0500
committerGitHub <noreply@github.com>2021-02-27 19:55:27 +0100
commitd21400a4784e17b7a4afe110155c01717f835388 (patch)
treefad57a93c82b1e6b1ec32cbf55a0a9137145ab8f /src/print.rs
parentce2f844a2f5cb3a8bb12ce16acf3bcb9aaff5255 (diff)
feat: add support for tcsh (#2288)
* feat: add support for tcsh * add tcsh to install.sh install message * list tcsh in bug_report.rs and main.rs * quote starship path Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * fix job count * add tcsh support to shell module * fix STARSHIP_START_TIME undefined error * preserve existing user precmd and postcmd, remove jobs support * remove unnecessary parentheses * minor script improvement * removes parens from install script message * Update docs/config/README.md Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com> Co-authored-by: David Knaack <davidkna@users.noreply.github.com> Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
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
}