summaryrefslogtreecommitdiffstats
path: root/src/configs
AgeCommit message (Collapse)Author
2023-11-12feat: add typst moduleCharlotte Thomas
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-11-02feat(scanner): add option not to follow symlinks (#5325)Ohad Lutzky
Add follow_symlinks option Settings this to false can fix hanging on symlinks to slow/inaccessible filesystems.
2023-09-16feat(hostname): add detect_env_vars as option (#5196)Mick Hohmann
* Added hostname.detect_env_vars based on the newly added context::detect_env_vars - extended context::detect_env_vars to check for negated environment variables as well, analogous to the other detect modules - made hostname.detect_env_vars only active if ssh_only is set to false for backwards compatibility Co-authored-by: Dominik Sander <dsander@users.noreply.github.com> * added clippy recommendations, removed unneeded comments * Added new logic (suggested in https://github.com/starship/starship/pull/5196#issuecomment-1566228913) The new `detect_env_vars` now requires either SSH_ONLY to be false or the environment variable SSH_CONNECTION to be set, so that is will be used * Fixed typo * Refactored the detect_env_vars function for early returns and better readability * Change boolean logic for better readability Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Apply suggestions from code review to `detect_env_vars` method. Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Fixed bracket error & updated comments - fixed bracket error in hostname.rs, after changes - updated comments for context.rs, for the suggested changes * Removed obsolete warning from docs/config/README.md Co-authored-by: David Knaack <davidkna@users.noreply.github.com> --------- Co-authored-by: Dominik Sander <dsander@users.noreply.github.com> Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-09-02feat(kubernetes): Add styling based on current context (#4550)Jan Katins
* feat(kubernetes): Add styling based on current context Add an ability to customize the configuration of the kubernetes module style, based on the current context. A new variable is added to the config section, called environments, which is a list of possible customizations. Each such customization is an object with a context_pattern regex, which matches context name, and an optional style and icon that will override the global configuration, if the currently used context matched the context_pattern. Based on multiple attempts to add per-context styling and symbols to the kubernetes module. - https://github.com/starship/starship/pull/1568 by @lht https://github.com/lht -> base - https://github.com/starship/starship/pull/614 by @nomaed https://github.com/nomaed -> naming, symbol, some tests Rebased and combined by @jankatins Contains the following squasched commits - Rename to contexts and move aliases into contexts - Move deprecated functions to a submodule - Cleanup: ignore None-valued KubeCtxComponents - Add regex func + clean up matching-context search - Placate paper clip Closes: https://github.com/starship/starship/issues/570 Co-authored-by: =?UTF-8?q?Boris=20Aranovic=CC=8C?= <nomaed@gmail.com> Co-authored-by: Jan Katins <jasc@gmx.net> Co-authored-by: Kevin Song <chips@ksong.dev> * refactor(kubernetes): Remove options and use clearer names * test(kubernetes): Handle duplicated contexts right * refactor(kubernetes): Cleaner user matching * fix(kubernetes): Only show warning in case of problems * feat(kubernetes): Add back alias replacements * refactor(kubernetes): Cleanup rust usage --------- Co-authored-by: Haitao Li <lihaitao@gmail.com> Co-authored-by: =?UTF-8?q?Boris=20Aranovic=CC=8C?= <nomaed@gmail.com> Co-authored-by: Kevin Song <chips@ksong.dev> Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-09-02feat(fossil_metrics): add fossil_metrics module (#4874)Vegard Skui
* feat(fossil_metrics): add fossil_metrics module * Return early if not in a Fossil check-out * Add more tests for fossil_metrics * Move is in Fossil checkout check after module enabled check * Update type for new toml version * Update the config file schema * Rework parsing of fossil diff output * Fix Fossil check-out detection in subdirectories * Use regex to only match expected fossil diff output * Use shared ancestor scanning and fix detection on Windows * Add note on minimum Fossil version
2023-07-14feat(shlvl): add repeat_offset for repeated symbol (#5289)Vivek Kushwaha
Signed-off-by: Vivek Kushwaha <yoursvivek@users.noreply.github.com>
2023-06-01feat(golang): adding `mod_version` variable (#5177)marcybell
2023-05-10fix: update of presets and default configuration to reflect changes in Nerd ↵Mick Hohmann
Fonts 3.0 (#5162) * Updated nf-mdi-* to nf-md-* symbols The following symbols where changed - directory.read_only - memory_usage - meson - nim - os.symbols.Garuda - os.symbols.HardenedBSD - os.symbols.Illumos - os.symbols.OpenBSD - os.symbols.OracleLinux - os.symbols.Redox - os.symbols.Solus - os.symbols.Windows - package - rlang * Updated nf-mdi-* to nf-md-* symbols (for all other presets) The following symbols where changed for pastel-powerline: - directory.substitutions.Documents - nim for tokyo-night - directory.substitutions.Documents - golang * Updated nf-mdi-* to nf-md-* symbols for the default configuration in modules in src/configs/*.rs The following symbols where changed - azure - battery.full_symbol - battery.charging_symbol - battery.discharging_symbol - battery.unknown_symbol - battery.empty_symbol * Updated config-schema.json * Updated src/modules/*.rs docs/config/README.md and used `nerdfix` to check if I overlook anything * Fixed the battery discharging symbol in the tests --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: jtrv <travershasemail@gmail.com>
2023-05-09feat(gcloud): add `detect_env_vars` option (#5166)Denis Cornehl
* feat(gcloud): add `detect_env_vars` option * regenerate config schema
2023-04-13feat: Add Solidity Module (#5047)AnirbanHalder654322
* Adding documentation * Documentation and schema addition * Creating solidity config * Module for solidity lang * Updating all the files * Changing according to clippy * Fixing misspellings * Changes suggested by clippy * Updating schema , maybe fixing docs workflow error * Updating schema * Removing solcjs from default compiler list * Fallback test added and test string fixed * Fixing docs * Updating schema * Updating schema * Fixing docs * Updating schema * Updating schema * Typo fix * Update docs/config/README.md Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Update src/utils.rs Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Fix build commit --------- Co-authored-by: Anirban Halder <shaeo967@gmail.com> Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-04-13feat(git_metrics): add option to ignore submodules (#5052)Colton Donnelly
* add docs * update schema * ok, actually update schema * add test * fix lint * accidentally included my .devenv directory
2023-04-13feat(azure): subscription name aliases (#4949)marcybell
* From issue #4448, added `subscription_aliases` as a field for the Azure module Can be set in starship.toml with [azure.subscription_aliases] * Updated config file schema * Added entry into documentation * Update README.md * Formatted with dprint
2023-04-13feat: add typechange to git_status module (#4829)Chad Denyar
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-04-10build(deps): update rust crate os_info to 3.7.0 (#5057)David Knaack
* build(deps): update rust crate os_info to 3.7.0 * add new os symbols --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-02feat(custom): add option to check if pwd is in a repo (#4822)jliaoh
* feat(custom): add option to check if pwd is in a repo * Apply suggestions from code review Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * change whenrepo to require_repo * chore: fix doc formatting --------- Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-03-22chore: add spell checker to workflows (#4975)Zhizhen He
* chore: add spell checker to workflows * fix: update config schema * fix: revert for fennel.rs
2023-03-20feat(aws): Adds support for AWS_CREDENTIAL_EXPIRATION environment variable ↵Harry Hodge
(#5002) feat(aws): supports AWS_CREDENTIAL_EXPIRATION environment variable Adds support for the AWS_CREDENTIAL_EXPIRATION environment variable which was adopted as the standard way to set the expiration for temporary credentials. The existing AWS_SESSION_EXPIRATION environment variable is not dropped for backwards compatibility. See https://github.com/aws/aws-cli/pull/7398
2023-02-11feat(java): Add `.sdkmanrc` for Java (#4888)iuhoay
* Add `.sdkmanrc` for Java * Update config-schema.json, Add `.sdkmanrc` file for Java * Update doc
2023-02-07build(deps): update rust crate os_info to 3.6.0 (#4878)David Knaack
* build(deps): update rust crate os_info to 3.6.0 * add new os symbols --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-31feat(fossil_branch): add fossil_branch module (#4806)Vegard Skui
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-01-11feat(config): Adds support for --profile <custom profile name> (#3467)Florent Vilmart
Co-authored-by: Kevin Song <chips@ksong.dev> Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2022-12-31feat: add pijul_channel module (#4765)Lyle Mantooth
* feat: Pijul VCS support * Extra bits needed for new module. * Format Markdown table. * Fix lint. * Don't test Pijul module so thoroughly. Installing from source is too expensive, and compiled binaries are only available for Windows (and unofficially as well). Perhaps once Pijul 1.0.0 comes out of beta there will be more binaries available in package repos. * Format! * Bad rebase, remove Pijul install from workflow. * Mock Pijul commands for code coverage. * Make fake .pijul directory in fixture. * Truly mock `pijul` command. * Rename module from `pijul` to `pijul_channel`. * Format! * Fix config-schema.json. * Missed changing module name in docs/ folder.
2022-12-31feat(hg_branch): Add support for mercurial topics and find hg root dir (#4771)Nicolas Évrard
* feat(hg_branch): Add support for mercurial topics and find hg root dir * Fix clippy errors * Use crate::utils::read_file * Update config-schema.json * Extend PathExt to retrieve device ID of Path * Break hg root search when switching to another device * Fix clippy and formatting errors * Update docs/config/README.md Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Update src/modules/utils/path.rs Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Update src/configs/hg_branch.rs Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Update hg_branch description * Revert to lazy loading, use truncate_text from utils and use fake topic * Format code and fix clippy error * Revert to previous test string as topic is optional in the config * Fix doc formatting * Stub device_id for windows * Update config-schema.json * Update src/modules/hg_branch.rs Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Do not use unwrap in device_id * Fix formatter error * Use dev under non linux unixes Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2022-12-28feat(env_var): Add support for env_var.VAR in format (#4497)David Knaack
Co-Authored-By: Segev Finer <24731903+segevfiner@users.noreply.github.com> Co-authored-by: Segev Finer <24731903+segevfiner@users.noreply.github.com>
2022-12-27feat(nix): support new `nix shell` command (#4724)Julian Antonielli
* Support `nix shell` * Remove unnecessary `Debug` implementation * Add test to detect false positive * Improve detection of `/nix/store` in $PATH * Add docs about unknown state * Gate under `heuristic` flag * Regenerate config schema
2022-12-21feat(fennel): add fennel module (#4717)fold-squirrel
2022-12-17chore: fix clippy warnings for rust 1.66 (#4715)David Knaack
chore: fix new clippy lints
2022-12-17feat(gradle): add gradle module (#4423)Marie
* docs: document gradle module * implement gradle module * gradle-module: add test for wrapper properties case * docs: improve gradle module documentation * fix: fix gradle module wrapper properties test * drop gradle executable strategy * apply suggested stuff * Fix config schema
2022-12-09fix(buf): broken icon on windows 10 (#4689)Dennis Waitong Lam
Closes https://github.com/starship/starship/issues/4608
2022-12-04feat: add Haxe support (#4395)AlexHaxe
* Add Haxe support * avoid unwrap * fix doc formatting * removed extra newline * fixed formatter and linter issues * fixed config file * better version of detecting contents of .haxerc Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * removed openfl related defaults from detect_files Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * fixed formatting * reworked reading .haxerc with fallback to haxe --version * fixed formatting * added fallback to executable for dev paths in .haxerc * fixed linter issue * added support for Windows paths * use or_else Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * use shorter version with `?` Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * simplified regex check removed check for "null" string * fixed format Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2022-12-01feat(directory): add before_repo_root_style (#4595)cgzones
2022-11-06feat: Add operating system module (#4109)exincore
* docs(os): Add os module documentation * docs(os): Add os to Default Prompt Format * chore(os): Update config file schema * feat(os): Add os entries and declarations * feat(os): Add os module and config * fix(os): Obey config.disabled * feat(os): make variables 'Unknown'-aware refactor(os): calculate variables in dedicated functions * test(os): Add os module tests * feat(os): make 'name' variable less 'Unknown'-aware * docs(os): Add Preset configurations docs(os): Use emoji as default * feat(os): Use emoji as default test(os): Use emoji as default * fix(os): Add spaces after emoji symbols * chore(os): Update config schema * feat(os): Remove `bitness` variable docs(os): Remove `bitness` variable test(os): Remove `bitness` test * feat(os): Add Cargo.toml upgrade caution for os_info * refactor(os): Clarify get_symbol function * docs(os): Mention supported operating systems and feature requests * docs(os): Mention os_info inacurracy * test(os): Remove `bitness` leftovers * refactor(os): use nu_ansi_term * refactor(os): add cfg_attr(schemars(deny_unknown_fields)) * chore(os): update config schema * docs(os): expose details block * feat(os): add garuda linux * chore(os): update config schema * feat(os): add case insensitivity * feat(os): add symbols `IndexMap` use `os_info::Type` instead of `String` * test(os): add clippy warn on new os_info::Type case * leave missing case to test github tests * test(os): re-add missing test case * style(os): fix formatting * docs(os): update to match os_info::Type serialization - docs(os): add missing garuda to config - test(os): mention docs updates in warn_on_os_info_update
2022-11-05chore: fix new clippy lints (#4557)David Knaack
2022-10-25feat(guix_shell): Initial implementation (#4397)Thierry Delafontaine
* 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)
2022-10-15feat: Open Policy Agent module (#1740) (#4441)AppleTheGolden
* feat: Open Policy Agent module (#1740) * Format documentation * Fix typo, `ropa` -> `rego` Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Update presets for OPA module * Add extra space to OPA module symbol Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2022-10-15fix(status): replace multiply with cross mark emoji (#4461)David Knaack
2022-10-11feat(module): Add a meson devenv indicator (#4389)Jamie
* feat(module): Add a meson devenv indicator Adds a Meson Developer Environment indicator, if the MESON_DEVENV variable is set. Inside a `meson devenv`, the prompt will include the current Meson project name This also contains a new Truncate utility function, which may be adapted for other modules in the future * docs: Add Meson to presets
2022-10-07fix(buf): fix spacing & harmonize docs with actual configuration (#4450)wilhelm
* fix(buf): add whitespace after version string * fix: update config schema * fix: config version and bison emoji * fix: update documentation format * fix: dprint * fix: config schema
2022-09-27feat: add user-defined color palette (#4209)Anomalocaridid
* docs(config): add color palette to docs * feat: add user-defined color palette * fix: update config schema * refactor: apply suggestions from code review Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * fix: update new test * feat: add support for multiple palettes * docs(config): update docs for multiple color palettes * docs(config): fix formatting * test: test overriding a predefined color with itself * docs: mention palettes cannot reference themselves * refactor: warn when using a nonexistent palette * test: test retrieving a nonexistent color palette * fix: fix issues with palette log messages * fix: update config schema * fix: skip serializing palette if none * refactor: change nonexistent palette message to warning * fix: update config schema Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2022-09-09feat(schema): deny unknown keys (#4270)David Knaack
2022-08-19perf(git_commit): only use exact match for tag by default (#4281)David Knaack
2022-08-01feat: add bun module (#4187)David Knaack
2022-07-19feat(status): Add pipestatus_segment_format option to status module (#4103)Artyom Belousov
Add pipestatus_segment_format
2022-07-10feat(k8s): Add folder detection to the k8s module. (#4157)Thomas O'Donnell
Have added configuration options to the k8s module to allow activating the module only in directories that contains certain files or folders. To ensure this is backwards compatible and because there are not really any standard files or folders for Kubernetes I have set the defaults to empty and will activate the module for all directories.
2022-07-10perf(pulumi): allow disabling upwards discovery (#4159)David Knaack
* perf(pulumi): disable upwards discovery by default * change `search_upwards` default to `true`
2022-06-30chore: fix new clippy lints (#4136)David Knaack
2022-06-26feat: add Raku module (#4048)Filip Sergot
* feat: add Raku module * Update docs/config/README.md Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com> Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
2022-06-18fix(character): Standadise Vim config names (#4081)Thomas O'Donnell
Have switched all vi/vim symbols to have the same prefix 'vim'. To preserve backwards compatibility with existing configs I have added an alias for the previous config name.
2022-06-12docs(aws): improve legibility (#4050)David Knaack
2022-06-04fix(fish): add proper vi mode detection for fish shell (#3839)Mat Jones
* 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