fix: let-env warning when using nushell (#4893)

Fixed a startup error, when using nushell.

The nushell warns about not using `let-env` for configuring `config`. I have removed the `load-env` and just added a `let-env` for the `config` as the documentation recommends: https://www.nushell.sh/book/environment.html#let-env
This commit is contained in:
Martin Slot 2023-02-11 14:05:39 +01:00 committed by GitHub
parent 4e0295125d
commit e6c5571fc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -15,12 +15,11 @@ let-env PROMPT_COMMAND = {
# Whether we have config items # Whether we have config items
let has_config_items = (not ($env | get -i config | is-empty)) let has_config_items = (not ($env | get -i config | is-empty))
let config = if $has_config_items { let-env config = if $has_config_items {
$env.config | upsert render_right_prompt_on_last_line true $env.config | upsert render_right_prompt_on_last_line true
} else { } else {
{render_right_prompt_on_last_line: true} {render_right_prompt_on_last_line: true}
} }
{config: $config} | load-env
let-env PROMPT_COMMAND_RIGHT = { let-env PROMPT_COMMAND_RIGHT = {
let width = (term size).columns let width = (term size).columns