summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2021-07-17fix(init): remove quotes in bash init (#2893)David Knaack
2021-07-16feat: add support for xonsh (#2807)Jeremy Schlatter
* feat: add support for xonsh * xonsh: add STARSHIP_SESSION_KEY * xonsh: implement STARSHIP_SESSION_KEY in xonsh * docs: mention tcsh, elvish, and nu in more places * xonsh: change STARSHIP_SESSION_KEY implementation See https://github.com/starship/starship/pull/2807#discussion_r667064149 * xonsh: fix jobs implementation * xonsh: do not silently discard stderr from starship
2021-07-16fix(windows): avoid inadvertly running exes from cwd (#2885)David Knaack
On Windows when running commands with their name instead of the path with Command::new, executable with that name from the current working directory will be executed. This PR replaces all instances of Command::new with a new create_command function which will first resolve any executable paths and avoid this issue.
2021-07-13feat(env_var): allow multiple instances (#2797)filip
Allows displaying multiple instances of the env_var module.
2021-07-13fix(pwsh): replace Get-Error with $error[0] (#2873)Chrissy LeMaire
Get-Error does not exist in all versions of PowerShell, and attempting to use it on machines where it does not exist pollutes $error. Someone may be tempted to use -ErrorAction Ignore but since the command does not exist, it still ends up in $error This is a dual bug fix because it actually gets errors on all machines now and it does not pollute $error.
2021-07-10feat: Add the `git_metrics` module (#2827)Alexander Gonzalez
This PR adds a new module named git_metrics. It shows the added/deleted lines in the current git repository following the format: "[+$added_lines]($added_style) [-$deleted_lines]($deleted_style)".
2021-07-10fix(nu): use correct session key variable name (#2874)David Knaack
2021-07-05fix(git_status): Fix when the worktree != root dir (#2831)Thomas O'Donnell
Have updated the git_status module to work if the worktree has been changed to a different directory than the repository root directory.
2021-07-04feat: add support for nu shell (#2847)David Knaack
2021-07-04fix(dotnet): make default format consistent with other modules (#2853)Kid
Add via prefix to dotnet modules' default format config.
2021-07-04refactor(git_commit): small refactor to remove duplicate code (#2752)filip
2021-07-03feat(docker_context): Use DOCKER_HOST and DOCKER_CONTEXT enviroment ↵Lorenzo Tucci
variables (#2782) * feat(docker_context): Use DOCKER_HOST and DOCKER_CONTEXT enviroment variables for docker context * Updating documentation for Docker context
2021-07-03fix(init): improve starship path escaping (#2848)David Knaack
2021-07-02perf: Improve custom config OS (#2843)Giovanni Bassi
Related to #2750 and #2751. Moving the OS check before other checks so that there is no performance hit for running the match in the incorrect OS
2021-07-02style: enforce ALL_MODULES ordering in test (#2837)Andrew Houts
* style: enforce ALL_MODULES ordering in test * use unstable sort * use copied instead of dereferencing in iterator
2021-06-29style: fix name of battery info provider implementation (#2836)Andrew Houts
* fix name of battery info implementation * empty commit for squash
2021-06-29test(battery): add battery tests (#2795)Andrew Houts
Add some tests to the battery module, make it testable by mocking out the code that fetches battery info.
2021-06-29feat: treat empty string as none when formating (#2738)filip
* treat empty string as none when formating * update docs * format & clippy
2021-06-25fix(rust): support for `rust-toolchain.toml` (#2775)Shogo Takata
* Add support for `rust-toolchain.toml` * fix(rust): support for `rust-toolchain.toml` * This commit adds support for `rusttoolchain.toml`. * Added some tests. * Added some comments on what the tests are checking. * Changed code for `read_channel` to match the behavier of rustup. * Update src/modules/rust.rs Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Update rust module Added back the functionality to cache Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2021-06-21fix(clippy): fix additional clippy lints in tests (#2813)David Knaack
2021-06-16fix(clippy): fix new lint warning (#2803)David Knaack
2021-06-13feat: Add Operating System condition to custom commands (#2751)Javier Goday
* #2750: Add Operating System condition to custom commands * update custom module config docs * fix os field name in custom module * Fix custom module false positives (when && os conditions) * Custom module operation system: check unix family * Custom module operation system: fix check unix family (use cfg!(unix)) * 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>
2021-06-05fix(dotnet): Don't treat folder with .sln file as a .NET project (#2785)Rumia
* Don't treat folder with .sln file as a .NET project * Update docs for .NET detect_extensions changes
2021-05-25feat(r-lang): add module for R programming language (#1475)Jimmy Royer
* 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-19fix(git_commit): remove unwraps (#2743)David Knaack
2021-05-18refactor(utils): Add extra logging to read_file (#2742)Thomas O'Donnell
Have added some additional logging to the `read_file` util to make debugging issues easier.
2021-05-15fix: remove trailing whitespace from Terraform version (#2726)Chris
2021-05-12feat(aws): add temporary credentials countdown (#2464)Carl-Louis Van Brandt
2021-05-12fix(zsh): preserve zle-keymap-select (#2717)Munif Tanjim
2021-05-09feat(package): add support for nimble project package version (#2569)Pratik Chaudhary
* feat(nim): add support for nimble project package version * Replace find_file with context scanner. Fixes the failing tests. * Replace `utils::exec_cmd` with `context.exec_cmd` so that it uses global timeout * Add tests for nimble project version * Add docs for nimble in package version module for english language * Update docs/config/README.md Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Add test for a case when nimble is not available * Remove extract_vlang_version I don't know why it did not come up while I was fixing merge conflicts on rebase. Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2021-05-08fix(git_commit): leading space in git commit tag (#2697)Jason-S-Ross
* Move git_commit tag leading space into config Fixes #2692 * Update doc default commit tag
2021-05-07fix(git_status): Show git add -N files as unstaged (#2702)John Breen
2021-05-07feat(vlang): support `vpkg` (#2686)Dario Vladović
2021-05-04fix(memory_usage): prevent used swap underflow on windows (#2689)David Knaack
2021-05-04fix: add missing project filter rules (#2687)Dario Vladović
2021-05-03feat(vlang): create module (#2577)Milo
* Add V module * Format * Fix tests * fix typo * Update src/configs/v.rs Co-authored-by: Dario Vladović <d.vladimyr@gmail.com> * 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> * Update docs/config/README.md Co-authored-by: Dario Vladović <d.vladimyr@gmail.com> * Use blue bold * v -> vlang * change docs * More vlang fixes * add package support for v * Update docs/config/README.md Co-authored-by: Dario Vladović <d.vladimyr@gmail.com> * use regex * Update src/configs/mod.rs Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * apply patch * fix Co-authored-by: Dario Vladović <d.vladimyr@gmail.com> Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2021-05-03test(ocaml): test custom switch indicators (#2657)Dario Vladović
2021-05-02refactor(print): introduce `UnicodeWidthGraphemes` trait (#2670)Dario Vladović
2021-04-30feat(shell): add unknown_indicator parameter (#2649)Rashil Gandhi
* Add default config parameter for shell * Update docs for shell default parameter * Change parameter to more obvious name
2021-04-30feat(gcloud): introduce separate `account` & `domain` format string ↵Dario Vladović
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-30feat(gcloud): honor `CLOUDSDK_CORE_PROJECT` env variable (#2596)Dario Vladović
Co-authored-by: Filip Bachul <filip.b@masterborn.com>
2021-04-29feat: Add version formating for modules (#2611)filip
* 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-29feat: abbreviate package.json semantic versions (#2271)Tom Golden
2021-04-29fix(gcloud): add double space after cloud emoji symbol (#2666)Dario Vladović
* fix(gcloud): add double space after cloud emoji symbol * docs(gcloud): update docs
2021-04-29fix(fish): explicitly set scope in fish init script (#2636)Kid
* 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-29fix(zsh): Reverts changes to background jobs retaining improvements around ↵Felipe Seré
START_TIME (#2638) * Revert "fix(zsh): Set PROMPT just once (#2428)" This reverts commit 6fd7d7b5010c28d0557e4ff562187098abaa3bc6. * Reintroduce fixes around START_TIME * Bring back disabling virtualenv * Expand the jobstates before passing the number to starship Credit goes to @vladimyr
2021-04-28refactor: read CLI options as `str` (#2656)Dario Vladović
2021-04-26fix(print-config): add red module to Default impl (#2652)David Knaack
2021-04-26fix(print-config): use proper defaults for top-level values (#2605)David Knaack
2021-04-24fix(configure): fix launching .cmd editors (#2635)David Knaack