Commit Graph

594 Commits

Author SHA1 Message Date
Dario Vladović ee65297183
refactor(print): introduce `UnicodeWidthGraphemes` trait (#2670) 2021-05-02 09:55:26 +02:00
Rashil Gandhi 1979331d47
feat(shell): add unknown_indicator parameter (#2649)
* Add default config parameter for shell

* Update docs for shell default parameter

* Change parameter to more obvious name
2021-04-30 20:48:05 +02:00
Dario Vladović ff3c893a76
feat(gcloud): introduce separate `account` & `domain` format string variables (#2594)
* feat(gcloud): split gcloud profile into `account` & `domain` format variables

* docs(gcloud): update documentation

Co-authored-by: Filip Bachul <filip.b@masterborn.com>
2021-04-30 08:19:54 +02:00
Dario Vladović d242d40db6
feat(gcloud): honor `CLOUDSDK_CORE_PROJECT` env variable (#2596)
Co-authored-by: Filip Bachul <filip.b@masterborn.com>
2021-04-30 08:13:51 +02:00
filip 540c2c2475
feat: Add version formating for modules (#2611)
* format crystal version with VersionFormatter

* update crystal dosc

* format crystal module

* fix typos

* format dart version with VersionFormatter

* fix dart malformed test

* update dart docs

* format cmake version with VersionFormatter

* update cmake docs

* format deno version with VersionFormatter

* update deno docs

* remove Version type

* format dotnet version with VersionFormatter

* update dotnet docs

* format erlang version with VersionFormatter

* update erlang docs

* format golang version with VersionFormatter

* refactor formatting in my modules

* format helm version with VersionFormatter

* format julia version with VersionFormatter

* format kotlin version with VersionFormatter

* format lua version with VersionFormatter

* format nim version with VersionFormatter

* format perl version with VersionFormatter

* format php version with VersionFormatter

* format purescript version with VersionFormatter

* format scala version with VersionFormatter

* format swift version with VersionFormatter

* format terraform version with VersionFormatter

* format vagrant version with VersionFormatter

* format zig version with VersionFormatter

* format elixir version with VersionFormatter

* format ocaml version with VersionFormatter

* update elixir docs

* update golang docs

* update helm docs

* update julia docs

* update kotlin docs

* update lua docs

* update nim docs

* update ocaml docs

* update perl docs

* update php docs

* update purescript docs

* update scala docs

* update swift docs

* update terraform docs

* update vagrant docs

* update zig docs

* format elm version with VersionFormatter

* update elm docs

* pass module_name as &str to format_module_version
2021-04-29 23:22:20 +02:00
Tom Golden c2e84e1802
feat: abbreviate package.json semantic versions (#2271) 2021-04-29 15:06:25 -04:00
Dario Vladović 8a8dca71a6
fix(gcloud): add double space after cloud emoji symbol (#2666)
* fix(gcloud): add double space after cloud emoji symbol

* docs(gcloud): update docs
2021-04-29 19:18:20 +02:00
Kid 16855fe8e2
fix(fish): explicitly set scope in fish init script (#2636)
* fix: use correct scope in fish init script

* Prefix variable names with Starship

* Use `functions -e` to remove `fish_mode_prompt`

* Update src/init/starship.fish

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

Co-authored-by: Dario Vladović <d.vladimyr@gmail.com>
2021-04-29 19:16:10 +02:00
Felipe Seré 0e23526f5f
fix(zsh): Reverts changes to background jobs retaining improvements around START_TIME (#2638)
* Revert "fix(zsh): Set PROMPT just once (#2428)"

This reverts commit 6fd7d7b501.

* Reintroduce fixes around START_TIME

* Bring back disabling virtualenv

* Expand the jobstates before passing the number to starship

Credit goes to @vladimyr
2021-04-29 16:16:25 +02:00
Dario Vladović 67e0eb0e9a
refactor: read CLI options as `str` (#2656) 2021-04-28 20:39:32 +02:00
David Knaack 8f464e4c1d
fix(print-config): add red module to Default impl (#2652) 2021-04-26 20:26:05 +02:00
David Knaack cd50b354a3
fix(print-config): use proper defaults for top-level values (#2605) 2021-04-26 19:55:22 +02:00
David Knaack 603da24852
fix(configure): fix launching .cmd editors (#2635) 2021-04-24 00:10:19 +02:00
Dario Vladović 4fda947cda
refactor(gcloud): lazily read active gcloud config (#2592)
* refactor(gcloud): lazily read active config once

* refactor(gcloud): wrap gcloud config with `GcloudContext`
2021-04-23 08:27:53 +02:00
Florent 2deaa572af
feat(config): Add support for `inverted` token in style strings (#2589)
* Add support for `reverse` keyword in style strings

* Duplicate test case and keep original

* Rename keyword to `inverted`

* Add explanatory sentence in readme
2021-04-22 12:09:21 -04:00
Kid aaf1f246d7
fix(nodejs): Check for `.nvmrc` (#2626)
* feat(nodejs): Check for `.nvmrc`

* Fix test
2021-04-22 12:08:12 -04:00
Andrew McClenaghan 8bf69cbaa8
feat(aws): Add support for profile from awsume (#2609) 2021-04-20 18:35:07 +02:00
Milo 83c906457e
feat(red): create module (#2599)
* create module

* fmt

* fix clippy

* fmt even though i already did it

* add all extensions

* tests for .reds

* change from circle to triangle

* remove hi.red

* fix test name

* update variables

* fix comment

* Update docs/config/README.md

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

* Update docs/config/README.md

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

* apply patchs

Co-authored-by: Dario Vladović <d.vladimyr@gmail.com>
2021-04-20 18:31:47 +02:00
Anthony Huang 3f2d6cc068
fix(jobs): Handle zero jobs with zero thresholds (#2613)
* Handle zero jobs with negative thresholds

* Allow for zero threshold only

* Log when threshold is less than zero

* Address comments

* Add docs
2021-04-20 18:30:22 +02:00
t-mangoe 1ee59ed18c
feat(battery): Add a symbol option to `battery.display` (#2475)
* feat: Add a symbol option to `battery.display`

* feat: Add a symbol option to `battery.display`

* use `impl defaulat` instead of `RootModuleConfig`

* edit the code according to clippy's linting

* change variable type to `Option<'a str>`

* update the documentation on the battery module

* updated documentation and source code according to review comment

* remove the unnecessary method and write the default value of BatteryDisplayConig to the document

* add 'charging_symbol' option to battery.display
2021-04-17 13:52:46 +02:00
Milo 3cb15abfc5
feat(deno): create module (#2565)
* Add deno module

* Update docs

* Update src/utils.rs

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

* Update src/modules/deno.rs

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

* Update src/modules/deno.rs

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

* Update src/modules/deno.rs

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

* Update src/modules/deno.rs

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

* run rust fmt

* Use deno -V

* fmt

* Fix deno module

* do clippy

* Update src/configs/deno.rs

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

* Update src/modules/deno.rs

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

* Update docs/config/README.md

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

* Fix test and docs

* Remove unused code

* fmt

* update configs

* Add more tests

* Update docs/config/README.md

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

Co-authored-by: Dario Vladović <d.vladimyr@gmail.com>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2021-04-15 15:22:12 +02:00
Dario Vladović 51c2ae0a28
fix(elixir): correctly parse dev and rc versions (#2573) 2021-04-15 08:48:12 +02:00
Dario Vladović f765ca3b3f
refactor(scala): parse version w/o regex (#2574) 2021-04-15 08:47:00 +02:00
Dario Vladović 49f5b9c439
refactor(lua): parse version w/o regex (#2575) 2021-04-15 08:46:29 +02:00
Dario Vladović fe030c2064
refactor: propagate version formatting errors (#2566)
* refactor: propagate version formatting errors

* refactor: trim version formatting boilerplate

* refactor(node): unwrap version formatting

* docs: fix typo

* docs: remove dots after `version_format`

* feat: lazy version parsing

* refactor(version-formatter): collect segments into string
2021-04-10 19:06:25 +02:00
David Knaack 436eb61efd
test: allow running tests as root (#2571) 2021-04-10 19:05:46 +02:00
Chris Rose 6817e7f698
feat: add version format configuration (#2499) 2021-04-08 18:37:54 -04:00
David Knaack 8af677c811
feat(config): print a suggestion for unknown fields (#2560)
* feat(config): print a suggestion for unknown fields

* Fix typo

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

Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
2021-04-06 22:12:37 +02:00
Dario Vladović c7d5ce72b5
refactor(init): cleanup init stub (#2548)
* refactor(init): cleanup init stub

* refactor(init): use iex PowerShell alias

* fix(init): prevent bash scope pollution

* refactor(init): update PowerShell snippet
2021-04-05 16:52:10 +02:00
Charles Swartz 2b0010ffe3
feat(python): Remove parentheses from pyvenv.cfg prompt parameter (#2551)
* Remove parentheses from pyvenv.cfg prompt

* Apply suggestions from initial code review

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

Co-authored-by: Dario Vladović <d.vladimyr@gmail.com>
2021-04-05 16:51:01 +02:00
David Knaack b791383a94
fix(configure): fix print-config issues (#2556) 2021-04-05 16:47:49 +02:00
Dario Vladović e19f79bfd3
style(battery): add space between icon and text for better visual (#2547)
* style(battery): add space between icon and text for better visual

* docs(battery): update docs

Co-authored-by: LitoMore <litomore@gmail.com>
2021-04-03 13:10:45 +02:00
Dario Vladović dbb6885724
feat(ocaml): add `switch_indicator` and `switch_name` variable (#2503)
* feat(ocaml): add switch variable

* feat(ocaml): configurable opam switch display

* docs(ocaml): document opam switch display options

Add `global_switch_indicator` and `local_switch_indicator` config
options.

* style(opam): add `OpamSwitch` type alias

* fix(opam): gracefully handle empty opam switch

Co-authored-by: cdaringe <cdaringe@gmail.com>
2021-04-02 19:21:48 +02:00
Thomas O'Donnell 7779ed6075
style(directory): Add comments for test settings (#2538)
Have added some comments to explain the settings we are using in some
tests.
2021-04-02 06:18:40 +02:00
Kim Christensen 70b397a1c4
fix(git_branch): Make Git branch module support bare repositories (#2522)
Co-authored-by: Kim Christensen <KMCH@simcorp.com>
2021-04-01 18:51:55 +02:00
David Knaack 51972801de
feat(config): warn about unknown config key names (#2527) 2021-03-31 20:13:23 +02:00
David Knaack 9d15eb135b
test(directory): fix on windows without admin (#2497) 2021-03-31 18:00:24 +02:00
David Knaack d06ba072a8
feat(config): allow printing default and computed config (#2521)
* feat: allow printing default and computed config

* fix custom modules

* actually fix custom modules
2021-03-31 17:31:55 +02:00
Caleb Maclennan f13e44c730
feat(vcsh): Add new module for VCSH (#2513)
* feat(vcsh): Implement new VCSH module

* test(vcsh): Add unit tests for VCSH module

* docs(vcsh): Document VCSH module
2021-03-28 17:48:15 +02:00
Dario Vladović 404b4f3d0c
refactor(username): reformat code to match docs (#2517) 2021-03-27 22:13:20 +01:00
Dario Vladović 1336944ab7
refactor(singularity): use `?` operator (#2518) 2021-03-27 18:53:54 +01:00
David Knaack cf68f54611
fix(context): remove unwrap when pwd is unavailable (#2520) 2021-03-27 11:46:05 -04:00
Dario Vladović c8a787475c
refactor: use `unwrap_or_default` (#2516) 2021-03-26 21:01:20 +01:00
Thomas O'Donnell e0da57df3f
style(init): Cleanup the unknown shell message (#2444)
* style(init): Cleanup the unknown shell message

Have make a small change to the message that is printed when an unknow
shell is used. This correct the placement of the trailing `"` so that
the two training new lines are correctly printed and updates the list of
supported shells.

* refactor(init): consolidate unknown shell errors

Have consolidated the two unknown shell errors

* refactor(init): Quote the shell name in the output

Quote the shell name in the script and combined the shell_name and
shell_basename to simplify the code a little.
2021-03-25 15:08:28 -05:00
David Knaack ba40ad5ce6
chore(clippy): fix new lints (#2507) 2021-03-25 16:03:19 -04:00
Chris Rose aa7a8056bb
fix: Add a missing ' ' to the end of the python prompt (#2248)
Co-authored-by: Chris Rose <offline@offby1.net>
2021-03-24 10:41:08 -05:00
Andy Freeland 3513aae3ed
fix(shell): Support conditional format strings for `$indicator` (#2489)
Previously attempting to use conditional format strings with
`$indicator` would never display an indicator, e.g.:

```toml
[shell]
fish_indicator = ""
bash_indicator = "B "
format = "($indicator )"
disabled = false
```

This would always display an empty string.

Fixes #2474.
2021-03-23 17:20:29 -04:00
Zachary Dodge 0a091bd236
perf(git_status): replace git2 in git status module with git cli (#2465) 2021-03-23 12:45:27 -04:00
Eyal Cherevatzki 612cc7d27b
refactor(dotnet): ".NET" instead of "•NET" (#2471)
* refactor(dotnet): ".NET" instead of "•NET"

"•NET" looks quite weird, especially since the official writing is ".NET".

* revert(docs): translated docs

Co-authored-by: Eyal Cherevatzki <eyal@hyperguest.com>
2021-03-18 18:46:54 +01:00
David Knaack 052b56fe10
refactor: replace RootModuleConfig with Default (#2458) 2021-03-15 11:40:52 +01:00