fix: keep Nushell startup resilient and correct OS icon

- Gate cached nu_scripts completion modules on per-version validity
  markers so an outdated completion file no longer aborts the whole
  config load; incompatible files automatically fall back to noop.
- Add 'pj completion doctor' to report enabled/disabled completions.
- Detect macOS via 'macos'/'mac'/'darwin' so the prompt shows the Apple
  icon instead of the Unknown symbol.
This commit is contained in:
2026-09-28 23:57:14 +08:00
parent deb4e45c4e
commit a489e10447
2 changed files with 114 additions and 9 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
def _pj_detect_os_key [] {
let os_name = ($nu.os-info.name? | default "" | into string | str lowercase)
if ($os_name | str contains "darwin") {
if (($os_name | str contains "macos") or ($os_name | str contains "darwin") or ($os_name | str contains "mac")) {
return "Macos"
}
if ($os_name | str contains "windows") {