Commit Graph

318 Commits

Author SHA1 Message Date
Jan Katins 6b444e05c6
feat(kubernetes): Add styling based on current context (#4550)
* 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-02 09:19:33 +02:00
Vegard Skui e867cda1eb
feat(fossil_metrics): add fossil_metrics module (#4874)
* 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-09-02 09:19:04 +02:00
renovate[bot] 91d9053aa4
build(deps): update crate-ci/typos action to v1.16.10 2023-09-02 02:21:09 +00:00
renovate[bot] 1884409c56
build(deps): update crate-ci/typos action to v1.16.9 2023-08-30 16:26:37 +00:00
renovate[bot] cc08685c2c
build(deps): update crate-ci/typos action to v1.16.8 2023-08-21 18:23:54 +00:00
renovate[bot] 4c6835bfd8
build(deps): update crate-ci/typos action to v1.16.6 2023-08-19 01:35:06 +00:00
renovate[bot] cfdd8d9ca0
build(deps): update crate-ci/typos action to v1.16.5 2023-08-14 17:24:23 +00:00
renovate[bot] d63ef1febb
build(deps): update crate-ci/typos action to v1.16.4 2023-08-12 05:02:43 +00:00
renovate[bot] 173486f85c
build(deps): update crate-ci/typos action to v1.16.3 2023-08-09 14:10:13 +00:00
renovate[bot] b24bdbc74e
build(deps): update reviewdog/action-suggester action to v1.7.4 2023-08-07 16:12:29 +00:00
renovate[bot] 04f0fe380a
build(deps): update reviewdog/action-suggester action to v1.7.3 2023-08-06 04:50:27 +00:00
renovate[bot] 4ac4fa886e
build(deps): update reviewdog/action-suggester action to v1.7.2 2023-08-05 06:40:48 +00:00
renovate[bot] 667a07bf88
build(deps): update crate-ci/typos action to v1.16.2 2023-08-01 20:25:17 +00:00
renovate[bot] 36f0f21e3d
build(deps): update embarkstudios/cargo-deny-action action to v1.5.4 2023-07-28 18:59:28 +00:00
renovate[bot] 89cad4261c
build(deps): update crate-ci/typos action to v1.16.1 2023-07-14 21:54:07 +00:00
Vivek Kushwaha 3402f0e82a
feat(shlvl): add repeat_offset for repeated symbol (#5289)
Signed-off-by: Vivek Kushwaha <yoursvivek@users.noreply.github.com>
2023-07-14 10:59:02 +02:00
renovate[bot] 9bbc7b469d build(deps): update dependency taplo-cli to 0.8.1 2023-07-11 08:59:50 +00:00
renovate[bot] c0fee510d8
build(deps): update crate-ci/typos action to v1.16.0 2023-07-10 16:55:09 +00:00
renovate[bot] 6d33ad6914 build(deps): update crate-ci/typos action to v1.15.10 2023-07-03 19:33:24 +00:00
renovate[bot] a26b5b0f2b build(deps): update crate-ci/typos action to v1.15.9 2023-07-01 12:08:09 +00:00
renovate[bot] ad22e3e93c build(deps): update crate-ci/typos action to v1.15.7 2023-06-27 09:40:25 +00:00
renovate[bot] 85dd256a26
build(deps): update crate-ci/typos action to v1.15.6 2023-06-26 14:26:37 +00:00
renovate[bot] 52ecc411eb
build(deps): update crate-ci/typos action to v1.15.5 2023-06-22 19:53:44 +00:00
renovate[bot] d0a7c0875c build(deps): update crate-ci/typos action to v1.15.3 2023-06-21 22:42:40 +00:00
renovate[bot] fad16ca1b8
build(deps): update reviewdog/action-suggester action to v1.7.1 2023-06-20 23:40:36 +00:00
renovate[bot] aab8bb2778
build(deps): update crate-ci/typos action to v1.15.2 2023-06-20 16:21:45 +00:00
renovate[bot] 0e9f80fe17
build(deps): update crate-ci/typos action to v1.15.1 2023-06-19 16:54:32 +00:00
renovate[bot] ee92e0dd47 build(deps): update reviewdog/action-suggester action to v1.6.1 2023-06-16 07:29:52 +00:00
renovate[bot] b33538bfb1
build(deps): update crate-ci/typos action to v1.15.0 2023-06-08 15:50:30 +00:00
Matan Kushner abadd9c58d
Checkout before running gh commands in CI 2023-06-06 10:44:58 -04:00
renovate[bot] 1245a6b459
build(deps): update crate-ci/typos action to v1.14.12 2023-06-02 04:17:18 +00:00
marcybell 351bf9d0b3
feat(golang): adding `mod_version` variable (#5177) 2023-06-01 21:18:38 +02:00
renovate[bot] 1e198713d7
build(deps): update crate-ci/typos action to v1.14.11 2023-05-22 23:33:48 +00:00
renovate[bot] ec794e4524
build(deps): update crate-ci/typos action to v1.14.10 2023-05-19 17:32:06 +00:00
renovate[bot] 6962d7728f
build(deps): update xalvarez/prevent-file-change-action action to v1.3.2 2023-05-11 11:08:31 +00:00
Mick Hohmann 2558c4588b
fix: update of presets and default configuration to reflect changes in Nerd 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-10 14:36:56 +02:00
Denis Cornehl d07a8e3668
feat(gcloud): add `detect_env_vars` option (#5166)
* feat(gcloud): add `detect_env_vars` option

* regenerate config schema
2023-05-09 07:55:49 +02:00
renovate[bot] 8f72cd4d47
build(deps): update crate-ci/typos action to v1.14.9 2023-05-03 16:59:41 +00:00
David Knaack f716b605f3
ci: remove actions-rs actions (#5115) 2023-05-01 22:15:50 +02:00
renovate[bot] 680427b3dc
build(deps): update crate-ci/typos action to v1.14.8 2023-04-19 19:05:23 +00:00
renovate[bot] 0cfaad1da6
build(deps): update crate-ci/typos action to v1.14.6 2023-04-13 19:15:26 +00:00
AnirbanHalder654322 b2ebd5b50c
feat: Add Solidity Module (#5047)
* 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-13 21:05:12 +02:00
Colton Donnelly ce01423152
feat(git_metrics): add option to ignore submodules (#5052)
* add docs

* update schema

* ok, actually update schema

* add test

* fix lint

* accidentally included my .devenv directory
2023-04-13 21:04:15 +02:00
marcybell 27ffa37cfd
feat(azure): subscription name aliases (#4949)
* 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-13 21:03:14 +02:00
Chad Denyar edb96cad58
feat: add typechange to git_status module (#4829)
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-04-13 21:02:08 +02:00
renovate[bot] 3368b91034 build(deps): update embarkstudios/cargo-deny-action action to v1.5.2 2023-04-12 21:41:43 +00:00
Matan Kushner 167a7a51c8
ci: add missing GH token to doc publishing flow 2023-04-11 15:03:37 +09:00
Matan Kushner 3e42e739ec
ci: Revert "fix: bootstrap manifest for release-please (#5087)"
This reverts commit e392d14f4e.
2023-04-11 14:57:55 +09:00
Matan Kushner e392d14f4e
fix: bootstrap manifest for release-please (#5087) 2023-04-11 13:44:29 +09:00
David Knaack b475b5809f
build(deps): update rust crate os_info to 3.7.0 (#5057)
* 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-10 13:07:30 +02:00