1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-06-02 08:30:50 +00:00
Commit Graph

20 Commits

Author SHA1 Message Date
David Knaack
6ac5df904b
refactor: replace ansi_term with nu_ansi_term (#4339) 2022-09-04 18:44:54 +02:00
Artyom Belousov
61438484bd
feat(status): Add pipestatus_segment_format option to status module (#4103)
Add pipestatus_segment_format
2022-07-19 15:07:50 +02:00
David Knaack
0ae61c7758
chore(clippy): fix new lints (#4002) 2022-05-23 06:58:27 -04:00
David Knaack
2d4b183fce
refactor: replace module_config_derive with serde (#3786)
* refactor: replace module_config_derive with serde

Changes include:
* Removing `starship_module_config_derive` and replacing it with `serde::Deserialize`
* Removing `RootModuleConfig::load_config`. While potentially useful, it was only used in tests. And it would require something like `serde::DeserializeSeed` which is not derived by serde.
* Merging `RootModuleConfig` into `ModuleConfig`
* Implementing a `ValueDeserializer` that holds a reference to a `toml::Value` in `serde_utils.rs`
* Deserialization errors (invalid type) are now logged and include the current key and the struct names
* Unknown keys are now considered an error. "Did you mean?"-messages are still possible

* fix typo

Co-authored-by: Matan Kushner <hello@matchai.dev>

Co-authored-by: Matan Kushner <hello@matchai.dev>
2022-03-26 10:42:19 +01:00
Izhak Jakov
86953272a7
fix(status): Make status module work even when the status is 0 (#3750)
Co-authored-by: Izhak Jakov <jizhak@ca.ibm.com>
2022-03-16 16:05:13 -04:00
David Knaack
1745392909
refactor: fix new clippy/compiler warnings (#3656) 2022-02-24 23:31:01 -05:00
moko256
bbdb584f45
fix(status): Enable to convert from i64 to hex_status by casting instead of parsing status. (#3462)
* fix(status): Enable to convert from i64 to hex_status by casting instead of parsing status.

* Apply comment to src/context.rs

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

* Update README.md in configuration

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2022-02-05 21:13:42 +01:00
David Knaack
0fd6f05da4
fix(properties): fix regressions in status, pipestatus and terminal-width handling (#3399) 2022-01-15 04:21:38 -05:00
David Knaack
20cf200c3a
refactor: update clap to v3 (#3370) 2022-01-04 12:49:42 +03:00
Mika Fischer
cb40787e2a
feat(status): Add hex_status (#3312) 2021-12-21 05:05:28 -05:00
David Knaack
77182a9a22
chore(clippy): fix new clippy lints (#3294) 2021-12-03 00:54:56 -06:00
Fred Cox
c1f2d345aa
fix(escaping): move escaping to individual variables (#3107) 2021-11-01 22:18:45 +01:00
David Knaack
68694029c4
fix(status): Don't show status if all exit codes are 0 (#3109)
* fix(status): Don't show status if all exit codes are 0

* fix tests
2021-10-03 16:03:09 +02:00
Marcin Puc
6598275e15
refactor: simplify iterator usage (#3017) 2021-09-02 11:48:29 -04:00
Thomas O'Donnell
3933553486
fix(status): Showing exit code 0 with pipelines (#3028)
Have fixed a bug there the status module was showing when the exit code
was 0.
2021-09-02 00:18:44 +02:00
David Knaack
af43aeefba
fix(clippy): fix new clippy lints (#2939) 2021-07-29 14:27:46 -04:00
Hugues Morisset
40cb667b9d
feat(status): Add pipestatus display in status module (#2481)
* feat: Add pipestatus display in status module

This MR is based on this one https://github.com/starship/starship/pull/370

* Documentation

* Add a test with map_symbol false

* Handle bash preexec pipestatus

* Add zsh support

* Add fish support

Thanks kidonng for the diff patch

* Rename sucess_symbol to success_symbol
2021-07-28 12:26:00 -04:00
David Knaack
04d1332f9c
refactor(clippy): fix new lints (#2297) 2021-02-11 21:08:17 +01:00
Hugues Morisset
cfff77043e
feat(status): Convert known status code to their meaning (#1948)
User is able to choose if their want to display the meaning of known status code in place of number.
2021-01-02 21:09:13 -06:00
Jan Katins
ffb1345052
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>
2020-09-26 00:04:51 +02:00