mirror of
https://github.com/starship/starship.git
synced 2026-06-22 02:02:12 +07:00
feat(nu): Add job support for nushell (#6684)
* Add job support for nushell * Do not raise minimum supported nushell version * Update documentation about job support on nushell
This commit is contained in:
@@ -2502,7 +2502,7 @@ The default functionality is:
|
||||
|
||||
::: warning
|
||||
|
||||
This module is not supported on tcsh and nu.
|
||||
This module is not supported on tcsh.
|
||||
|
||||
:::
|
||||
|
||||
|
||||
+14
-1
@@ -13,12 +13,18 @@ export-env { $env.STARSHIP_SHELL = "nu"; load-env {
|
||||
PROMPT_INDICATOR: ""
|
||||
|
||||
PROMPT_COMMAND: {||
|
||||
# jobs are not supported
|
||||
(
|
||||
^::STARSHIP:: prompt
|
||||
--cmd-duration $env.CMD_DURATION_MS
|
||||
$"--status=($env.LAST_EXIT_CODE)"
|
||||
--terminal-width (term size).columns
|
||||
...(
|
||||
if (which "job list" | where type == built-in | is-not-empty) {
|
||||
["--jobs", (job list | length)]
|
||||
} else {
|
||||
[]
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -33,6 +39,13 @@ export-env { $env.STARSHIP_SHELL = "nu"; load-env {
|
||||
--cmd-duration $env.CMD_DURATION_MS
|
||||
$"--status=($env.LAST_EXIT_CODE)"
|
||||
--terminal-width (term size).columns
|
||||
...(
|
||||
if (which "job list" | where type == built-in | is-not-empty) {
|
||||
["--jobs", (job list | length)]
|
||||
} else {
|
||||
[]
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user