From 9b28c2268a9c03cbd386a323b6eb69a3b0090de2 Mon Sep 17 00:00:00 2001 From: Ruben Arts Date: Fri, 13 Oct 2023 15:39:37 +0200 Subject: [PATCH] fix: use invoke to update the prompt on every print so it updated the prompt every time. --- src/prompt.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/prompt.rs b/src/prompt.rs index 8d4b45ca9..506fffa06 100644 --- a/src/prompt.rs +++ b/src/prompt.rs @@ -28,11 +28,12 @@ pub fn get_xonsh_prompt() -> String { // Xonsh' default prompt can find the environment for some reason. "".to_string() } + /// Set default pixi prompt for the powershell pub fn get_powershell_prompt(env_name: &str) -> String { format!( - "$old_prompt = & $function:prompt\n\ - function prompt {{\"({}) $old_prompt\"}}", + "$old_prompt = $function:prompt\n\ + function prompt {{\"({}) $($old_prompt.Invoke())\"}}", env_name ) }