From 58260eb2724e6c55cbef93324bb910fa3d8f3998 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Fri, 12 Nov 2021 00:18:30 -0500 Subject: [PATCH] shells/nushell: fix starship prompt --- users/profiles/shells/nushell.nix | 7 ++++++- users/profiles/starship.nix | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/users/profiles/shells/nushell.nix b/users/profiles/shells/nushell.nix index 1c4b08f..b4fa4fd 100644 --- a/users/profiles/shells/nushell.nix +++ b/users/profiles/shells/nushell.nix @@ -4,7 +4,12 @@ settings = { complete_from_path = true; ctrlc_exit = true; - prompt = "STARSHIP_SHELL= starship prompt"; + startup = [ + "mkdir ~/.cache/starship" + "starship init nu | save ~/.cache/starship/init.nu" + "source ~/.cache/starship/init.nu" + ]; + prompt = "starship_prompt"; }; }; } diff --git a/users/profiles/starship.nix b/users/profiles/starship.nix index 9c26fd2..22925bd 100644 --- a/users/profiles/starship.nix +++ b/users/profiles/starship.nix @@ -17,8 +17,7 @@ ([╳](bold grey) $status$cmd_duration) [┌┨[$username@$hostname](${section.user_host})┠(┨$shell$shlvl┠)──(┨$nix_shell┠)───────────┨](${line_style}) [┝┫$directory(┣━┫$git_branch$git_status(@$git_commit)( $git_metrics)( $git_state))┃](${line_style}) - [└┨](${line_style})$character - ''; + [└┨](${line_style})$character''; character = rec { success_symbol = "[❯](bold purple)";