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

871 Commits

Author SHA1 Message Date
Dennis Waitong Lam
7341607c29
fix(buf): broken icon on windows 10 (#4689)
Closes https://github.com/starship/starship/issues/4608
2022-12-09 18:41:59 +09:00
AlexHaxe
2766c78749
feat: add Haxe support (#4395)
* Add Haxe support

* avoid unwrap

* fix doc formatting

* removed extra newline

* fixed formatter and linter issues

* fixed config file

* better version of detecting contents of .haxerc

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

* removed openfl related defaults from detect_files

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

* fixed formatting

* reworked reading .haxerc with fallback to haxe --version

* fixed formatting

* added fallback to executable for dev paths in .haxerc

* fixed linter issue

* added support for Windows paths

* use or_else

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

* use shorter version with `?`

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

* simplified regex check

removed check for "null" string

* fixed format

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2022-12-04 18:28:49 +01:00
David Knaack
ef83e7a092
fix(pwsh): fix error log display on older versions of pwsh (#4650) 2022-12-02 14:17:57 -06:00
nibon7
a7abc0f450
feat(nu): enable right prompt (#4490)
Closes #3982
2022-12-02 12:40:36 +01:00
cgzones
ea6249b524
feat(directory): add before_repo_root_style (#4595) 2022-12-01 23:09:11 +01:00
cgzones
ddd54e9b20
feat(localip): use reserved remote address (#4648)
Instead of the remote address of 8.8.8.8 (Google DNS) in the crate
local_ipaddress use a reserved IPv4 address, that should never be
assigned.
Also forward the underlying error on failure.

Supersedes: #4614
2022-12-01 19:51:04 +01:00
Gabriel Victor
0427863168
fix: don't attempt to display cmd_duration notification if in TTY (#4535)
Disables the display of notifications from cmd_duration on Linux if
none of DISPLAY, WAYLAND_DISPLAY, or MIR_SOCKET are set.
This prevents starship from attempting to create notifications in tty 
environments, which was previously causing hangs.
2022-11-28 07:23:03 -06:00
Chris Rose
c8ac8777a5
fix(aws): enable when using .aws/credentials (#4604) 2022-11-27 15:06:05 +01:00
Ryan Sabatini
6e15c00238
feat(azure): add username to azure module config (#4323)
* add username to azure module config

* add username to azure module config

* formatting with cargo fmt

* Handle parse failure on azureProfile.json

allow program to procede if unable to parse azure profile due to missing
keys from the JSON structure.
remove unused keys from struct

Code cleanup with suggestions from PR maintainer

Cargo clippy fixes
2022-11-27 15:02:23 +01:00
David Knaack
8bb9038431
feat(bug-report): ask for confirmation before opening issue (#4543)
* feat(bug-report): ask for confirmation before opening issue

* Apply suggestions from code review

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

Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
2022-11-25 17:44:25 +01:00
David Knaack
ac37792c19
feat(git_commit): support showing lightweight tags (#4632) 2022-11-22 10:15:31 +01:00
Scott Palmer
a9eb65ef35
fix(java): Improved regex for Java version (starship#4610) (#4616)
* fix(java): Improved regex for Java version (starship#4610)

* fix(java): Fixed tests and tweaked regex to accomodate Eclipse OpenJ9 (starship#4610)
2022-11-20 18:28:39 +01:00
Brahm Lower
1b03ef21f3
fix(config): unrecognized config properties don't cause config error (#4547)
* Fix #4481, config does not error when unrecognized properties are present

* cleanup: use stuct update syntax to improve readability

from review feedback

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

* cleanup: renamed ValueDeserializer func w/ better name

* cleanup: added test to cover unknown key retry condition

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2022-11-20 18:27:48 +01:00
David Knaack
b47a4fe514
fix(container): avoid detecting WSL as a systemd-container (#4593) 2022-11-15 11:14:52 +01:00
Kevin Menard
cc2c8c4a54
feat(init): Use which-rs to resolve starship path
This patch uses the which crate to resolve the starship path, replacing the
current_exe() mechanism.

Co-authored-by: Kevin Song <chips@ksong.dev>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
Co-authored-by: Dario Vladović <d.vladimyr@gmail.com>
2022-11-13 21:28:29 -06:00
David Knaack
d86e1c1d1c
build(deps): update rust crate chrono to 0.4.23 (#4599)
* build(deps): update rust crate chrono to 0.4.23

* chore: remove chrono deprecations

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-13 21:23:30 -06:00
Sebastian Thiel
a53f681e3c
build(deps): upgrade to git-repository v0.27 (#4588)
* upgrade to git-repository v0.27

* thanks clippy
2022-11-12 17:07:49 +01:00
Loong Wang
fd165b96cc
fix(git): check tag_disabled option (#4527)
* fix(git): check `tag_disabled` option

* Check in `map` and test fixes
2022-11-06 22:43:50 +01:00
exincore
3109943822
feat: Add operating system module (#4109)
* docs(os): Add os module documentation

* docs(os): Add os to Default Prompt Format

* chore(os): Update config file schema

* feat(os): Add os entries and declarations

* feat(os): Add os module and config

* fix(os): Obey config.disabled

* feat(os): make variables 'Unknown'-aware

refactor(os): calculate variables in dedicated functions

* test(os): Add os module tests

* feat(os): make 'name' variable less 'Unknown'-aware

* docs(os): Add Preset configurations

docs(os): Use emoji as default

* feat(os): Use emoji as default

test(os): Use emoji as default

* fix(os): Add spaces after emoji symbols

* chore(os): Update config schema

* feat(os): Remove `bitness` variable

docs(os): Remove `bitness` variable

test(os): Remove `bitness` test

* feat(os): Add Cargo.toml upgrade caution for os_info

* refactor(os): Clarify get_symbol function

* docs(os): Mention supported operating systems and feature requests

* docs(os): Mention os_info inacurracy

* test(os): Remove `bitness` leftovers

* refactor(os): use nu_ansi_term

* refactor(os): add cfg_attr(schemars(deny_unknown_fields))

* chore(os): update config schema

* docs(os): expose details block

* feat(os): add garuda linux

* chore(os): update config schema

* feat(os): add case insensitivity

* feat(os): add symbols `IndexMap` use `os_info::Type` instead of `String`

* test(os): add clippy warn on new os_info::Type case

* leave missing case to test github tests

* test(os): re-add missing test case

* style(os): fix formatting

* docs(os): update to match os_info::Type serialization

- docs(os): add missing garuda to config

- test(os): mention docs updates in warn_on_os_info_update
2022-11-06 22:37:58 +01:00
David Knaack
6e38683c89
chore: fix new clippy lints (#4557) 2022-11-05 12:40:46 +01:00
Felix H
14ee81b9c3
feat(package): added showing gradle version based on the gradle.properties file (#4432)
* feat: added showing gradle version based on the gradle.properties file

* fix: wouldn't return version

* fix: forgot to remove "version=" from returned version"

* fix: ran rustfmt

* fix: test now actually tests for something

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

* fix: the regex actually makes sense now

* fix: complete refactor of control flow

* Delete flake.nix

* changed order in which files are processed

Co-authored-by: BattleCh1cken <BattleCh1cken@Larkov.de>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2022-10-30 16:43:32 +01:00
David Knaack
d1bc982a37
chore: bump msrv to 1.64 (#4542)
* chore: bump msrv to 1.64

* clippy fix
2022-10-30 11:17:54 +01:00
Thierry Delafontaine
d4bcc519e6
feat(guix_shell): Initial implementation (#4397)
* feat(guix_shell): Initial implementation (#3999)

* fix(guix_shell): Change guix nerd font icon to water buffalo emoji

* fix(guix_shell): Added guix_shell entries in preset files

* fix(guix_shell): Moved guix_shell config docs in to the correct place (alphabetically)
2022-10-25 07:44:04 +02:00
Verdayne Graham
cdf0d12937
refactor(nu): simplify getting term width (#4503)
refactor(init,nu): simplify getting term width
2022-10-22 14:17:33 +02:00
Liang Yun Gong
5a2c85d078
feat(aws): add a fallback for expiration key (#4455)
* feat(aws): add a fallback for `expiration`

* fix(aws): intermittent test failures

- extend the time range from `-2s,0s` to `-5s,+2s`

* fix: `docs/config/README.md` readability

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

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2022-10-15 18:16:07 +02:00
AppleTheGolden
865e68da3a
feat: Open Policy Agent module (#1740) (#4441)
* feat: Open Policy Agent module (#1740)

* Format documentation

* Fix typo, `ropa` -> `rego`

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

* Update presets for OPA module

* Add extra space to OPA module symbol

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2022-10-15 18:15:33 +02:00
David Knaack
186d99e623
fix(status): replace multiply with cross mark emoji (#4461) 2022-10-15 14:16:39 +02:00
nibon7
49995301ce
fix(nu): remove -c parameter from term size (#4477)
The -c parameter has been removed through nushell/nushell#6651
2022-10-15 14:16:14 +02:00
Jamie
355800f814
feat(module): Add a meson devenv indicator (#4389)
* feat(module): Add a meson devenv indicator

Adds a Meson Developer Environment indicator, if the MESON_DEVENV
variable is set. Inside a `meson devenv`, the prompt will include the
current Meson project name

This also contains a new Truncate utility function, which may be adapted for other modules in the future

* docs: Add Meson to presets
2022-10-11 18:02:46 +02:00
wilhelm
3d452367bd
fix(buf): fix spacing & harmonize docs with actual configuration (#4450)
* fix(buf): add whitespace after version string

* fix: update config schema

* fix: config version and bison emoji

* fix: update documentation format

* fix: dprint

* fix: config schema
2022-10-07 22:07:30 +02:00
Aaron Kollasch
6e35dfa85a
feat(status): Support formatting of pipestatus separator (#4264)
* Support formatting of pipestatus separator

* Format pipestatus separator with each pipestatus

* Add third exit code to pipestatus test

* Clean up pipestatus mapping

* Add comment that was removed
2022-10-07 11:44:14 +02:00
Robert Edwards
227ec32d9d
perf(directory): Skip repo resolution if unused by directory config (#4401)
Skip repo resolution if its not used by directory config
2022-10-06 09:33:31 +02:00
David Knaack
f3fc5efa15
build: bump windows from 0.39.0 to 0.42.0 (#4388)
* build: bump windows from 0.39.0 to 0.41.0

Bumps [windows](https://github.com/microsoft/windows-rs) from 0.39.0 to 0.41.0.
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/compare/0.39.0...0.41.0)

---
updated-dependencies:
- dependency-name: windows
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix `AccessCheck` call

* build(dep): bump windows to 0.42.0

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-03 12:01:40 +02:00
ccQpein
801fbab720
fix(directory): don't strip duplicate directory names twice (#4295)
* Fix directory issue in a special case

* add None test
2022-09-30 11:03:33 +02:00
David Knaack
c5bffb5620
build: bump clap from v3 to v4 (#4413)
* build: bump clap from v3 to v4

* bump
2022-09-29 16:51:56 -05:00
Anomalocaridid
d93074d056
feat: add user-defined color palette (#4209)
* docs(config): add color palette to docs

* feat: add user-defined color palette

* fix: update config schema

* refactor: apply suggestions from code review

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

* fix: update new test

* feat: add support for multiple palettes

* docs(config): update docs for multiple color palettes

* docs(config): fix formatting

* test: test overriding a predefined color with itself

* docs: mention palettes cannot reference themselves

* refactor: warn when using a nonexistent palette

* test: test retrieving a nonexistent color palette

* fix: fix issues with palette log messages

* fix: update config schema

* fix: skip serializing palette if none

* refactor: change nonexistent palette message to warning

* fix: update config schema

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2022-09-27 23:08:52 +02:00
David Knaack
c69fe4a644
build: bump git-repository from 0.23.1 to 0.24.0 (#4393)
* build: bump git-repository from 0.23.1 to 0.24.0

Bumps [git-repository](https://github.com/Byron/gitoxide) from 0.23.1 to 0.24.0.
- [Release notes](https://github.com/Byron/gitoxide/releases)
- [Changelog](https://github.com/Byron/gitoxide/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Byron/gitoxide/compare/git-repository-v0.23.1...git-repository-v0.24.0)

---
updated-dependencies:
- dependency-name: git-repository
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* add new member to `git::permissions::Config`

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-22 16:34:50 +02:00
David Knaack
b5d3d8fcf3
feat(schema): deny unknown keys (#4270) 2022-09-09 14:59:38 +02:00
Rashil Gandhi
06281c268d
feat(fish): Enable left and right transience (#4204)
* feat(fish): Enable left and right transience

* Update README.md

* Mention limitation
2022-09-09 14:56:33 +02:00
David Knaack
fd5539796f
fix(pwsh): avoid potential deadlock in init (#4335) 2022-09-08 23:18:50 +02:00
David Knaack
6ac5df904b
refactor: replace ansi_term with nu_ansi_term (#4339) 2022-09-04 18:44:54 +02:00
David Knaack
c40f0e7722
build: bump quick-xml from 0.23.0 to 0.24.0 (#4322)
* build: bump quick-xml from 0.23.0 to 0.24.0

Bumps [quick-xml](https://github.com/tafia/quick-xml) from 0.23.0 to 0.24.0.
- [Release notes](https://github.com/tafia/quick-xml/releases)
- [Changelog](https://github.com/tafia/quick-xml/blob/master/Changelog.md)
- [Commits](https://github.com/tafia/quick-xml/compare/v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: quick-xml
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* switch to updated apis

* run cargo update

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-30 22:36:44 +02:00
Sebastian Thiel
dd918296e4
build: gitoxide upgrade (#4319)
adjustments to upgrade to gitoxide v0.22.1
2022-08-27 14:24:18 +02:00
David Knaack
5984f0829e
perf(git_commit): only use exact match for tag by default (#4281) 2022-08-19 08:27:41 +02:00
David Knaack
98089bf005
chore(git): improve logging (#4273) 2022-08-18 07:25:11 +01:00
Sebastian Thiel
f52ae552d3
fix(git): upgrade gitoxide to v0.21 (#4277)
* upgrade `gitoxide` to v0.21

This release comes with lenient configuration handling by default,
allowing to open repositories even their configuration values are
invalid (even for git), as long as there are viable defaults.

Furthermore this release adds the ability to open submodule repsitories.

Fixes https://github.com/starship/starship/issues/4266 and
fixes https://github.com/starship/starship/issues/4272

* Assure an object cache is set to speed up `commit.describe()`

Related to https://github.com/starship/starship/issues/4275 bringing
performance to spitting distance compared to git.
2022-08-18 07:22:51 +01:00
David Knaack
1390036882
fix(aws): support official AWS_SHARED_CREDENTIALS_FILE variable (#4242)
* fix(aws): use AWS_SHARED_CREDENTIALS_FILE instead

Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com>

* fix tests & keep support for older variant

Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com>
Co-authored-by: Ismayil Mirzali <ismayilmirzeli@gmail.com>
2022-08-11 07:48:22 +02:00
David Knaack
ac55a01d0f
feat(git): replace git2 with git-repository (#3883) 2022-08-08 22:33:00 -04:00
Artyom Belousov
c8a5adb412
feat: Add starship preset command (#4112)
* Add starship preset command

* Use ValueEnum for preset command

* Generate ValueEnum struct in build.rs

* Use absolute paths and refactor codegen

* Use dunce to canonicalize path

* Use raw string literal in include_bytes!

* Use .cloned()

* Apply fixes

* Fix path escaping

* Removed error message if stdout is unavailable

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

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2022-08-02 11:51:15 +02:00
David Knaack
85692d1bf6
feat: add bun module (#4187) 2022-08-01 12:59:36 +02:00