Commit Graph

1068 Commits

Author SHA1 Message Date
danieleades 6122516887 style: use 'Self' to refer to own type (clippy::use_self) (#6735)
---------

Co-authored-by: daniel.eades <daniel.eades@seebyte.com>
2025-06-22 15:38:27 +02:00
David Knaack ea26e25fcd chore: handle recent dependency updates & fix clippy warnings (#6773)
* build(deps): update rust crate schemars to 0.9.0

* chore: handle schemars update

* build(deps): update rust crate nix to 0.30.1

* chore(os): handle os-info update

* chore: handle clippy warnings

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-14 21:56:53 +02:00
Acid Bong e406f552f8 fix: remove double spaces in default values (#6649)
Command run: `for file in $(rg --hidden '".  "' -l); do sed -i '/".  "/s/  ",/ ",/' $file; done`
2025-06-06 23:26:34 +02:00
benjunmun ccc32e73fc fix(hg_branch): Strip extraneous newlines from hg topic. (#6766)
HG topic file, like the branch file, can end with a newline. Strip it
out the same way to avoid dumping extra newlines into the prompt.

Co-authored-by: Ben Li <bli@riorey.com>
2025-06-06 23:24:36 +02:00
Cédric Krier 5f0b31b4c8 feat: add mercurial state (#6745) 2025-06-06 23:24:16 +02:00
JunZ 7f4eb6fdae perf: Parallelize child modules for env_var|custom (#6748)
parallelize child modules for env_var|custom
2025-06-06 23:23:58 +02:00
danieleades 4eaec686b3 style: tiny refactor of the Module constructor (#6737)
Co-authored-by: daniel.eades <daniel.eades@seebyte.com>
2025-05-27 23:27:40 +02:00
raylu 44e9e56480 feat(aws): support duration for aws sso (#6614)
* feat(aws): support duration for aws sso

* don't bail if ~/.aws/credentials doesn't exist

* take clippy suggestion, fmt

* ModuleRenderer::new_with_home

* add test for sso duration

* add comments to get_credentials_duration
2025-05-27 23:27:00 +02:00
Bahex ac2359ca8a feat(nu): Add job support for nushell (#6684)
* Add job support for nushell

* Do not raise minimum supported nushell version

* Update documentation about job support on nushell
2025-05-27 23:24:39 +02:00
Pavel Zwerschke a477186e52 fix(pixi): Don't trigger pixi module by .pixi directory (#6709) 2025-05-10 21:37:07 +02:00
Morgan Courbet a98a05f1ac fix(docker_context): add compose.yml and compose.yaml to files (#6625) 2025-05-10 21:35:09 +02:00
Andrew Pantuso d24e78754a feat: added mise module (#5747) 2025-04-26 22:15:30 +02:00
Pavel Zwerschke 7e88ba9561 feat: Add support for pixi (#6335)
---------

Co-authored-by: Lucas Colley <lucas.colley8@gmail.com>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2025-04-26 22:13:57 +02:00
Siddharth Kumar Jha ed07646099 feat(c++): adding c++ module (#6570) 2025-04-26 22:12:35 +02:00
Sebastian Thiel daf8d93d27 perf: use gitoxide for git_status and git_metrics modules (#6476) 2025-04-26 22:43:41 +09:00
David Knaack 0e65c97fea build(deps): update gitoxide crates (#6670)
* build(deps): update gitoxide crates

* chore: handle gix update

* chore: fix clippy lints

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-12 11:44:44 +02:00
Junzhuo ZHOU 834bbf53e5 fix(package): fix cargo workspace version (#6626)
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2025-04-07 16:32:10 +02:00
Jeryn Aldaron Lau 8eefdb21a6 revert: Remove specialized whoami hostname function choice for windows (#6651) 2025-03-24 21:39:24 +09:00
David Knaack d245939119 fix(battery): prefer charge ratio over current capacity (#6603) 2025-03-15 09:19:07 +01:00
Alex Grover 00ce7057ef feat(nodejs): disable if bun project files detected (#6346) 2025-03-09 19:31:40 +01:00
David Knaack 2a3ca68457 refactor: switch to rust 2024 edition & handle dependency updates (#6609) 2025-03-09 19:24:45 +01:00
Jan Klass df454d5a64 feat(completions): Offer Nushell completions (#6366)
---------

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2025-03-09 19:05:50 +01:00
RoloEdits 76675559c0 feat(python): add support for python_binary arguments in config (#6523) 2025-03-09 16:46:50 +01:00
Max Niederman eb42f5ac70 feat: add network namespace module (#6449) 2025-03-09 16:45:58 +01:00
Caleb Cox bd2321a12f feat(package): support JSR package version (#6502)
---------

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2025-03-02 11:49:47 +01:00
Poliorcetics b3cb92e648 perf(ancestor-scan): preallocate and reuse a single PathBuf (#6387) 2025-02-09 23:12:26 +01:00
Ayyan Shaikh eb7d80bafa fix(fossil_metrics): Add -i flag to the fossil_metrics module's command (#6544) 2025-02-09 23:09:55 +01:00
David Knaack 43f097eae8 fix(hostname): use DNS instead of NetBIOS name on Windows (#6343) 2025-01-11 15:00:48 +01:00
David Knaack af5d139060 fix(username): avoid using whoami on android (#6342)
Closes #6340

Co-authored-by: AminurAlam <64137875+aminuralam@users.noreply.github.com>
2025-01-11 14:59:29 +01:00
David Knaack dfddd999c3 chore: handle updates for os-info, windows and shadow-rs (#6487)
* build(deps): update rust crate windows to 0.59.0

* chore: handle windows update

* chore: handle os_info update

* build(deps): update rust crate shadow-rs to 0.37.0

* chore: handle shadow-rs update

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-11 14:58:02 +01:00
David Knaack b5e865ae7d chore: fix clippy warnings for rust v1.83 & current nightly (#6413)
* chore: fix clippy warning for rust v1.83

* chore: fix clippy warning for nightly rust
2025-01-09 19:49:59 +01:00
Eduardo J. Ortega U. 6678c13c24 docs: fix typo in comment of git_commit module (#6472) 2025-01-09 19:42:59 +01:00
MK 2df521c69b feat(bun): Detect bun using new text-format lockfile (#6441)
* Support bun text-format lockfile

Bun version 1.1.39 introduced a new plaintext lockfile. Currently it is opt-in only, but it will become the default in bun version 1.2.

* update docs

* update config schema

* update tests
2024-12-29 18:20:01 +01:00
Ky 2690a329cf feat(battery): Use best match instead of first match for battery.display threshold (#6442)
Previously the selection code simply filtered for the first style found
within the config with a threshold larger than the current battery
percentage. If the config defined multiple display thresholds that were
above the battery percentage it would only select the first one that was
encountered rather than the one that was closest to the current battery
percentage.

This commit also adds a test to ensure this property is held true. The
test accomplishes this by comparing the parsing of a config with two
`battery.display` entries, one with a threshold at 100% & the other at
60%, with a mock battery set at 50% charge. This config is parsed with
the 100% threshold defined above the 60% threshold, and then again with
the 60% threshold defined above the 100% threshold. To ensure the
entries are parsed parsed correctly each entry is given a different
style, so the expected value that is compared against has the same style
as the 60% threshold entry for both test cases.


* Update src/modules/battery.rs

Use more concise chain of functions from Iterator

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

---------

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2024-12-27 11:32:13 +01:00
T0mstone e21775c694 feat(status): add {success,failure}_style options (#6269) 2024-12-27 11:30:28 +01:00
Nick Conway 45937166c8 feat(direnv): allow direnv to detect environment variables (#6196) 2024-12-27 11:25:15 +01:00
Rich Lafferty 7ead2b55eb fix: handle variable bash $SHLVL behavior with explicit option (#4912)
* Accept shlvl as --shlvl option

* For bash only, pass --shlvl explicitly

* fmt

* Apply suggestion

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

* Apply suggestion

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

* parse_jobs -> parse_i64

---------

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2024-12-27 11:14:10 +01:00
Gilbert Sanchez 9b6d394e01 fix(init/pwsh): preserve ViModeChangeHandler (#6225)
* Combine ViModeChangeHandler

If a user has defined a ViModeChangeHandler setting this would respect that as well as redraw the prompt (to allow rendering things like the character change).

* Add newline

* Use call operator to limit new closure scope

* Pass any args to original handler
2024-12-27 11:11:45 +01:00
Poliorcetics 8a38b8f6f1 fix(status): add trailing space to pipestatus_format (#6404) 2024-11-24 19:13:35 +01:00
David Knaack 85d3fb2e2a fix(fish): restore support for fish <v3.4.0 (#6337) 2024-11-15 09:46:42 +09:00
Balthild 576aa14d15 fix(init): do not use cygpath for elvish (#6376) 2024-11-09 14:08:36 +01:00
Chiffa 639c7c6285 test(username): Default to false for is_root_user() regardless of the OS (#6358)
Default to false for tests regardless of the OS

Checking for username along with cfg!(test) seems redundant, especially because of one edge case - root user can be renamed
2024-11-09 14:06:58 +01:00
David Knaack 00d927bb20 revert: "perf(fish): Skip unnecessary indirection in starship init fish" (#6326)
Revert "perf(fish): Skip unnecessary indirection in starship init fish (#6253)"

This reverts commit 798f64033f.
2024-10-18 18:22:53 +02:00
David Knaack a5631a17dd refactor: bump msrv to remove once-cell, improve logger test & handle clippy warnings (#6315)
* refactor: replace `once_cell`-crate with stdlib

* test(logger): make log cleanup-test cross-platform

* chore: handle clippy warnings

* build(deps): update dependency dprint/dprint-plugin-toml to v0.6.3

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-17 16:03:22 +02:00
Daniel Waltz 22c6c5201d feat(deno): add deno.lock file to default detect_files list (#6310)
* feat(deno): add `deno.lock` file to default `detect_files` list

* feat(deno): add `deno.lock` to default detect files in schema

* test: add test for `deno.lock` file presense

* docs: add `deno.lock` to list of default files

* chore: formatting

* Revert "docs: add `deno.lock` to list of default files"

This reverts commit 6d0dc577d5.

* docs: add `deno.lock` to default detect files in primary readme

* chore: revert formatting from latest version of dprint

* docs: add `deno.lock` to default detect files list and format
2024-10-14 22:05:23 +02:00
Ben Fritsch 14babde435 fix(docker_context): Ignore Docker Desktop "desktop-linux" context. (#6314)
* Docker Desktop uses "desktop-linux" instead of "default" as the default context since version 3.5.
This filters "desktop-linux" in the same way as "default".
https://github.com/starship/starship/issues/6170

* update docs/config/README.md
2024-10-14 22:02:52 +02:00
David Knaack 77f08832d5 fix: use whoami for user/hostname queries again (#6311) 2024-10-14 20:46:04 +02:00
Kevin Boshold d6814be0ba fix(fish): add missing arguments for fish transient prompt functions (#6181)
Fixes #6180
2024-10-13 22:21:31 +02:00
David Knaack 25f356e3b5 chore: fix minor ci failures (#6293)
* chore: add trailing newline to config schema

* chore: fix typo

closes #6291
2024-10-07 21:18:44 +02:00
David Knaack 8419c677f1 chore: fix hindi truncation tests and bump deps (#6271)
* chore: fix hindi trunc test

* chore: bump deps
2024-09-28 13:41:35 +02:00