mirror of
https://github.com/starship/starship.git
synced 2026-06-24 02:01:36 +07:00
refactor(nu): simplify getting term width (#4503)
refactor(init,nu): simplify getting term width
This commit is contained in:
@@ -8,7 +8,7 @@ let-env PROMPT_INDICATOR = ""
|
|||||||
|
|
||||||
let-env PROMPT_COMMAND = {
|
let-env PROMPT_COMMAND = {
|
||||||
# jobs are not supported
|
# 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)"
|
^::STARSHIP:: prompt $"--cmd-duration=($env.CMD_DURATION_MS)" $"--status=($env.LAST_EXIT_CODE)" $"--terminal-width=($width)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user