* Fix #4481, config does not error when unrecognized properties are present
* cleanup: use stuct update syntax to improve readability
from review feedback
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* cleanup: renamed ValueDeserializer func w/ better name
* cleanup: added test to cover unknown key retry condition
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
This patch uses the which crate to resolve the starship path, replacing the
current_exe() mechanism.
Co-authored-by: Kevin Song <chips@ksong.dev>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
Co-authored-by: Dario Vladović <d.vladimyr@gmail.com>
* feat(preset): Add No Empty Icons preset
When toolset files are identified by the Starship module, the default format displays the toolset icon, and additional information.
When the toolset executables are not available, the additional information (like version number) is missing. Only the toolset icon is displayed.
The No Empty Icons preset changes the format configuration to not show the toolset icons if the variables are empty - presumably because the toolset is not installed or found.
Closes #3070
Related #3248
* Remove non-version-related modules from preset
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* Add new module opa to preset
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* Drop unnecessary inner conditional from format
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* Remove commit_hash_length setting from preset
* Remove undesired modules
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* docs(config): Improve string and escaping information
* docs(config): Use literal strings
* docs(config): Use literal strings
* docs(config): Improve string value type description
* docs(config): Consistently use literal strings
like the documentation recommends and like `starship print-config` prints.
Resolves inconsistencies to format value on aws, container, elixir, gcloud, git_commit, git_state, git_status, kubernetes, nix_shell, openstack, python, singularity, which already uses literal strings.
Resolves inconsistency to status module pipestatus_format, which already uses literal string.
`$all` expanded list remains a non-literal multiline string for readability with escaped newlines.
* docs(config): Drop literal recommendation, describe escaped newlines
* feat(preset): Add powerline-only-symbols preset
Related to #2563 & #3544
* Modify symbols for pulumi and erlang
* Change some wording and add default notification
* Update name of preset
Co-authored-by: Kevin Song <chips@ksong.dev>
In the config `$all` has special meaning, as it is and contains the default value for `format`.
Using `$all` in the example for conditional format strings with multiple variables is thus potentially misleading and confusing.
Using a neutral variable `$combined` has no conflict with other meanings and is thus preferable.
* feat: added showing gradle version based on the gradle.properties file
* fix: wouldn't return version
* fix: forgot to remove "version=" from returned version"
* fix: ran rustfmt
* fix: test now actually tests for something
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* fix: the regex actually makes sense now
* fix: complete refactor of control flow
* Delete flake.nix
* changed order in which files are processed
Co-authored-by: BattleCh1cken <BattleCh1cken@Larkov.de>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* feat(guix_shell): Initial implementation (#3999)
* fix(guix_shell): Change guix nerd font icon to water buffalo emoji
* fix(guix_shell): Added guix_shell entries in preset files
* fix(guix_shell): Moved guix_shell config docs in to the correct place (alphabetically)