Commit Graph

924 Commits

Author SHA1 Message Date
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
kensasongko 297176b0b8
feat(aws): support aws sso with automatic authentication refresh (#5170)
* feat(aws): support aws sso with automatic authentication refresh

* docs(aws): add sso_session for profile detection
2023-05-09 07:53:45 +02:00
Sebastian Thiel 8884bd1fd0
build(deps): upgrade gitoxide to v0.44 for performance improvements during discovery (#5141)
upgrade gitoxide to v0.44 for performance improvements during discovery

Please note that there is a new `dot_git_only` option which would further
speedup discovery. On even moderatly fast disks that probably not going
to make a difference, but it will on incredibly slow (networked) disks.

See https://github.com/helix-editor/helix/issues/6867 for reference.
2023-04-27 21:14:34 +02:00
marcybell b8a167db57
refactor(Context): `set_config` method for `Context` (#5079)
* add `set_config` method to `Context`

* Made inline comment a doc comment

* use `default_context()` for `set_config()` test

* use `set_config()` in tests for `print.rs`

* set root config w `set_config()` (`print.rs` test)
2023-04-24 16:03:47 +02:00
Andrew Pantuso e5cec9ea50
fix(style): ensure nested style variables are processed during formatting (#5120)
fix: ensure nested style variables are processed during formatting
2023-04-24 16:03:04 +02:00
Dom Slee ce7f984932
fix(config): Make print-config not panic without a config (#5001) 2023-04-13 19:29:21 -05: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
David Knaack 7daddbe620
build(deps): update rust crate starship-battery to 0.8.0 (#5106) 2023-04-13 17:41:25 +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
Aurélien Gâteau de7e94884b
fix(java): wrong version number when using Android Studio JDK (#4966)
The regular expression would get the revision number found in:

    with gcc Android (7284624, based on r416183b)

so it would print "7284624".
2023-04-07 15:40:23 +02:00
Samir Talwar 041a518353
chore(nu): use updated closure syntax (#5054)
Update starship.nu to conform to Nushell changes

Nushell recently made a change to require that all closures have an explicit parameter list, even if it's empty, in https://github.com/nushell/nushell/pull/8290.

This updates starship.nu to conform to this requirement.

I have casually tested this against both the latest released version of Nushell, and the latest version on HEAD; the changed code works well (for me) on both.
2023-04-05 07:53:06 +02:00
jliaoh d29ce7c45d
feat(custom): add option to check if pwd is in a repo (#4822)
* 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-04-02 16:39:45 +02:00
Cosimo Matteini d2801ac443
feat(aws): add support for source_profile (#4859)
feat(aws): add support for source_profile (#3834)

Co-authored-by:	@luiscamaral
2023-04-02 16:38:03 +02:00
Vegard Skui 4bca74eca2
feat(fossil): detection of Fossil check-outs in subdirectories (#4910)
* Move PathExt::device_id() outside modules module

* Add upwards_sibling_scan-function

* Fix Fossil check-out detection in subdirectories

* Use shared upwards scanning function in hg_branch

* Let the caller specify if they're looking for a file or a folder

* fix merge

---------

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-04-02 16:37:27 +02:00
Ryan Sabatini aef799bfb0
fix(pulumi): Fix formatting on pulumi module when using version (#5038)
Fix formatting on pulumi module when using version

Sanitize `pulumi version` output to remove leading 'v' character and trailing
newlines.
2023-04-02 16:36:54 +02:00
Harsh Shandilya f7fe41f9c6
fix(gradle): add support for unstable Gradle versions (#5021) 2023-03-27 16:41:09 +02:00
Zhizhen He 0f8a2d9363
chore: add spell checker to workflows (#4975)
* chore: add spell checker to workflows

* fix: update config schema

* fix: revert for fennel.rs
2023-03-22 13:42:46 -05:00
Harry Hodge 74ce7fdbee
feat(aws): Adds support for AWS_CREDENTIAL_EXPIRATION environment variable (#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-03-20 21:56:12 +01:00
Stefan Cosma c07a21d48a
fix(fossil_branch): fossil checkout database file name on windows (#4978)
fix(fossil_branch): use proper fossil checkout database file name on windows
2023-03-14 18:56:29 +01:00
Swarnim Maheshwari 0ad0465a7a
fix(init): avoid cygpath for starship binary path (#4970)
Update mod.rs
2023-03-11 07:24:14 +01:00
David Knaack c8520dc9d9
chore: fix clippy warnings for rust 1.68 (#4983) 2023-03-11 07:23:30 +01:00
David Knaack 5e78226a3f
fix(preset): add output-flag to avoid encoding issues (#4926) 2023-03-03 11:46:16 +01:00
David Knaack d1891de638
chore: use updated gitoxide crate names (#4913) 2023-02-21 13:03:17 +09:00
iuhoay 07c2298965
feat(java): Add `.sdkmanrc` for Java (#4888)
* Add `.sdkmanrc` for Java

* Update config-schema.json, Add `.sdkmanrc` file for Java

* Update doc
2023-02-11 14:06:21 +01:00
Martin Slot e6c5571fc9
fix: let-env warning when using nushell (#4893)
Fixed a startup error, when using nushell.

The nushell warns about not using `let-env` for configuring `config`. I have removed the `load-env` and just added a `let-env` for the `config` as the documentation recommends: https://www.nushell.sh/book/environment.html#let-env
2023-02-11 14:05:39 +01:00
David Knaack c019630653
build(deps): update rust crate os_info to 3.6.0 (#4878)
* 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-02-07 12:52:14 +01:00
Vegard Skui 41eb98b310
feat(fossil_branch): add fossil_branch module (#4806)
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-01-31 09:06:46 +01:00
accidentaldevelopment 9ac924eb3f
fix(fish): enable transient prompt when in vi mode (#4826) 2023-01-30 23:13:16 +01:00
David Knaack 645a439c0b
build(deps): update toml crates (#4853)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-30 23:12:27 +01:00
David Knaack 5e123fcbce
chore: fix clippy warnings for rust 1.67 (#4855) 2023-01-27 18:33:24 +09:00
Benjamin Sherman 85d683daf2
fix(container): reduce docker, podman and systemd confusion (#4832)
* Fixes #3821 to provide an improved experience for display of container

Details:
- podman containerenv processing is now happens before systemd
- if systemd/container contains "docker", now shows "Docker"
- maintains fix from #4593 to prevent 'Systemd" display on WSL
- refactors tests for systemd detection

* only compile function for linux

* correct 'default' systemd test use use None, codecov caught this mistake

* refactor my change to systemd/container detection so that it has one stage instead of multiple
2023-01-22 23:36:42 +01:00
Florent Vilmart 10433e31ef
feat(config): Adds support for --profile <custom profile name> (#3467)
Co-authored-by: Kevin Song <chips@ksong.dev>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-01-11 21:25:36 -06:00
かわえもん 64e0208708
chore(aws): fix unintended test failure of `aws::missing_any_credentials` (#4805)
chore(aws): fix unintended test failure of `aws::missing_any_credentials` 

Because its mocking is not enough, The test may unintentionally fail
if `~/.aws/credentials` exists.
This commit fixes this issue by mocking `credentials` file as well.
2023-01-11 10:51:39 +01:00
Andre Ribeiro e88484d567
fix(nodejs): apply `style` even if node version is unavailable (#4713)
* correct nodejs color

* Update src/modules/nodejs.rs

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

* Update src/modules/nodejs.rs

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

* fix: removed unecessary unwraps

* test: no node installed

* test: no node installed

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-01-10 23:00:09 +01:00
Takuya Uehara fcdf2a0fb6
chore: remove version check for unsupported nushell version (#4791) 2023-01-06 12:13:04 -06:00
David Knaack e47ea57db2
feat(logger): delete old logs & avoid more dup logs (#4348)
* feat(logger): delete old logs & avoid more dup logs

* `match` -> `let else` where possible
2023-01-04 09:22:02 +01:00
Lyle Mantooth 67b6376e2e
feat: add pijul_channel module (#4765)
* 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-31 15:55:23 +01:00
Nicolas Évrard 8d2256ab1d
feat(hg_branch): Add support for mercurial topics and find hg root dir (#4771)
* 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-31 15:53:55 +01:00
John Slowik 8a8e09dd50
docs(preset): Plaintext status added (#4775)
* Plaintext status added

* One test case
2022-12-31 12:35:28 +01:00
David Knaack 5d4cb6ff8f
feat(env_var): Add support for env_var.VAR in format (#4497)
Co-Authored-By: Segev Finer <24731903+segevfiner@users.noreply.github.com>

Co-authored-by: Segev Finer <24731903+segevfiner@users.noreply.github.com>
2022-12-28 21:00:49 +01:00
Julian Antonielli 19fdf9bba5
feat(nix): support new `nix shell` command (#4724)
* 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-27 14:59:40 +01:00
Scott Palmer 9093891acb
fix(package): Improve regex for extracting gradle version from gradle.properties (#4760)
fix: Improve regex for extracting gradle package version from gradle.properties (#4759)
2022-12-27 13:40:56 +01:00
David Knaack 784c935169
build(deps): update gitoxide crates (#4748)
* build(deps): update gitoxide crates

* remove call to removed function (env is loaded automatically now)

* bump git-repository to v0.30.1

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-24 11:08:14 -06:00
fold-squirrel e93dbf8630
feat(fennel): add fennel module (#4717) 2022-12-21 10:53:53 -06:00
Kevin Song addd11e300
refactor(kubernetes): Remove nested Options (#4743)
Kubernetes module was previously a bit messy, with lots of
unnecessarily nested options. Clean this up using filter_map and
find_map, with two major results:

1. `ctx_components` is now a Vec<KubeCtxComponent> instead of a
   Vec<Option<KubeCtxComponent>>. This greatly simplified downstream
   processing of these context components.

2. Instead of storing a partial computation of the namespace in
   variables `kube_ns`, etc, compute them directly in the formatter
   mapping. This is made simpler (read: actually doable) by change 1.
2022-12-20 19:04:40 -06:00
Foster Z 27d167b7a2
fix(git_commit): fix potential test failure (#4734)
Changes git command used in tests to avoid potential failures 
with lightweight tags.
2022-12-18 12:33:01 -06:00