Use platform-specific prompt in hints.

This commit is contained in:
Justus Winter 2024-12-02 12:52:01 +01:00
parent f5fff14661
commit 099e9c8737
No known key found for this signature in database
GPG Key ID: 686F55B4AB2B3386

View File

@ -224,8 +224,13 @@ pub fn wrap_command<S: AsRef<str>>(command: &[S],
continuation_width: usize)
-> String
{
let prompt = platform! {
unix => { "$" },
windows => { ">" },
};
command.iter()
.fold(vec![format!("{}$", indent)], |mut s, arg| {
.fold(vec![format!("{}{}", indent, prompt)], |mut s, arg| {
let first = s.len() == 1;
let arg = arg.as_ref();