1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-06-11 21:02:20 +00:00
Commit Graph

562 Commits

Author SHA1 Message Date
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
Mat Jones
146976351e
fix(fish): add proper vi mode detection for fish shell (#3839)
* add proper vi mode detection for fish shell

* update tests

* fix test

* update config-schema.json

* update docs

* add warning about symbols only supported in fish
2022-06-04 12:41:24 +02:00
Tobi
df5c2d8836
feat(kubernetes): add user alias (#4008)
* add kubernetes user alias (fixes #3870)

* update config schema

* sort config property alphabetically

* Update README.md

* add test-case for non-matching alias
2022-05-30 20:09:53 +02:00
David Knaack
2039931d85
refactor(memory_usage): replace sys-info with systemstat (#4028) 2022-05-29 16:47:06 +02:00
Stefano Baghino
3fe6cc023c
feat: Add support for Daml (#4004) 2022-05-26 16:42:31 +02:00
David Knaack
0ae61c7758
chore(clippy): fix new lints (#4002) 2022-05-23 06:58:27 -04:00
Arya Adarsha Gautam
9ebfce1e36
feat(go): check for go.work file to show Go module in prompt (#3968)
* check for go.work file to display go version

* add test to check for go.work file

* update docs to include go.work file

* chore(dprint): fmt & upgrade plugins (#3969)

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2022-05-07 08:04:37 +02:00
Kevin Song
393d62c726
feat(rust): Display toolchain names (#3414)
This is an actualization of PR #559 as originally envisioned by qryxip.

Adds the ability to display toolchain versions, either as extracted from
environment/settings files or by getting the host triple. As part of
this, several other major changes were needed:
- Many of the smaller functions within the code have been fused, moved,
  or dropped.
- The Rustup environmental info is now initialized lazily using
  OnceCells. This will hopefully lead to a performance increase.
- New configuration variables (`toolchain` and `numver`) have been added
  to allow finer-grained configuration.
- Override information is no longer read from `rustup` output. Instead,
  it is parsed from the same files that rustup would use to determine
  this info.

Co-authored-by: qryxip <qryxip@gmail.com>

Co-authored-by: qryxip <qryxip@gmail.com>
2022-05-04 15:40:44 -05:00
Thanapat Chotipun
2bf30dc89f
feat(hostname): add ssh_symbol for ssh connections (#3806) 2022-05-04 15:30:16 +02:00
David Knaack
c768d039d1
test(custom): increase timeout in timeout test (#3960) 2022-05-02 21:01:43 -05:00
Tom Fleet
1b938fd484
feat(package): Extract package version from PEP 621 compliant pyproject.toml (#3950)
* feat(package): Extract package version from PEP621 pyproject.toml

* Update docs explaining PEP 621 package version

* Only read pyproject.toml once

* Simplify get_pep621_version

* Handle version formatting in get_pyproject_version
2022-05-02 18:44:01 +02:00
David Knaack
bd7957f01c
fix(git_branch): correct variable name for remote branch (#3897) 2022-04-26 20:02:01 +02:00
David Knaack
d4d84a592c
build: bump nix from 0.23.1 to 0.24.1 (#3925)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-26 09:14:51 -04:00
Thomas O'Donnell
2a650bfd14
perf(package): only try to read files that exist (#3904)
* perf(package): only try to read files that exist

Have refactored the package module to improve performance. Before this
change the module would try to open every single file that could contain
some package information until it found a valid version. This resulted
in a lot of unneeded disk IO. Have added a new fn, `read_file_from_pwd`
that uses the current context to check if that file already exists and
fast failing if it doesn't. From my local testing this speeds up the
package module from taking ~1ms to ~50µs in an empty directory.

* refactor: move read_file_from_pwd to context

* refactor(haskell): use read_files_from_pwd

* refactor(nodejs): use read_files_from_pwd
2022-04-25 16:18:01 +02:00
David Knaack
6c2b51a621
refactor(windows): replace winapi with windows (#3690) 2022-04-21 20:59:00 +02:00
Fábio Antunes
6def45b751
chore(aws): adds space to the duration variable (#3872) 2022-04-21 20:58:06 +02:00
David Knaack
ff490b67ad
test(git): enable fsync for git operations (#3889)
* test(git): enable `fsync` for git operations

* add comment
2022-04-20 18:39:24 +01:00
Yt
efaab49e47
feat(cmd_duration): make notify feature optional (compat with nix darwin) (#3855) 2022-04-12 12:07:36 +02:00
David Knaack
28da85061b
refactor(custom): various improvements (#3829) 2022-04-09 11:32:45 -04:00
David Knaack
21dfe7f2fc
refactor(aws): improve parsing of config files (#3842) 2022-04-08 06:56:14 +02:00
David Knaack
4b7275efc4
refactor(gcloud): improve parsing of config files (#3844) 2022-04-08 06:56:02 +02:00
Thomas Kintscher
230e85be37
fix(docker_context): ignore the "default" context (#3803) (#3804)
Co-authored-by: Thomas Kintscher <thomas@flowciety.de>
2022-04-07 07:54:50 +02:00
t-mangoe
441ebb39b9
fix(directory): enable repo_root_style when truncation_length is zero. (#3536)
* Update merge-dependabot.yml

* Revert "Update merge-dependabot.yml"

This reverts commit b13a329660cc1f6fe57b29bc488764181a2ba66c.

* Update merge-dependabot.yml

* Revert "Update merge-dependabot.yml"

This reverts commit b13a329660cc1f6fe57b29bc488764181a2ba66c.

* fix(directory): enable repo_root_style when truncation_length is zero.

* run dprint fmt

* fix README

* fix README

* revert README.md
2022-04-04 21:13:29 +02:00
oyanoya
3014284e95
feat(spack): Add Spack module (#3639)
* feat/add readme + presets

* feat/add spack module

* feat/add spack config

* feat/spack to handle

* feat/add spack to modules and root

* fix/readme formattign

* fix/readme typo

* fix/readme formatting

* feat/replace module_config_derive with serde

* feat/add macros to generate schema + schema
2022-04-03 15:33:14 +02:00
Rashil Gandhi
c89c13038a
feat(username): Detect Admin access in Windows (#2791)
* Detect Admin access in Windows

* Update username doc

* Do not run tests when elevated

* Add comment

* Try fixing tests

* use deelevate crate

* simplify cfg

* Update src/modules/username.rs

Fix rookie mistake

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

* handle errors

* fix lockfile error

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2022-04-01 17:47:49 +02:00
David Knaack
2d4b183fce
refactor: replace module_config_derive with serde (#3786)
* refactor: replace module_config_derive with serde

Changes include:
* Removing `starship_module_config_derive` and replacing it with `serde::Deserialize`
* Removing `RootModuleConfig::load_config`. While potentially useful, it was only used in tests. And it would require something like `serde::DeserializeSeed` which is not derived by serde.
* Merging `RootModuleConfig` into `ModuleConfig`
* Implementing a `ValueDeserializer` that holds a reference to a `toml::Value` in `serde_utils.rs`
* Deserialization errors (invalid type) are now logged and include the current key and the struct names
* Unknown keys are now considered an error. "Did you mean?"-messages are still possible

* fix typo

Co-authored-by: Matan Kushner <hello@matchai.dev>

Co-authored-by: Matan Kushner <hello@matchai.dev>
2022-03-26 10:42:19 +01:00
Alex Douze
e04f126a10
feat(aws): add option to force AWS display (#3720)
* add option to force AWS display

Even if no credentials or credential_process have been setup

* change README wording

* Include sso_start_url in the description

* Change option name to force_display
2022-03-25 22:30:36 +01:00
David Cantrell
0863146f07
feat: Add a module for C projects (#3631)
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2022-03-25 00:10:19 -04:00
ksqsf
72fec559c5
feat(haskell): Add Haskell module (#3587)
* feat(haskell): add haskell module and implement ghc version detection

* feat(haskell): implement stack resolver version detection

* fix(haskell): handle more complex resolvers

* fix(haskell): rename resolver_version to snapshot

* fix(haskell): change default color to bold purple

* feat(haskell): add tests

* fix(haskell): format

* fix(haskell): replace incorrect `or` with `or_else`

* fix(haskell): use write_all instead of write

* fix(haskell): λ as Haskell icon by default

* fix(haskell): fix tests and add a real stack.yaml testcase

* fix(haskell): make clippy happy
2022-03-18 07:45:51 +01:00
David Knaack
d7308203a9
fix(aws): accept sso credentials (#3718) 2022-03-16 23:14:52 +01:00
IsaacHorvath
bae16b525d
feat(git_branch): add 'ignore_branches' option (#3753)
* git-branch: Add option 'ignore_branches'

* git-branch: add 'ignore_branches' test

* git-branch: comma-separated to toml array

* git-branch: update ignore_branches test

* git_branch: fix formatting

* git-branch: fix formatting again

* Initialize ignore_branches as empty

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

* Use iter().any and branch_name as suggested

* Fix formatting

Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
2022-03-16 21:41:49 +01:00
Izhak Jakov
86953272a7
fix(status): Make status module work even when the status is 0 (#3750)
Co-authored-by: Izhak Jakov <jizhak@ca.ibm.com>
2022-03-16 16:05:13 -04:00
kuno
59622bc41b
fix(aws): Make AWS_REGION orverrides AWS_DEFAULT_REGION (#3619) (#3733)
* fix(aws): Make AWS_REGION orverrides AWS_DEFAULT_REGION (#3619)

* fix(aws): Align the coding style of region and profile env var (#3619)
2022-03-14 22:49:23 +01:00
Luc Perkins
16f62d7904
feat(buf): Add Buf module (#3661)
* Add initial Buf module logic

* Add tests for Buf module

* Add initial draft of docs

* cargo fmt

* Fix config table formatting

* Run dprint

* Run clippy --fix

* cargo fmt

* Add space after emoji

* Fix spacing discrepancy

* Switch to Nerd Font from emoji

* Fix up docs merge conflict handling

Co-authored-by: Matan Kushner <hello@matchai.dev>
2022-03-12 12:10:23 +01:00
Anders Eurenius Runvald
ac8c2fe024
feat(aws): Add profile aliases (#3699)
* Rename m.aws.alias_region to alias_name

* Add aws profile aliases

* Document aws.profile_aliases, with examples

* Add tests for new aws.profile_aliases feature

* Tidy alias_handling a bit
2022-03-12 12:08:33 +01:00
Denis Cornehl
076a9e6b8e
fix(rust): overrides should only check full segments (#3668)
Fixes a bug in the Rust module where overrides would match
against both full path components as well as partial ones
(e.g. "/etc/passwd" would be considered a prefix of 
"/etc/passwd_new") on Windows.

Solution is to convert back to a PathBuf after lossy conversion
so that Path::starts_with is used instead of str::starts_with.
2022-03-08 13:58:58 -06:00
David Knaack
d2366ddb9c
perf(git_status): add option to use windows starship to render in wsl (#2146) 2022-03-06 21:18:23 -06:00
David Knaack
1745392909
refactor: fix new clippy/compiler warnings (#3656) 2022-02-24 23:31:01 -05:00