feat(status): add the status module (#1651)

* add the exit code module

this allows to display more precisely the last command exit code
and to configure starship to not change the last charcter of the
prompt even in case of failure. It is disabled by default, because
it seems a bit redundant with the character module in its default
configuration.

* rename exit_code module to status

* Enforce a default disabled=true 

In the outer places, we only check for the disabled flag in the config toml file, only when this is loaded into the real config struct, we see the default. And if the default is true, we have to abort at that place. For status and hg_branch that wasn't so. I also commented the rest

* fix spaces in markdown table for status module

* Add a tip that status module is disabled by default

Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>

* Remove unrelated changes for default disabled=true

Co-authored-by: Gaëtan Lehmann <gaetan.lehmann@gmail.com>
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
This commit is contained in:
Jan Katins
2020-09-26 00:04:51 +02:00
committed by GitHub
parent 17687be1cb
commit ffb1345052
7 changed files with 192 additions and 0 deletions
+1
View File
@@ -42,6 +42,7 @@ pub mod rust;
pub mod shlvl;
pub mod singularity;
mod starship_root;
pub mod status;
pub mod swift;
pub mod terraform;
pub mod time;