1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-09-22 02:39:01 +00:00
Commit Graph

854 Commits

Author SHA1 Message Date
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
Davin K. Tanabe
aaab920f88
feat: Add support for blink, hidden, and strikethrough styles. (#4138)
Add support for blink, hidden, and strikethrough styles.
2022-07-31 16:30:34 +02:00
David Cantrell
dd73447329
feat: Add the ability to have some file extensions *prevent* a module from triggering (#4043)
* test that we can match a multi-part file extension such as in foo.tar.gz

* now we can match multi-part file extensions like on foo.tar.gz

* add a test that a !ext is a negative match and over-rides any positive match

* test that negative extensions that don't match any file have no effect

* fail the match if any negative extensions exist

* cargo fmt

I'm not happy with this, in particular it's made the structures of has_any_positive_extension and has_no_negative_extension look different, and the logic in is_match is harder to follow

* placate clippy

* documentation for multi-part extensions and negative extensions

* get rid of an unnecessary .to_string() and comment the necessary but weird-looking invocations of .to_string_lossy().to_string()

* tests for negative matching of files and folders

* fail the match is any negative files/folders match

* document file/folder negative matching; be less prolix

* suppress Nodejs if Deno files are present (#2627)

* Revert "suppress Nodejs if Deno files are present (#2627)"

This reverts commit c1394fd7b37bb0bf06b1449e074020a2e16bfa04.

This was a terrible way of doing this, there's got to be a better way!
2022-07-31 16:29:48 +02:00
Rashil Gandhi
6e9c013e60
feat: Enable transience for Cmd and PowerShell (#4143) 2022-07-24 21:10:40 -05:00
David Knaack
0a1235e279
feat(package): support cargo workspace versions (#4161) 2022-07-20 11:17:27 +02:00
David Knaack
d8ac940098
perf(rust): avoid calling rustup in more conditions (#4174) 2022-07-20 11:15:46 +02:00
Artyom Belousov
61438484bd
feat(status): Add pipestatus_segment_format option to status module (#4103)
Add pipestatus_segment_format
2022-07-19 15:07:50 +02:00
filip
f56955084b
build: bump path-slash from 0.1.4 to 0.2.0 (#4155)
* build: bump path-slash from 0.1.4 to 0.2.0

Bumps [path-slash](https://github.com/rhysd/path-slash) from 0.1.4 to 0.2.0.
- [Release notes](https://github.com/rhysd/path-slash/releases)
- [Changelog](https://github.com/rhysd/path-slash/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rhysd/path-slash/compare/v0.1.4...v0.2.0)

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

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

* fix errors in code after path-slash bump to 0.2.0

* fmt

* refactor contract_path to return Cow<str>

* update contract_windows_style_root_directory test

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-12 11:31:43 +02:00
Thomas O'Donnell
5c5969c50b
feat(k8s): Add folder detection to the k8s module. (#4157)
Have added configuration options to the k8s module to allow activating
the module only in directories that contains certain files or folders.
To ensure this is backwards compatible and because there are not really
any standard files or folders for Kubernetes I have set the defaults to
empty and will activate the module for all directories.
2022-07-10 11:14:54 +02:00
David Knaack
af15de93c4
perf(pulumi): allow disabling upwards discovery (#4159)
* perf(pulumi): disable upwards discovery by default

* change `search_upwards` default to `true`
2022-07-10 11:14:43 +02:00
Jan Larres
aae1ed04ba
fix(timings): count time spent on custom on 'when' command failure (#4121)
Count time spent on custom 'when' commands
2022-07-08 16:38:26 +02:00
David Knaack
eb67534ac9
chore: fix new clippy lints (#4136) 2022-06-30 16:18:29 -04:00
Kian-Meng Ang
018b077630
chore: fix typos in comments (#4122) 2022-06-28 14:19:17 -04:00
David Knaack
277a7cc740
build: bump windows from 0.37.0 to 0.38.0 (#4105)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-26 18:27:45 -04:00
Filip Sergot
1a4fac63f7
feat: add Raku module (#4048)
* feat: add Raku module

* 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>
2022-06-26 12:00:55 +02:00
Thomas O'Donnell
67619386cd
fix(character): Standadise Vim config names (#4081)
Have switched all vi/vim symbols to have the same prefix 'vim'. To
preserve backwards compatibility with existing configs I have added an
alias for the previous config name.
2022-06-18 23:23:59 +02:00
yutotnh
e7c1976528
docs: fix some typos in comments (#4069)
fix: some typos
2022-06-15 19:55:10 -05:00
David Knaack
009eb93c83
build: bump clap crates to v3.2 (#4067) 2022-06-15 23:31:12 +02:00