Skip to content

docs(book): configure the prompt through $env.config.prompt - #2293

Draft
kronberger-droid wants to merge 1 commit into
nushell:mainfrom
kronberger-droid:docs/prompt-config
Draft

kronberger-droid wants to merge 1 commit into
nushell:mainfrom
kronberger-droid:docs/prompt-config

Conversation

@kronberger-droid

Copy link
Copy Markdown
Contributor

Summary

nushell/nushell#18734 moved the prompt out of the PROMPT_* environment variables into $env.config.prompt, and the book still taught the variables.
This updates the English book pages for 0.118.

It should not be merged before 0.118.0 is released, since the keys do not exist in 0.117.

Before

The book configured the prompt through $env.PROMPT_COMMAND, $env.PROMPT_INDICATOR and friends, $env.config.render_right_prompt_on_last_line, and hide-env TRANSIENT_PROMPT_COMMAND to reset the transient prompt.
Two of those now error on a default setup: reading $env.PROMPT_COMMAND, and the hide-env.

After

  • book/configuration.md: the prompt and transient prompt sections list the $env.config.prompt keys, say which accept a closure, show how to wrap and restore the default prompt, and carry one note on the deprecated variables.
  • book/coloring_and_theming.md: same keys, the new vi indicator defaults, and that unstyled prompt text now keeps the terminal foreground (fix(prompt): don't tint a supplied prompt with the default colors nushell#18686).
  • book/3rdpartyprompts.md: the manual oh-my-posh and Starship snippets set the config keys.
  • book/line_editor.md: Helix select mode uses vi_visual.
  • book/environment.md, book/coming_from_cmd.md: one example each that used $env.PROMPT_COMMAND.

Additional notes

Every snippet was run on a build of main.
The translated pages and the generated commands/docs are not touched.

Describes nushell 0.118, where nushell/nushell#18734 moved the prompt
out of the `PROMPT_*` environment variables. Not for merging before
that release, since the book follows the released version.

The translated pages and the generated `commands/docs` are left alone.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant