Files
TerminalPolyjuice/nushell/modules/pj_starship.nu
2026-01-29 15:34:58 +08:00

12 lines
412 B
Nu

export def --env config [name: string] {
$env.starship_config = ($env.NU_POLYJUICE_PATH | path join ".." "starship" $"starship_($name).toml")
}
export def --env init [] {
let starship_nushell_path = ($env.NU_POLYJUICE_AUTOLOAD_DIRS | path join "starship.nu")
if ($starship_nushell_path | path exists) {
rm $starship_nushell_path
}
starship init nu | save -f $starship_nushell_path
}