feat: update splash (#3631)

- Update splash styling.
- Add center truncation for long paths.
  (Uses new `center_truncate_path` utility.)
- Update the suggested commands.


## New splash
<img width="560" height="326" alt="image"
src="https://github.com/user-attachments/assets/b80d7075-f376-4019-a464-b96a78b0676d"
/>

## Example with truncation:
<img width="524" height="317" alt="image"
src="https://github.com/user-attachments/assets/b023c5cc-0bf0-4d21-9b98-bfea85546eda"
/>
This commit is contained in:
ae
2025-09-15 06:44:40 -07:00
committed by GitHub
parent fdf4a68646
commit 9baa5c33da
6 changed files with 379 additions and 64 deletions

View File

@@ -1,6 +1,7 @@
use std::path::Path;
use std::path::PathBuf;
use dirs::home_dir;
use shlex::try_join;
pub(crate) fn escape_command(command: &[String]) -> String {
@@ -27,13 +28,9 @@ where
return None;
}
if let Some(home_dir) = std::env::var_os("HOME").map(PathBuf::from)
&& let Ok(rel) = path.strip_prefix(&home_dir)
{
return Some(rel.to_path_buf());
}
None
let home_dir = home_dir()?;
let rel = path.strip_prefix(&home_dir).ok()?;
Some(rel.to_path_buf())
}
#[cfg(test)]