* add proper vi mode detection for fish shell
* update tests
* fix test
* update config-schema.json
* update docs
* add warning about symbols only supported in fish
* check for go.work file to display go version
* add test to check for go.work file
* update docs to include go.work file
* chore(dprint): fmt & upgrade plugins (#3969)
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
This is an actualization of PR #559 as originally envisioned by qryxip.
Adds the ability to display toolchain versions, either as extracted from
environment/settings files or by getting the host triple. As part of
this, several other major changes were needed:
- Many of the smaller functions within the code have been fused, moved,
or dropped.
- The Rustup environmental info is now initialized lazily using
OnceCells. This will hopefully lead to a performance increase.
- New configuration variables (`toolchain` and `numver`) have been added
to allow finer-grained configuration.
- Override information is no longer read from `rustup` output. Instead,
it is parsed from the same files that rustup would use to determine
this info.
Co-authored-by: qryxip <qryxip@gmail.com>
Co-authored-by: qryxip <qryxip@gmail.com>
* feat(package): Extract package version from PEP621 pyproject.toml
* Update docs explaining PEP 621 package version
* Only read pyproject.toml once
* Simplify get_pep621_version
* Handle version formatting in get_pyproject_version
* fix: Do not panic in config if editor not found
* Add tests for edit_configuration
Adds tests for no-panic condition on editor by adding an override to
edit_configuration.
* Sorry clippy :(
* perf(package): only try to read files that exist
Have refactored the package module to improve performance. Before this
change the module would try to open every single file that could contain
some package information until it found a valid version. This resulted
in a lot of unneeded disk IO. Have added a new fn, `read_file_from_pwd`
that uses the current context to check if that file already exists and
fast failing if it doesn't. From my local testing this speeds up the
package module from taking ~1ms to ~50µs in an empty directory.
* refactor: move read_file_from_pwd to context
* refactor(haskell): use read_files_from_pwd
* refactor(nodejs): use read_files_from_pwd
* 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>
* add option to force AWS display
Even if no credentials or credential_process have been setup
* change README wording
* Include sso_start_url in the description
* Change option name to force_display
* feat(haskell): add haskell module and implement ghc version detection
* feat(haskell): implement stack resolver version detection
* fix(haskell): handle more complex resolvers
* fix(haskell): rename resolver_version to snapshot
* fix(haskell): change default color to bold purple
* feat(haskell): add tests
* fix(haskell): format
* fix(haskell): replace incorrect `or` with `or_else`
* fix(haskell): use write_all instead of write
* fix(haskell): λ as Haskell icon by default
* fix(haskell): fix tests and add a real stack.yaml testcase
* fix(haskell): make clippy happy
* Rename m.aws.alias_region to alias_name
* Add aws profile aliases
* Document aws.profile_aliases, with examples
* Add tests for new aws.profile_aliases feature
* Tidy alias_handling a bit
Fixes a bug in the Rust module where overrides would match
against both full path components as well as partial ones
(e.g. "/etc/passwd" would be considered a prefix of
"/etc/passwd_new") on Windows.
Solution is to convert back to a PathBuf after lossy conversion
so that Path::starts_with is used instead of str::starts_with.