1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-17 10:35:15 +00:00
starship/src/modules
Jimmy Royer 8d3aa3b304
feat(r-lang): add module for R programming language (#1475)
* feat(formatter): Allow scoped variables (#1094)

* feat: Allow scoped variables

, with the following improvements to the format string parser.

- Add documentation to spec
- Simplify some syntax in the spec
- Rewrite for loop with iterators

* Added support for R programming language.

* Removed unnecessary debug log used during dev process.

* Make the `R` command upper case as the *nix OS executables are case sensitives and the correct command is upper-case.

* Changed comments to reflect R features (rather than node.js where code was coming from).

* feat(format_string): Allow positional segments (#1138)

* feat(format_string): Allow using variables in a style string (#1130)

* fix(format_string): Allow multiple variable mappers (#1142)

* refactor: Add error handling to variables (#1148)

* Squashed commit of changes with meta variables:

commit 5beb3bca18f0b0c822b740afb3778ccb1e3a7d19
Author: heyrict <xiezh0831@yahoo.co.jp>
Date:   Mon Apr 27 09:52:59 2020 +0800

    fix: Cache variables in meta variables properly

commit 49b9324942dd55350c87107d0e8c7d1592d92e8a
Merge: cc575bc 260a1ab
Author: heyrict <xiezh0831@yahoo.co.jp>
Date:   Sun Apr 26 21:34:52 2020 +0800

    Merge branch 'feat/format-string' into meta-variables

commit cc575bc27cbf87c4197e96d2fa5416d4932e45d7
Merge: 3ed2d32 e0c1901
Author: heyrict <xiezh0831@yahoo.co.jp>
Date:   Sun Apr 26 12:16:12 2020 +0800

    Merge branch 'feat/format-string' into meta-variables

commit 3ed2d326c9f625930bdd72cea736c1d0eab6d381
Author: heyrict <xiezh0831@yahoo.co.jp>
Date:   Sun Apr 26 11:06:28 2020 +0800

    refactor(format_string): Allow returning error in variable mapper

commit 766732fe697df947538fe12ca92a8eb8e7bfea3e
Author: heyrict <xiezh0831@yahoo.co.jp>
Date:   Sat Apr 25 22:56:02 2020 +0800

    fix: Add test for StyleVariableHolder

commit 444334ad206a68132fa6257b83c3992b7b790981
Merge: 479d4a7 9796a66
Author: heyrict <xiezh0831@yahoo.co.jp>
Date:   Sat Apr 25 22:52:27 2020 +0800

    Merge branch 'positional-segments' into style-variables

commit 9796a66a9679597676e7fd859197fd542e8042dc
Author: heyrict <xiezh0831@yahoo.co.jp>
Date:   Sat Apr 25 22:51:26 2020 +0800

    test: Add tests for VariableHolder

commit 479d4a72fa58fd8aa777acd8228d4834407a7b6a
Author: heyrict <xiezh0831@yahoo.co.jp>
Date:   Sat Apr 25 22:41:47 2020 +0800

    feat: Add trait StyleVariableHolder

commit 21d40c6f4e2d12b34fdec4e2e38b6ad0f91217a3
Merge: 3b459f4 e7dd987
Author: heyrict <xiezh0831@yahoo.co.jp>
Date:   Sat Apr 25 22:17:11 2020 +0800

    Merge branch 'positional-segments' into style-variables

commit e7dd987fd7b01a82c6012ba7055d1dd9b5fd84aa
Author: heyrict <xiezh0831@yahoo.co.jp>
Date:   Sat Apr 25 15:10:12 2020 +0800

    misc: Minor changes on docs and codes

commit 71020b0397a86e850ad5beda926aa9416250025c
Author: heyrict <xiezh0831@yahoo.co.jp>
Date:   Fri Apr 24 20:51:45 2020 +0800

    feat(format_string): Add syntax for positional segments

commit 3b459f4379b08defce50c57a903502513ad1b2b6
Author: heyrict <xiezh0831@yahoo.co.jp>
Date:   Wed Apr 22 17:49:15 2020 +0800

    fix: Fix clippy

commit 2fb052d68cb46680c081f5a0e25e2c3fbdc9e204
Author: heyrict <xiezh0831@yahoo.co.jp>
Date:   Wed Apr 22 17:02:09 2020 +0800

    feat: Add map_style method to feed values in style string

* fix: Change error type of StringFormatter::new

* fix: Fix rustfmt

* tests: Add tests to variable errors

* docs: Add documentation

* chore: Rename positional to conditional (#1166)

* docs: Add docs for format strings (#1083)


Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>

* refactor(rust): Use format strings (#1063)

* Updated to latest string formatter's changes.

* feat(format-string): add format string support to battery module (#1158)

* update battery module with format string

* update battery module docs

* update battery module with format string

* update battery module docs

* fix battery module with new StringFormatter api

* fix clippy warnings

* Update docs/config/README.md

Co-authored-by: Zhenhui Xie <xiezh0831@yahoo.co.jp>

* battery symbols now supports format-string

* battery symbols now support format-string
remove space between symbol and percentage
fix battery config

Co-authored-by: Zhenhui Xie <xiezh0831@yahoo.co.jp>

* refactor(golang): Use format strings (#1066)

* refactor(golang): Use format strings

* docs(golang): Update docs

* docs(golang): Update docs

* fix: Update to upstream API changes

* docs(golang): Update docs

Co-authored-by: heyrict <xiezh0831@yahoo.co.jp>

* Fixed a few inconsistencies.

* Removed string clone in favor of a reference.

* Update src/modules/r.rs

Reverting the r version string formatting to a more idiomatic way of handling it.

Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>

* Update src/configs/r.rs

Co-authored-by: Zhenhui Xie <xiezh0831@yahoo.co.jp>

* Updated documentation to reflect changes in config.

* refactor(java): Added formatter support for Java module. (#1084)

* refactor(haskell): Added formatter support for the Haskell module. (#1111)

* Added formatter support for the Haskell module.

* Updated haskell module with latest formatter code changes.

* Changed documentation for latest Haskell string formatter changes.

* Fixed a few inconsistencies.

* Removed unnecessary variable cloning for using reference instead.

* refactor(env_var): Added formatter support for the env_var module (#1180)

* refactor(memory_usage): Added formatter support for memory_usage module (#1182)

* Migrated the memory usage module to string formatter' support.

* Fixed a few inconsistencies.

* Removed cloning of variables to instead use references.

* refactor(cmd_duration): Use format strings (#1200)

* Fixed format issue in code.

* Fixed compilation error after adding new 'r' module in root config.

* Added .Rproj extension file to be detected with R prog lang.

* Aligned R module code with existing ones.

* Update src/configs/r.rs

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

* fix: Added rconfig to fullconfig and fixed broken api calls

* Apply suggestions from code review

Co-authored-by: Dario Vladović <d.vladimyr@gmail.com>

* Update src/modules/r.rs

Co-authored-by: Dario Vladović <d.vladimyr@gmail.com>

* Addressed PR comments.

Cleaned up code and fixed code errors.

* Updated docs for consistency purpose.

Co-authored-by: Milo <50248166+Milo123459@users.noreply.github.com>

* refactor: Renamed the `r` module to `rlang`

* test: Provided R fixture and R module renderer test

* doc: Updated rlang mod config to reflect latest detection changes

* fix: Added missing rlang entry in config/mod

* feat: Added version formatted fined grained configuration

* Added version_format in R lang documentation.

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

* review: Addressed later comments

* fix: README was missing a previously present section for Python

* Fix: Test was not updated for previous version string upgrade.

* fix: Upgraded R version in remaining test.

Co-authored-by: Zhenhui Xie <xiezh0831@yahoo.co.jp>
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
Co-authored-by: Luca Rinaldi <lucarin@protonmail.com>
Co-authored-by: John Letey <johnletey@gmail.com>
Co-authored-by: Tilmann Meyer <47182955+ATiltedTree@users.noreply.github.com>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
Co-authored-by: Dario Vladović <d.vladimyr@gmail.com>
Co-authored-by: Milo <50248166+Milo123459@users.noreply.github.com>
2021-05-25 14:13:30 -04:00
..
utils chore(clippy): fix new lints (#2507) 2021-03-25 16:03:19 -04:00
aws.rs feat(aws): add temporary credentials countdown (#2464) 2021-05-12 20:43:46 -04:00
battery.rs feat(battery): Add a symbol option to battery.display (#2475) 2021-04-17 13:52:46 +02:00
character.rs refactor: read CLI options as str (#2656) 2021-04-28 20:39:32 +02:00
cmake.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
cmd_duration.rs feat(aws): add temporary credentials countdown (#2464) 2021-05-12 20:43:46 -04:00
conda.rs refactor: use unwrap_or_default (#2516) 2021-03-26 21:01:20 +01:00
crystal.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
custom.rs feat(config): allow printing default and computed config (#2521) 2021-03-31 17:31:55 +02:00
dart.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
deno.rs fix: add missing project filter rules (#2687) 2021-05-04 08:57:38 +02:00
directory.rs test: allow running tests as root (#2571) 2021-04-10 19:05:46 +02:00
docker_context.rs feat(docker_context): Configure when module is shown (#2315) 2021-02-16 20:05:43 +01:00
dotnet.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
elixir.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
elm.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
env_var.rs refactor(clippy): fix new lints (#2297) 2021-02-11 21:08:17 +01:00
erlang.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
gcloud.rs feat(gcloud): introduce separate account & domain format string variables (#2594) 2021-04-30 08:19:54 +02:00
git_branch.rs fix(git_branch): Make Git branch module support bare repositories (#2522) 2021-04-01 18:51:55 +02:00
git_commit.rs fix(git_commit): remove unwraps (#2743) 2021-05-19 19:08:48 +02:00
git_state.rs fix: Applied clippy warnings (#2153) 2021-01-16 13:26:52 +01:00
git_status.rs fix(git_status): Show git add -N files as unstaged (#2702) 2021-05-07 19:31:18 -04:00
golang.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
helm.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
hg_branch.rs chore(clippy): fix new lints (#2507) 2021-03-25 16:03:19 -04:00
hostname.rs refactor(clippy): fix new lints (#2297) 2021-02-11 21:08:17 +01:00
java.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
jobs.rs refactor: read CLI options as str (#2656) 2021-04-28 20:39:32 +02:00
julia.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
kotlin.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
kubernetes.rs chore(clippy): fix new lints (#2507) 2021-03-25 16:03:19 -04:00
line_break.rs refactor(clippy): fix new lints (#2297) 2021-02-11 21:08:17 +01:00
lua.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
memory_usage.rs fix(memory_usage): prevent used swap underflow on windows (#2689) 2021-05-04 11:28:44 -04:00
mod.rs feat(r-lang): add module for R programming language (#1475) 2021-05-25 14:13:30 -04:00
nim.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
nix_shell.rs refactor(clippy): fix new lints (#2297) 2021-02-11 21:08:17 +01:00
nodejs.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
ocaml.rs test(ocaml): test custom switch indicators (#2657) 2021-05-03 21:48:58 +02:00
openstack.rs test: avoid setting $HOME (#2155) 2021-01-19 23:23:27 +01:00
package.rs feat(package): add support for nimble project package version (#2569) 2021-05-09 06:38:16 +02:00
perl.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
php.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
purescript.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
python.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
red.rs fix: add missing project filter rules (#2687) 2021-05-04 08:57:38 +02:00
rlang.rs feat(r-lang): add module for R programming language (#1475) 2021-05-25 14:13:30 -04:00
ruby.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
rust.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
scala.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
shell.rs feat(shell): add unknown_indicator parameter (#2649) 2021-04-30 20:48:05 +02:00
shlvl.rs refactor(clippy): fix new lints (#2297) 2021-02-11 21:08:17 +01:00
singularity.rs refactor(singularity): use ? operator (#2518) 2021-03-27 18:53:54 +01:00
status.rs refactor(clippy): fix new lints (#2297) 2021-02-11 21:08:17 +01:00
swift.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
terraform.rs fix: remove trailing whitespace from Terraform version (#2726) 2021-05-15 22:36:59 -04:00
time.rs refactor(clippy): fix new lints (#2297) 2021-02-11 21:08:17 +01:00
username.rs test: allow running tests as root (#2571) 2021-04-10 19:05:46 +02:00
vagrant.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00
vcsh.rs feat(vcsh): Add new module for VCSH (#2513) 2021-03-28 17:48:15 +02:00
vlang.rs feat(vlang): support vpkg (#2686) 2021-05-07 10:22:18 -04:00
zig.rs feat: Add version formating for modules (#2611) 2021-04-29 23:22:20 +02:00