1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-09-26 20:29:03 +00:00
Commit Graph

11 Commits

Author SHA1 Message Date
David Knaack
b5d3d8fcf3
feat(schema): deny unknown keys (#4270) 2022-09-09 14:59:38 +02:00
David Knaack
18ad26f98d
feat: allow printing config file schema (#3737) 2022-04-01 17:14:05 +02: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
David Knaack
d2366ddb9c
perf(git_status): add option to use windows starship to render in wsl (#2146) 2022-03-06 21:18:23 -06:00
arcnmx
a95332485b
perf(git_status): tweak exec flags to omit unnecessary info (#3287)
* perf(git_status): tweak flags to omit extra info

`git status` can be prohibitively slow on some repos, so allow the
config to influence what flags are passed to git. For instance, if there
is no configured symbol for untracked files, tell git to omit them from
its output. This can easily result in a 2~10x speedup in many cases, but
requires the user to opt-in to hiding information from the prompt.

* docs(git_status): add ignore_submodules option
2021-12-30 15:12:53 -06:00
Bill
b2e2330cb0
feat(git_status): added symbol for local repos up-to-date with remote. (#2945)
* git_status: added symbol for when local branch is up-to-date with upstream

* updated docs

* removed unused variable, moved location of config comment

* changed uptodate default to empty string, simplified and made safer

* added uptodate default line back into docstring

* fixed linting and formatting errors

* refactored uptodate to up_to_date, removed redundant else statement
2021-08-07 19:22:00 +02:00
David Knaack
d06ba072a8
feat(config): allow printing default and computed config (#2521)
* feat: allow printing default and computed config

* fix custom modules

* actually fix custom modules
2021-03-31 17:31:55 +02:00
David Knaack
052b56fe10
refactor: replace RootModuleConfig with Default (#2458) 2021-03-15 11:40:52 +01:00
Zhenhui Xie
ec76fafff0
feat: refactor modules to use format strings (#1374) 2020-07-07 18:45:32 -04:00
marblenix
b82ff321fa feat(git_status): Add a stash count segment (#598) 2019-12-28 22:20:36 -05:00
Brian Low
2710d02709 feat: Show git_status counts (#434)
The git_status module can show the count of files next to their respective symbols.
2019-10-26 15:20:20 +09:00