summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2024-03-29fix: replace unmaintained crates `yaml-rust`, `dirs-next` (#5887)David Knaack
2024-03-24fix: replace all remaining paths referring to vuepress (#5859)David Knaack
2024-03-21feat(os): add new os symbols (#5849)David Knaack
2024-03-21fix(nu): continuation prompt not being displayed correctly (#5851)Texas Toland
Resolve #5847 by initializing `$env.STARSHIP_SHELL` before calling `starship` Most minimal change possible. Other simplification are possible but not know to be backwards compatible. Also considered `with-env` or `STARSHIP_SHELL=nu starship` but they'd be worse. Happy to reformat indentation if desired.
2024-03-20fix(status): fix pipestatus width calculation (#5036)David Knaack
closes #3162 Co-authored-by: flw <flw@cpan.org>
2024-03-20feat: $gemset variable for Ruby module (#5429)marcybell
* $gemset variable for Ruby module * typo * Added test for no GEM_HOME env set * Formatting * Uses `rvm current` for gemset, no more version num
2024-03-20feat(quarto): Add Quarto module (#5820)Virgile Andreani
Add Quarto module * Adapted from the Typst module
2024-03-20feat(username): add detect_env_vars as option (#5833)Mick Hohmann
* Added the option "detect_env_vars" to the `username` module with the same functionality as in the `hostname` module. * Fixed logic error and added test to catch it * build(deps): update dependency vitepress to ^1.0.0-rc.45 * build(deps): update rust crate shadow-rs to 0.27.1 * Added the option "detect_env_vars" to the `username` module with the same functionality as in the `hostname` module. * Fixed logic error and added test to catch it * Removed unused gix import * Removed unused gix import, again * Removed unused gix import. Next try --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-20chore: fix upcoming rust 1.77 clippy issues and chrono deprecations (#5850)David Knaack
2024-03-20build(deps): update toml crates (#5842)David Knaack
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-03feat(bash): use PS0 for preexec hook (#5735)David Knaack
2024-03-03chore: apply clippy for rust 1.76 & bump msrv (#5763)David Knaack
2024-03-03feat(docs): move to vitepress (#5785)David Knaack
* feat(docs): move to vitepress * change up hero styles to match existing site * A bit more style tweaking * Replace stylus with plain CSS * improve unicode-range value for nerdfont --------- Co-authored-by: Matan Kushner <hello@matchai.dev>
2024-02-26fix(git_branch): fall back to "HEAD" when there is no current branch (#5768)Fraser Li
* fix(git_branch): fall back to "HEAD" when there is no current branch * test(git_branch): add test for branch fallback on detached HEAD
2024-02-19fix(character): also handle vi edit mode in pwsh (#5775)Gilbert Sanchez
* Add missing vi for char for Shell::Pwsh https://github.com/starship/starship/pull/5478#issuecomment-1886829331
2024-02-04fix(bash): improve integration with bash-preexec (#5734)David Knaack
2024-02-04build(deps): update rust crate windows to 0.52.0 (#5379)David Knaack
2024-01-27fix(bash): Handle Unbound Variables Errors in Bash (#4972)tricktron
* fix: unbound bp pipestatus variable * fix: unbound preserved prompt command variable * fix: unbound starship start time variable * fix: unbound preexec_functions, precmd_functions and PROMPT_COMMAND variables.
2024-01-21feat(direnv): use JSON status with direnv >= 2.33.0 (#5692)Andrew Pantuso
2024-01-21feat(bash): Support right prompt and transience (#4902)Rashil Gandhi
* Support right prompt in bash * Docs for transience in bash * Apply suggestions from review * Simplify conditional * Use ble.sh hooks, if available * Properly quote args * Use BLE_PIPESTATUS * Update starship.bash * Update src/init/starship.bash Co-authored-by: Koichi Murase <myoga.murase@gmail.com> --------- Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
2024-01-06test(aws): fix flaky tests `expiration_date_set` ↵Xiaohan Ni
`expiration_date_set_from_file` (#5685) * fix(aws): fix flaky test `expiration_date_set` * fix(aws): fix flaky test `expiration_date_set_from_file`
2024-01-06fix(zsh): improve starship binary path escaping (#5574)David Knaack
2024-01-06fix(direnv): update to work with direnv v2.33 (#5657)Camron Flanders
* update AllowStatus to work with direnv 2.33 direnv now returns int enum instead of boolean, https://github.com/direnv/direnv/pull/1158 * update schema * maybe fixed the schema now * Whoops, I inverted the flags somehow * have coffee, fix mistaken understanding * undo changes to tranlations * Update docs/config/README.md * Update src/modules/direnv.rs Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * update test output --------- Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2024-01-02revert: refactor(modules): use whoami crate to get username (#5669)David Knaack
Revert "refactor(modules): use whoami crate to get username"
2023-12-31build(deps): update rust crate gix to 0.57.0 (#5664)Sebastian Thiel
* build(deps): update rust crate gix to 0.57.0 * chore(context): explicitly avoid erroring on no git-ceiling-dir-match See: https://github.com/Byron/gitoxide/pull/1191 Co-Authored-By: Sebastian Thiel <sebastian.thiel@icloud.com> --------- Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-12-30chore: apply new rust 1.75 & nightly clippy fixes (#5646)David Knaack
chore: apply clippy fixes
2023-12-17feat(direnv): add new direnv module (#5157)Andrew Pantuso
2023-12-17feat(aws): Adding the AWS SSO CLI env variable to profile list (#5640)Stefan Richter
Adding the AWS SSO CLI env variable to profile list Adding support for the profile env variable used by https://github.com/synfinatic/aws-sso-cli
2023-12-17fix(docker_context): ignore unix domain socket path from Docker Context (#5616)Ananta Bastola
* fix(modules): ignore unix domain socket path from Docker Context fix #5548 * refactor(docker_context): ignore docker_context on unix domain socket path Closes #5548
2023-12-16fix(git_status): Avoid printing error on missing stash ref (#5434)David Knaack
* fix(git_status): Avoid printing error on missing stash ref * ensure we only proceed if the returned reference has the expected name
2023-11-29chore: fix rust 1.74 clippy lints (#5578)David Knaack
2023-11-29perf(git_status): avoid running in bare repos (#5581)William Howard
* fix: git_status bare repo handling * perform the git_status bare repo check earlier * Adjusted test
2023-11-29feat: R lang packages version, remove .Rprofile from rlang detection (#5588)Jan Gorecki
* do not detect R for .Rprofile files, closes #2817 * get R package version, #5586 * update schema * fix and simplify regex for rlang package version * attempt to fix regex * proper detect R packages, closes #5590 * reduce diff vs master branch
2023-11-25feat(shell): allow distinguishing between pwsh and powershell (#5478)Gilbert Sanchez
* Distinguish between pwsh and powershell Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-11-12feat: add typst moduleCharlotte Thomas
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-11-11refactor(modules): use whoami crate to get usernamebestgopher
Signed-off-by: bestgopher <84328409@qq.com>
2023-11-07zsh: clear exit code between promptsPatrick Stadler
2023-11-02feat(scanner): add option not to follow symlinks (#5325)Ohad Lutzky
Add follow_symlinks option Settings this to false can fix hanging on symlinks to slow/inaccessible filesystems.
2023-10-13feat: add additional exit status code meanings from libc (#5412)William Howard
2023-10-01fix(bash): unbound variable error with STARSHIP_PREEXEC_READY (#5438)Ariel Barreiro
Prevent unbound variable error
2023-09-16feat(hostname): add detect_env_vars as option (#5196)Mick Hohmann
* Added hostname.detect_env_vars based on the newly added context::detect_env_vars - extended context::detect_env_vars to check for negated environment variables as well, analogous to the other detect modules - made hostname.detect_env_vars only active if ssh_only is set to false for backwards compatibility Co-authored-by: Dominik Sander <dsander@users.noreply.github.com> * added clippy recommendations, removed unneeded comments * Added new logic (suggested in https://github.com/starship/starship/pull/5196#issuecomment-1566228913) The new `detect_env_vars` now requires either SSH_ONLY to be false or the environment variable SSH_CONNECTION to be set, so that is will be used * Fixed typo * Refactored the detect_env_vars function for early returns and better readability * Change boolean logic for better readability Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Apply suggestions from code review to `detect_env_vars` method. Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Fixed bracket error & updated comments - fixed bracket error in hostname.rs, after changes - updated comments for context.rs, for the suggested changes * Removed obsolete warning from docs/config/README.md Co-authored-by: David Knaack <davidkna@users.noreply.github.com> --------- Co-authored-by: Dominik Sander <dsander@users.noreply.github.com> Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-09-02feat(kubernetes): Add styling based on current context (#4550)Jan Katins
* feat(kubernetes): Add styling based on current context Add an ability to customize the configuration of the kubernetes module style, based on the current context. A new variable is added to the config section, called environments, which is a list of possible customizations. Each such customization is an object with a context_pattern regex, which matches context name, and an optional style and icon that will override the global configuration, if the currently used context matched the context_pattern. Based on multiple attempts to add per-context styling and symbols to the kubernetes module. - https://github.com/starship/starship/pull/1568 by @lht https://github.com/lht -> base - https://github.com/starship/starship/pull/614 by @nomaed https://github.com/nomaed -> naming, symbol, some tests Rebased and combined by @jankatins Contains the following squasched commits - Rename to contexts and move aliases into contexts - Move deprecated functions to a submodule - Cleanup: ignore None-valued KubeCtxComponents - Add regex func + clean up matching-context search - Placate paper clip Closes: https://github.com/starship/starship/issues/570 Co-authored-by: =?UTF-8?q?Boris=20Aranovic=CC=8C?= <nomaed@gmail.com> Co-authored-by: Jan Katins <jasc@gmx.net> Co-authored-by: Kevin Song <chips@ksong.dev> * refactor(kubernetes): Remove options and use clearer names * test(kubernetes): Handle duplicated contexts right * refactor(kubernetes): Cleaner user matching * fix(kubernetes): Only show warning in case of problems * feat(kubernetes): Add back alias replacements * refactor(kubernetes): Cleanup rust usage --------- Co-authored-by: Haitao Li <lihaitao@gmail.com> Co-authored-by: =?UTF-8?q?Boris=20Aranovic=CC=8C?= <nomaed@gmail.com> Co-authored-by: Kevin Song <chips@ksong.dev> Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-09-02feat(fossil_metrics): add fossil_metrics module (#4874)Vegard Skui
* feat(fossil_metrics): add fossil_metrics module * Return early if not in a Fossil check-out * Add more tests for fossil_metrics * Move is in Fossil checkout check after module enabled check * Update type for new toml version * Update the config file schema * Rework parsing of fossil diff output * Fix Fossil check-out detection in subdirectories * Use regex to only match expected fossil diff output * Use shared ancestor scanning and fix detection on Windows * Add note on minimum Fossil version
2023-08-31perf: Skip unnecessary indirection in starship init zsh (#5322)Hugo
Skip unnecessary indirection in starship init zsh The installation instructions indicate that one should add this snippet to zsh's configuration: eval "$(starship init zsh)" The command `starship init zsh` prints a little shell script for zsh to execute: > starship init zsh source <(/usr/bin/starship init zsh --print-full-init)% Running `starship init zsh --print-full-init` prints yet another script that zsh executes. There is an intermediate step that seems redundant; starship prints a script for zsh to execute, and this script prints another script for zsh to execute. This commit skips the intermediate execution and prints the final script in `starship init`. This is backwards compatible and does not require any changes in the installation instructions, so it could be release without a major version bump. Note that it would still be possible to update the installation instructions to `source <(starship init zsh)`; this patch works with both `source` and `eval`. Picking the most performant one is beyond this scope of this commit. See: https://github.com/starship/starship/issues/2637
2023-08-25chore: handle rust 1.72 clippy & fmt changes (#5399)David Knaack
2023-07-31fix(git): prevent `core.fsmonitor` from executing external commands (#3981)David Knaack
2023-07-30refactor(directory): avoid unnecessary string copies (#5313)cgzones
2023-07-14feat(shlvl): add repeat_offset for repeated symbol (#5289)Vivek Kushwaha
Signed-off-by: Vivek Kushwaha <yoursvivek@users.noreply.github.com>
2023-07-11perf(git_status): query git stash count via gitoxide (#5238)David Knaack
2023-07-06fix(rprompt): remove lprompt modules from `$all` again (#5067)David Knaack