Commit Graph

247 Commits

Author SHA1 Message Date
Matan Kushner 3365beae09 test(nodejs): Port nodejs module tests from E2E to integraton (#867)
Replaces the existing nodejs module end-to-end tests with integration tests that don't require preinstalled environmental dependencies.

- Moved the tests to the same file as the module they test
- Created a render_module utility function for rendering modules within tests
- Removed Node.js installation during CI setup
- Add Shell to Context to allow for tests to not run shell-specific code
2020-01-26 16:37:18 -06:00
Andrew Prokhorenkov 6f2c9fb397 feat: add Haskell Stack support (#546)
Add a Haskell Stack module when a stack.yaml file is detected
2020-01-25 00:48:39 -06:00
Sam Rose f4c095de92 fix(java): Add detection for *.gradle files (#871)
Currently the Java module detection looks for build.gradle specifically, but it's possible to rename build.gradle to *.gradle. This change adds Gradle files to the list of detected file extensions.
2020-01-24 10:22:30 -05:00
Peter Bull b723a7d562 fix(python): Trim "Anaconda, Inc." from version (#861) 2020-01-21 11:14:40 -05:00
David Knaack d869b3a098 refactor: replace reqwest with ureq (#844) 2020-01-19 11:00:40 -05:00
Thomas O'Donnell 197376633a fix: Fix incorrect prefix usage in cmd_duration module (#832)
Fixed the way the cmd_duration module is setting it's prefix to be the
same as the other modules.
2020-01-18 01:15:08 -06:00
Jon Grythe Stødle 313a03e2b7 fix(bug-report): Fix status code 414 when generated bug report is too long (#750) 2020-01-15 23:47:56 -05:00
Thomas O'Donnell 0fe90bf018 refactor(dotnet): Use `exec_cmd` util (#826)
Have refactored the dotnet module to use the util::exec_cmd rather than
the Command module directly.
2020-01-15 13:52:38 -05:00
Thomas O'Donnell 60ce320912 refactor(php): Use `exec_cmd` util(#825) 2020-01-12 17:50:25 -05:00
Thomas O'Donnell 0d81694e32 chore: Add ability to mock commands during tests (#768) 2020-01-11 10:08:32 -05:00
Hendrik Rombach dab27f3334 fix: Correct module description text for git_commit (#812) 2020-01-07 12:12:40 -05:00
dependabot-preview[bot] a251ddb957 build(deps): bump reqwest from 0.9.24 to 0.10.0 (#797)
* build(deps): bump reqwest from 0.9.24 to 0.10.0

Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.24 to 0.10.0.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.24...v0.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-06 12:10:30 -05:00
InNoobWeTrust 2eeaa05bfb feat: Terminate $PROMPT_COMMAND properly (#799)
Add trailing semicolon to end $PROMPT_COMMAND properly.
This will prevent starship_precmd to accidentally mess with other hooks invoked after it.
2020-01-04 10:52:08 -05:00
David Hewson 178f177dac perf(hg_branch): Replace direct calls to `hg` (#803)
perf: don't use hg process to get branch / bookmark information, each call was taking 250ms and it was making on average 2 calls.
the branch and bookmark information is available in files in the root of the repo, use that instead.
now takes 300 micro seconds

fix: do not use .hgignore to decide if it is an hg repo. was providing false positives. #721

fix: after changing branch the new branch was not show (the old branch was shown), the new branch is now correctly shown. #722

fix: if no branch override was set it would say (no branch) however if you commited in that state you would commit to the branch default so say that instead
2020-01-03 17:51:45 -05:00
Jon Grythe Stødle 8e5fa60fc8 feat: Add the `starship explain` command (#699)
This adds the explain argument to Starship, which explains what the printed modules in the prompt are.
2020-01-01 23:19:08 -05:00
AppleTheGolden 6bafe4cd66 fix: Consider `$STARSHIP_CONFIG` in `configure` (#795)
Makes starship configure consider the $STARSHIP_CONFIG variable before falling back to the default of ~/.config/starship.toml.
2019-12-30 15:46:02 -08:00
marblenix b82ff321fa feat(git_status): Add a stash count segment (#598) 2019-12-28 22:20:36 -05:00
InNoobWeTrust 9d49410102 fix: Remove trailing semicolon from `$PROMPT_COMMAND` (#784)
Remove any trailing semicolon in $PROMPT_COMMAND before appending starship_precmd, to prevent syntax error.
2019-12-28 10:03:59 -05:00
Tobias Bieniek ecc8754335 fix(package): Use specified directory instead of current working directory (#774) 2019-12-23 22:38:00 -05:00
Dominik Braun 56d62bd659 fix: Parse arguments of $VISUAL and $EDITOR (#772)
Co-authored-by: AppleTheGolden <scotsbox@protonmail.com>
2019-12-23 10:27:00 -05:00
Leonora Tindall 539f320a3f fix: Improve error message when current dir is not found (#773) 2019-12-21 23:26:57 -05:00
Matan Kushner 8cf4ce21d9
perf: Dereference before to_string in aws module 2019-12-20 12:58:59 -05:00
Mike Sampson 256a2be949 feat: Implement AWS region aliases (#646) 2019-12-20 12:30:47 -05:00
AppleTheGolden 11f73efa41 fix: Improvements to `starship configure` (#756)
- look for $VISUAL first, then $EDITOR, then the default
- panic if we can't find the home dir
2019-12-20 09:55:53 -05:00
Jon Grythe Stødle f898b22b55 fix: Clear before printing prompt (#739)
This clears any leftover text when the prompt updates in-place (e.g. Alt + Left/Right in fish shell)
2019-12-19 17:56:30 -05:00
Luca Rinaldi 6a2b0a67b0 feat: cmd_duration module optionally reports milliseconds (#696) 2019-12-19 17:38:06 -05:00
Etienne Mabille 879649d542 fix(bash): save and restore "$_" (#753) 2019-12-19 16:20:44 -05:00
Mario Arias aab35674d2 feat: Adds build.gradle.kts detection to the Java module (#731) 2019-12-19 10:17:50 -05:00
Dominik Braun a4c5c00a73 feat: Implement `starship configure` command (#751) 2019-12-18 16:09:36 -05:00
Matan Kushner 6c2e931087
feat: Extend bug-report to include terminal emulator (#740) 2019-12-17 10:17:04 -05:00
Matan Kushner 2edccd8848
docs: Update bug report template 2019-12-15 19:27:23 -05:00
Jon Grythe Stødle 76804cc3c8 feat: Add `bug-report` sub-command (#725)
This adds a sub command to generate the link. Information, such as operating system and it's version; the current shell's config; and current starship conf, is gathered from the environment and is included in the pre-filled text. The command will also try to open the link in the default browser. Should that fail it will print the link instead and ask the user to copy it.
2019-12-14 18:40:12 -05:00
David Knaack 6724ce5bb5 fix(powershell): % sign was prefixed with ` (#730) 2019-12-13 14:55:20 -05:00
Brian Low 12e8ae85dd fix: Wrap prefix and suffix in shell-specific escape codes (#712) 2019-12-13 14:35:10 -05:00
David Knaack b2ebd24506 fix(powershell): Fix prompt not updating on -nix systems (#728)
Closes #661
2019-12-13 13:44:58 -05:00
dependabot-preview[bot] d71373b265 build(deps): bump sysinfo from 0.9.6 to 0.10.2 (#711) 2019-12-12 15:32:46 -05:00
Morten Scheel e38a257656 feat: add composer.json version to Package module (#716) 2019-12-11 21:05:39 -05:00
BuggStream 93701b26b3 feat: Add support for the ion shell (#704) 2019-12-11 15:31:30 -05:00
AppleTheGolden ea04f9bfc1 fix: Add php to the default prompt order (#708) 2019-12-10 11:52:55 -05:00
AppleTheGolden 3c835ba34b fix: Truncate long paths in conda environment names (#694)
Environment names created via conda create -p [path] tend to be too long for comfort, so this truncates them.
2019-12-09 12:59:02 -05:00
Matan Kushner 60a1319524
docs: Reorder terraform option rows for consistency 2019-12-08 20:43:36 -05:00
wdullaer 44b37a7bac feat: Implement terraform module with workspace and version (#644) 2019-12-08 20:42:51 -05:00
Dan Wendorf dee25c7b35 feat: Add prefix config to directory module (#642) 2019-12-06 14:19:11 -05:00
Qingping Hou c5a206e3cf feat: Add git_commit module (#673) 2019-12-06 11:57:42 -05:00
Stephen Ball 46904e5045 feat: Add PHP version module (#244) 2019-12-05 13:04:27 -05:00
Luca Rinaldi 1558b22bb0 fix: multiple batteries support in the battery module (#669)
Closes #656
2019-12-03 11:48:50 -05:00
Thomas O'Donnell edc62f4518 refactor: Refactor modules to use the exec_cmd util (#676)
Have refactored the golang, java, nodejs, python, ruby and username
modules to use the new `exec_cmd` util.
2019-12-02 17:42:55 -05:00
Luca Greco 337f213753 feat: Add the hg_branch module (#569) 2019-12-02 17:37:18 -05:00
Raidou 2a75a18eb1 fix: Fix panic when using fish-style pwd with unicode symbols (#672) 2019-11-29 00:02:22 -05:00
Thomas O'Donnell f5bbaef82b chore: Add a helper function for executing commands (#660) 2019-11-27 17:03:08 -05:00