From cdf0d12937adbe31ba0bb4f93258fdb6bf3dbd3a Mon Sep 17 00:00:00 2001 From: Verdayne Graham <9086968+verdayne@users.noreply.github.com> Date: Sat, 22 Oct 2022 12:17:33 +0000 Subject: [PATCH] refactor(nu): simplify getting term width (#4503) refactor(init,nu): simplify getting term width --- src/init/starship.nu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init/starship.nu b/src/init/starship.nu index b9fc7bea..95a9b0b1 100644 --- a/src/init/starship.nu +++ b/src/init/starship.nu @@ -8,7 +8,7 @@ let-env PROMPT_INDICATOR = "" let-env PROMPT_COMMAND = { # jobs are not supported - let width = (term size | get columns | into string) + let width = (term size).columns ^::STARSHIP:: prompt $"--cmd-duration=($env.CMD_DURATION_MS)" $"--status=($env.LAST_EXIT_CODE)" $"--terminal-width=($width)" }