From 859b780b46780fdcac8141a9d165066880c36261 Mon Sep 17 00:00:00 2001 From: David Knaack Date: Mon, 28 Mar 2022 19:40:06 +0200 Subject: [PATCH] fix(nu): use shell-provided terminal width (#3800) --- src/init/starship.nu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/init/starship.nu b/src/init/starship.nu index f3172914..fbd99fa7 100644 --- a/src/init/starship.nu +++ b/src/init/starship.nu @@ -8,7 +8,8 @@ let-env PROMPT_INDICATOR = "" let-env PROMPT_COMMAND = { # jobs are not supported - ^::STARSHIP:: prompt --cmd-duration $env.CMD_DURATION_MS --status $env.LAST_EXIT_CODE + let width = (term size -c | get columns | into string) + ^::STARSHIP:: prompt --cmd-duration $env.CMD_DURATION_MS --status $env.LAST_EXIT_CODE --terminal-width $width } # Not well-suited for `starship prompt --right`.