feat(nushell): add cached nu_scripts completions bootstrap
- add pj completion command to clone/update nu_scripts cache - load fixed custom-completions for git/ssh/cargo/uv/rustup from cache - ignore nushell/cache contents in git while keeping placeholder .gitignore - source pj_completions at startup and align prompt indicators/newline behavior
This commit is contained in:
@@ -605,7 +605,8 @@ def _pj_left_prompt [] {
|
||||
for m in $lang_parts {
|
||||
$out = $"($out)($m)"
|
||||
}
|
||||
$out = $"\n($out)($time_part)($duration_part)\n"
|
||||
let prompt_newline = if (($nu.os-info.name | str downcase) == "windows") { "\n\r" } else { "\n" }
|
||||
$out = $"($prompt_newline)($out)($time_part)($duration_part)($prompt_newline)"
|
||||
$out
|
||||
}
|
||||
|
||||
@@ -626,8 +627,12 @@ export-env {
|
||||
PROMPT_INDICATOR: {||
|
||||
_pj_prompt_indicator
|
||||
}
|
||||
PROMPT_INDICATOR_VI_INSERT: ""
|
||||
PROMPT_INDICATOR_VI_NORMAL: ""
|
||||
PROMPT_INDICATOR_VI_INSERT: {||
|
||||
_pj_prompt_indicator
|
||||
}
|
||||
PROMPT_INDICATOR_VI_NORMAL: {||
|
||||
_pj_prompt_indicator
|
||||
}
|
||||
PROMPT_COMMAND: {||
|
||||
_pj_left_prompt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user