diff options
Diffstat (limited to 'src/init/mod.rs')
-rw-r--r-- | src/init/mod.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/init/mod.rs b/src/init/mod.rs index 893a063c7..2450d7ac6 100644 --- a/src/init/mod.rs +++ b/src/init/mod.rs @@ -168,6 +168,10 @@ pub fn init_stub(shell_name: &str) -> io::Result<()> { starship.sprint_posix()? ), "nu" => print_script(NU_INIT, &StarshipPath::init()?.sprint_posix()?), + "xonsh" => print!( + r#"execx($({} init xonsh --print-full-init))"#, + starship.sprint_posix()? + ), _ => { let quoted_arg = shell_words::quote(shell_basename); println!( @@ -181,6 +185,7 @@ pub fn init_stub(shell_name: &str) -> io::Result<()> { * tcsh\\n\ * zsh\\n\ * nu\\n\ + * xonsh\\n\ \\n\ Please open an issue in the starship repo if you would like to \ see support for %s:\\nhttps://github.com/starship/starship/issues/new\\n\\n\" {0} {0}", @@ -204,6 +209,7 @@ pub fn init_main(shell_name: &str) -> io::Result<()> { "ion" => print_script(ION_INIT, &starship_path.sprint()?), "elvish" => print_script(ELVISH_INIT, &starship_path.sprint_posix()?), "tcsh" => print_script(TCSH_INIT, &starship_path.sprint_posix()?), + "xonsh" => print_script(XONSH_INIT, &starship_path.sprint_posix()?), _ => { println!( "printf \"Shell name detection failed on phase two init.\\n\ @@ -251,6 +257,8 @@ const TCSH_INIT: &str = include_str!("starship.tcsh"); const NU_INIT: &str = include_str!("starship.nu"); +const XONSH_INIT: &str = include_str!("starship.xsh"); + #[cfg(test)] mod tests { use super::*; |