1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-15 17:47:13 +00:00
Commit Graph

698 Commits

Author SHA1 Message Date
Mika Fischer
b21904c9d3
fix: Store $? and $LASTEXITCODE first in PowerShell (#3316)
These need to be stored before calling any PowerShell function or executable.
Otherwise the values will be overwritten and cannot be properly restored
or passed to starship.

Fixes: #3315
2021-12-13 10:15:02 +01:00
David Knaack
b4a14e3a80
test(hostname): fix trim_at test with unicode hostname (#3295) 2021-12-09 22:15:25 +01:00
Mikkel Mork Hegnhoj
365b295433
feat(azure): Azure module (#3275)
* Azure module

* make Semantic PR bot happy

* Responding to review

* Changing severity of logging event
2021-12-06 23:01:33 +01:00
arcnmx
e3a88a6ec1
fix(git_branch): more robust handling of .git (#3290) 2021-12-03 15:15:31 -05:00
pejax
1109fd6997
feat: Add package version detection for sbt projects (#3274) 2021-12-03 01:56:06 -05:00
David Knaack
77182a9a22
chore(clippy): fix new clippy lints (#3294) 2021-12-03 00:54:56 -06:00
David Knaack
e18c61cd68
fix(directory): improve truncation detection (#3266) 2021-11-26 13:07:28 +01:00
Ikko Ashimine
337154ad35
chore: fix typo in docker_context.rs (#3265)
enviroment -> environment
2021-11-23 17:56:16 +01:00
Gabriel Victor
779e53cd66
feat(module): Add sudo module (#3135)
* add feature - sudo module

* add sudo module identifiers and entry point

* fix test test_sudo_not_cached

* add test test_sudo_cached

* add `allow_windows` and `binary` options

* rustfmt sudo_x_cached and rmv them on windows

* add false `allow_windows` block windows test

* add `doas` cached/not_cached tests

* better description in `starship explain`

* fix `test_doas_cached` with `-n` flag

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

* rmv `binary` alternatives and their tests

* fix symbol and update config/README

* fix all mocks to use `sudo -n true`

* fix expected output in `test_sudo_cached`

* proper checking for blocked sudo

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

* add `allow_windows = true` to non-windows tests

* allow sudo_* tests to run on windows + fix parsed

* rustfmt `blocks_windows` test

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2021-11-15 06:46:13 +01:00
Matthew Donoughe
c3e33ea1c7
feat: print-config subset of config (#3179)
* feat: print-config subset of config

* only print format helpers with format config

* improve help text

* also change argument name
2021-11-15 06:45:19 +01:00
David Knaack
6068bab872
build: bump toml_edit from 0.6.0 to 0.8.0 (#3225)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-11 05:58:47 -05:00
cbolgiano
8d80d2ef06
feat(python): Show value of PYENV_VERSION when present (#3144)
* 2872: Show value of PYENV_VERSION when present

* 2872: Run cargo fmt
2021-11-09 21:55:53 +01:00
Derek Wilson
8ae6548dc0
fix: save pipestatus in fish init functions (#3160) 2021-11-09 14:27:30 -05:00
t-mangoe
b07abc990e
feat: style git repo root (#2010) 2021-11-09 14:12:40 -05:00
Matan Kushner
9df7c7d256
fix: replace battery with starship-battery (#3213) 2021-11-09 06:35:45 -05:00
Aaron Kollasch
d1ce352528
feat(ruby): Add environment variable checks to ruby module (#3206)
* feat(ruby): Add environment variable checks to ruby module

* docs(ruby): describe version detection method
2021-11-08 21:21:09 +01:00
David Knaack
4ee1bdc2a4
fix(memory_usage): remove duplicate % handling (#3193) 2021-11-01 22:19:27 +01:00
Fred Cox
c1f2d345aa
fix(escaping): move escaping to individual variables (#3107) 2021-11-01 22:18:45 +01:00
David Knaack
6e6ab9f212
fix: ignore scan_dir timeout in tests (#3184) 2021-10-30 10:52:48 +02:00
David Knaack
c4439531d3
fix: only print root level config logs a single time (#3132) 2021-10-27 15:13:17 +02:00
Thomas O'Donnell
39e7b78cb2
feat: also read from DOCKER_MACHINE_NAME (#3175)
This adds support to also read the context from `DOCKER_MACHINE_NAME`
since it is a bit more user friendly.
2021-10-25 07:54:39 +02:00
David Knaack
48fca507f5
fix(configure): preserve formatting and comments (#3152)
* fix(configure): preserve formatting and comments

* preserve formatting in changed line

* add tests
2021-10-23 10:15:46 +02:00
Thomas O'Donnell
c682329bd0
fix: Modules not working in fish RPROMPT (#3146)
This should fix some modules not working correctly in the fish
`RPROMPT`. I have done this the very naive way by simply duplicating the
code that is currently in the `fish_prompt` function to avoid having to
change the scope of any of the variables (currently all local).
2021-10-22 18:54:36 +02:00
Ikko Ashimine
425af13026
docs: fix typo in starship.ps1 (#3173)
preceeding -> preceding
2021-10-22 12:14:43 -04:00
Aman Kumar Sinha
eb203ebe95
feat(fill): add disabled option for fill module (#3158)
* add disabled option for fill module

* update tests

* update docs
2021-10-21 14:27:32 +02:00
vypxl
614e0e2763
feat(package): Add support for crystal shards (#3147)
* add crystal shard (package) version support

* module package: crystal shard version: read shard.yml directly

* module package: add test for crystal shard version

* format src/modules/package.rs

* use yaml-rust instead of serde-yaml

* document shards package support

* Update docs/config/README.md

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

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2021-10-13 07:42:55 +02:00
Harry Sarson
c20a998d15
fix: allow unset KEYMAP and STARSHIP_DURATION in zsh (#3124)
* allow unset KEYMAP and STARSHIP_DURATION in zsh

which prevents errors if a user has `set -u` on in there terminal.

* fix: allow unset KEYMAP and STARSHIP_DURATION in zsh
2021-10-09 19:13:49 +02:00
Ajeet D'Souza
671365b505
fix(init): Use stderr for init error message (#3131)
* Use stderr for init error message

* Add a dummy commit to appease the Semantic PR bot

Co-authored-by: Kevin Song <chips@ksong.dev>
2021-10-09 08:35:17 +02:00
Michael J. Ryan
94d7de7f4e
feat: Add starship_precmd_user_func support for PowerShell. (#3115) 2021-10-07 20:08:31 +02:00
Rashil Gandhi
6464693165
fix(fill): Add terminal-width argument to explicitly define terminal's width (#3090)
Add `terminal-width` argument to explicitly define terminal's width
Update pwsh,bash,zsh,fish init scripts with `terminal-width` argument

Co-authored-by: Kevin Song <chips@ksong.dev>
Co-authored-by: Kevin Song <4605384+chipbuster@users.noreply.github.com>
2021-10-06 16:36:28 -05:00
Ian Wahbe
dfb1208787
feat: Add pulumi module (#3055) 2021-10-05 18:27:25 -05:00
Kevin Song
190743e4e0
fix: pipestatus quoting on Zsh/Bash (#3088)
Changes the parsing for pipestatus to allow for multiple arguments, a
single argument of space-separated values, or any mix of the two. All
inputs are flattened into a single array where no elements have spaces
in them.

Changes the initscripts to no longer fail when an empty pipestatus
is passed as an argument by quoting and changing expansions.
2021-10-05 18:19:55 -05:00
Aman Kumar Sinha
f8e81a1622
feat(shell): Add style config for shell module (#3108)
* add style config for shell module

* update shell docs

* fix formatting

* update tests
2021-10-04 19:46:33 +02:00
Thomas O'Donnell
e74f428615
fix(terraform): Improve module triggers (#3113)
Have updated which extentions trigger the terraform module, to remove
the `hcl` since this gives false positives as it is used by other
Hashicorp products and add the `tfstate` and `tfplan` which are more
accurate indicators.
2021-10-04 18:08:58 +02:00
David Knaack
8f82457c2d
feat(explain): allow specifying prompt arguments in explain and timings subcommands (#3042) 2021-10-03 16:08:18 +02:00
David Knaack
68694029c4
fix(status): Don't show status if all exit codes are 0 (#3109)
* fix(status): Don't show status if all exit codes are 0

* fix tests
2021-10-03 16:03:09 +02:00
David Knaack
ab25bc82c5
fix(windows): make powershell init work on windows 8 again (#3067) 2021-09-25 14:07:23 -05:00
David Knaack
b22c54fccc
refactor: replace term_size with terminal_size (#3087) 2021-09-23 17:52:51 +02:00
David Knaack
20af85f0a8
docs(modules): add missing module descriptions (#3081) 2021-09-17 16:16:02 -05:00
David Knaack
75feef62cb
fix(print-config): add missing format_right to FullConfig (#3063) 2021-09-15 17:58:58 +02:00
Tom Most
bbb8d3c357
fix(package): Ignore setup.cfg attr: and file: (#3054)
The setup.cfg version key allows "attr:" and "file:" directives to load
the actual value from elsewhere [1]. Treat these as if no version was
found, since the text of the directive isn't the version number we're
after.

[1]: https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html#specifying-values
2021-09-14 12:17:05 -05:00
Matthew (Matt) Jeffryes
5d0a38aca3
feat: Add a fill module to pad out the line (#3029) 2021-09-12 19:59:15 -04:00
David Knaack
5ac7ad741f
fix(zsh): always escape percent character (#3058) 2021-09-12 19:55:46 -04:00
Matthew (Matt) Jeffryes
e64a99262e
fix(zsh init script): avoid adding preexec commands twice (#3049) 2021-09-09 16:19:01 -04:00
Matthew (Matt) Jeffryes
79585dcb17
feat: Add support for RPROMPT (right prompt) (#3026)
Adds support for zsh, fish, and elvish.

Co-authored-by: Matan Kushner <hello@matchai.dev>
2021-09-08 15:45:27 -04:00
Bill
08b5cd0862
feat(cobol): added COBOL module (#2994)
* feat: added COBOL module

* slight README fix

* added command faking for COBOL

* updated COBOL symbol to better suit language

Co-authored-by: Bill Risher <bill@encephaloinvestments.com>
2021-09-07 09:59:14 -05:00
Alexandru Macovei
7388c5a79e
fix(config): inherit stdin/stdout/stderr instead of piping to fix editor invocation (#3032)
Due to the introduction of utils::create_command, commands now have
stdin set to null, and stdout and stderr set to piped.
This prevents console editors from working when invoked via
starship config
2021-09-03 21:56:43 -04:00
Marcin Puc
6598275e15
refactor: simplify iterator usage (#3017) 2021-09-02 11:48:29 -04:00
Thomas O'Donnell
3933553486
fix(status): Showing exit code 0 with pipelines (#3028)
Have fixed a bug there the status module was showing when the exit code
was 0.
2021-09-02 00:18:44 +02:00
David Knaack
c6e5e6fbed
feat(print-config): list expanded $all variable (#2932)
* feat(print-config): list expanded `$all` variable

* handle $custom

* improve comment
2021-09-01 20:32:32 +02:00