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

6 Commits

Author SHA1 Message Date
Benjamin Sherman
85d683daf2
fix(container): reduce docker, podman and systemd confusion (#4832)
* Fixes #3821 to provide an improved experience for display of container

Details:
- podman containerenv processing is now happens before systemd
- if systemd/container contains "docker", now shows "Docker"
- maintains fix from #4593 to prevent 'Systemd" display on WSL
- refactors tests for systemd detection

* only compile function for linux

* correct 'default' systemd test use use None, codecov caught this mistake

* refactor my change to systemd/container detection so that it has one stage instead of multiple
2023-01-22 23:36:42 +01:00
David Knaack
b47a4fe514
fix(container): avoid detecting WSL as a systemd-container (#4593) 2022-11-15 11:14:52 +01:00
David Knaack
6e38683c89
chore: fix new clippy lints (#4557) 2022-11-05 12:40:46 +01:00
David Knaack
6ac5df904b
refactor: replace ansi_term with nu_ansi_term (#4339) 2022-09-04 18:44:54 +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
Harald Hoyer
4f46411403
feat: add a container indicator (#3304)
* test: add mock method for absolute files

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>

* feat(module): add a container indicator module

Adds a container type indicator, if inside a container,
detected via the presence of some marker files.

E.g. inside a podman container entered with `toolbox enter`
the prompt changes to the container name and version.

```
starship on  container_rebased [$!] is 📦 v1.0.0 via 🦀 v1.56.1
❯ toolbox enter

starship on  container_rebased [$!] is 📦 v1.0.0 via 🦀 v1.56.1
⬢ [fedora-toolbox:35] ❯
```

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
2022-01-21 09:44:46 -06:00