* 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>
On Windows when running commands with their name instead of the path with Command::new, executable with that name from the current working directory will be executed.
This PR replaces all instances of Command::new with a new create_command function which will first resolve any executable paths and avoid this issue.
* format crystal version with VersionFormatter
* update crystal dosc
* format crystal module
* fix typos
* format dart version with VersionFormatter
* fix dart malformed test
* update dart docs
* format cmake version with VersionFormatter
* update cmake docs
* format deno version with VersionFormatter
* update deno docs
* remove Version type
* format dotnet version with VersionFormatter
* update dotnet docs
* format erlang version with VersionFormatter
* update erlang docs
* format golang version with VersionFormatter
* refactor formatting in my modules
* format helm version with VersionFormatter
* format julia version with VersionFormatter
* format kotlin version with VersionFormatter
* format lua version with VersionFormatter
* format nim version with VersionFormatter
* format perl version with VersionFormatter
* format php version with VersionFormatter
* format purescript version with VersionFormatter
* format scala version with VersionFormatter
* format swift version with VersionFormatter
* format terraform version with VersionFormatter
* format vagrant version with VersionFormatter
* format zig version with VersionFormatter
* format elixir version with VersionFormatter
* format ocaml version with VersionFormatter
* update elixir docs
* update golang docs
* update helm docs
* update julia docs
* update kotlin docs
* update lua docs
* update nim docs
* update ocaml docs
* update perl docs
* update php docs
* update purescript docs
* update scala docs
* update swift docs
* update terraform docs
* update vagrant docs
* update zig docs
* format elm version with VersionFormatter
* update elm docs
* pass module_name as &str to format_module_version
* refactor(dotnet): ".NET" instead of "•NET"
"•NET" looks quite weird, especially since the official writing is ".NET".
* revert(docs): translated docs
Co-authored-by: Eyal Cherevatzki <eyal@hyperguest.com>
This makes it possible to configure when the dotnet module is shown
based on the contents of a directory. This should make it possible to be
a lot more granular when configuring the module.
* fix(dotnet): update dotnet format string
* fix(dotnet): update erlang format string
* fix(dotnet): update golang format string
* fix(dotnet): update helm format string
* fix(dotnet): update julia format string
* fix(dotnet): update nim format string
* fix(dotnet): update ruby format string
* fix(dotnet): update rust format string
* test: update formatted strings in unit tests
* Use suggested format strings
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
Co-authored-by: Moritz Vetter <mv@3yourmind.com>
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
This creates a custom logger for the log crate which logs everything to a file (/tmp/starship/session_$STARSHIP_SESSION_KEY.log) and it logs everything above Warn to stderr, but only if the log file does not contain the line that should be logged resulting in an error or warning to be only logged at the first starship invocation after opening the shell.