1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-12-13 06:27:46 +00:00
starship/src/init
Antoine Stevan 470aeb09a7
feat: update the nushell init file and make it valid module and overlay (#5188)
* break long commands into multiple lines for readability

* fix the format of closures

We generally write `{|| ...}` instead of `{ || ...}`.

* remove the `$"--opt=(val)"` structure when possible

`starship` does not require to use `--opt=val` and so we do not
need to do that with Nushell :)

the only place where this is required is with `--status` because
`$env.LAST_EXIT_CODE` can be negative and `starship` does not
appear to *like* values of the form `-2`...
so i left this line as it was.

on the other hand, `$env.CMD_DURATION_MS` and `(term size).columns`
should be fine 😌

* simplify the `config` mutation with new `?` syntax

This is a new very handy feature of Nushell which gives a much
simpler command combined with `default` and `merge`.

* put all `let-env`s inside an `export-env` with `load-env`

This commit has two reasons of existing:
- i think it makes it a bit easier to read with less `let-env`s
- it transforms the *script* into both a valid module and a valid
overlay

* bump the version to `0.78` in to docs

* add a note about the init file being also a module to all docs

* tweak the documentation

* update the Nushell part of the install script

* format the vuepress config file

as previous commit 117580136d3da5e00a4ccb7ada508c8510a2e50e was
not successful, let's try to make the CI happy manually 😌

* remove code quotes in the `config_cmd` of Nushell

* format the style in the Nushell `warning` section
2023-06-12 11:02:46 +02:00
..
mod.rs fix(init): avoid cygpath for starship binary path (#4970) 2023-03-11 07:24:14 +01:00
starship.bash chore: fix typos in comments (#4122) 2022-06-28 14:19:17 -04:00
starship.elv fix(init): Change Elvish init to catch for 0.18 (#3769) 2022-03-25 11:57:38 +01:00
starship.fish fix(fish): enable transient prompt when in vi mode (#4826) 2023-01-30 23:13:16 +01:00
starship.ion feat: add error messaging (#1576) 2020-09-28 16:38:50 -04:00
starship.lua feat: Enable transience for Cmd and PowerShell (#4143) 2022-07-24 21:10:40 -05:00
starship.nu feat: update the nushell init file and make it valid module and overlay (#5188) 2023-06-12 11:02:46 +02:00
starship.ps1 fix(pwsh): fix error log display on older versions of pwsh (#4650) 2022-12-02 14:17:57 -06:00
starship.tcsh feat: add support for tcsh (#2288) 2021-02-27 19:55:27 +01:00
starship.xsh feat(xonsh): support rprompt (#3362) 2021-12-31 08:23:01 +01:00
starship.zsh refactor(zsh): using add-zsh-hook instead of add hook manually (#3537) 2022-02-05 22:37:34 -08:00