Add $bun to the format string and [bun] section in catppuccin-powerline,
gruvbox-rainbow, jetpack, no-nerd-font, pastel-powerline, and tokyo-night
presets, following each preset's existing nodejs style conventions.
* build(deps): update actions/github-script action to v9
* build(deps): update actions/github-script to use ES module syntax
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
Without the "std" feature enabled, whoami falls back to the stub
implementation and Starship shows anonymous@localhost regardless of the
actual user or hostname.
* fix(format): allow empty textgroups to set prev_fg/prev_bg
Previously, empty format strings like `[](bg:#color)` did not produce
any segments, making it impossible to set `prev_fg` or `prev_bg` for
subsequent segments without printing visible characters.
This change makes `parse_format` generate a zero-width styled segment
when the format is empty, allowing powerline-style prompts to set
colors via empty textgroups.
Signed-off-by: cappyzawa <cappyzawa@gmail.com>
* refactor: move empty textgroup handling to parse_textgroup
Move the empty format check from parse_format to parse_textgroup
as suggested in code review. This keeps the logic scoped to
textgroup-specific behavior.
Signed-off-by: cappyzawa <cappyzawa@gmail.com>
---------
Signed-off-by: cappyzawa <cappyzawa@gmail.com>
The --client flag was removed from Helm in a recent version (see
helm/helm#31301), causing the helm module to fail silently when
detecting the version.
Helm 2 was EOL in November 2020 and without the --client flag,
`helm version --short` attempts to connect to Tiller. If that
connection fails, the command returns a non-zero exit code and
exec_cmd returns None, so the Helm 2 parsing code is never reached.
The tests `credentials_file_is_ignored_when_is_directory` and
`config_file_path_is_ignored_when_is_directory` were failing on
machines with `~/.aws/config` or `~/.aws/credentials` present.
Each test now sets both `AWS_CONFIG_FILE` and
`AWS_SHARED_CREDENTIALS_FILE` environment variables to ensure
complete isolation from the host environment.
Signed-off-by: cappyzawa <cappyzawa@gmail.com>
* build(deps): update rust crate whoami to v2
* chore: move to base import (`fallible` has become default)
* chore: add back wasi support
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* ci: add install script workflow
Add GitHub Actions workflow to test install.sh script.
This prevents regressions like the one reported in issue #7133 where
changes to the install script broke the recommended installation method.
The workflow includes:
- shellcheck for script linting (temporarily excludes SC3045)
- Integration test using curl piped to sh as documented on starship.rs
Signed-off-by: cappyzawa <cappyzawa@gmail.com>
* fixup! ci: add install script workflow
Signed-off-by: cappyzawa <cappyzawa@gmail.com>
* fixup! ci: add install script workflow
Signed-off-by: cappyzawa <cappyzawa@gmail.com>
* ci: add shfmt check and format install scripts
Add shfmt job to install-script workflow for consistent shell script
formatting. Apply shfmt to all scripts under install/ directory.
Signed-off-by: cappyzawa <cappyzawa@gmail.com>
---------
Signed-off-by: cappyzawa <cappyzawa@gmail.com>
* docs(shlvl): fix repeat example
`$shlvl` needs to be removed from `format` to have a prompt like `❯❯❯`
* docs(shlvl): remove redundant `threshold = 0` in repeat example
This module is now outputting the warning message 'Invalid utc_time_offset
configuration provided! Falling back to "local".' when
`utc_time_offset` is actually set to "local" (which is the default
value). Looks like this check for "local" was lost during a refactor.
problem: `Context::detect_env_vars` is insufficient for the logic used
by the username module, as it cannot differentiate between 'a negated
variable was found' and 'no non-negated variables were found'
solution: Add a `detect_env_vars2` method which returns an enum
`Detected` which can represents the 4 interesting cases:
- `detect_env_vars` is empty
- A negated variable was found
- A non-negated variable was found
- No non-negated variables were found
Fixes#6870
Guard against `STARSHIP_DURATION=0`
If an arithmetic expression evaluates to `0`, its exit status is `1`:
> The return status is 0 if the arithmetic value of the expression is non-zero, 1 if it is zero, and 2 if an error occurred.
In rare cases, the subtraction for `STARSHIP_DURATION` can result in an `int(0)` result (yes, really - happens e.g. during `vhs` sessions), which would then kill the shell if `set -e` is in effect.
We therefore have to assign the result outside the expression (using `STARSHIP_DURATION=$((...))`), because unlike regular `(())` arithmetic expressions, a `$(())` arithmetic substitution gets a return status of `0` even if the expression evalues to `int(0)`.
The alternative would be to keep the expression, and ensure it always succeeds, by doing `(( STARSHIP_DURATION = ... )) || true`.
However, the `$(()` approach has the benefit of still bubbling up an error from the arithmetic expression (normally return status `2` as in the documentation quote above; return status `1` in a substitution), which is useful e.g. in the event of undefined variables.
Filter out non-printing ANSI escape codes
The string `\x1b[35;49mkai` is, on the screen, only 3 characters long,
however the `width_graphemes()` function would say that it is 10
characters long. This is only really an issue for `explain`, as it makes
the width of the left column incorrect for the padding. Instead of the
following:
```console
$ starship explain
"/" (<1ms) - <description>
"kai" (<1ms) - <description>
```
it would print out like this for any parts that don't use ansi escapes
internally:
```console
"/" (<1ms) - <description>
"kai" (<1ms) - <description>
```
This should cause no problems with any of the unstyled lengths that
are generated normally, but any pre-styled strings in `custom` calls
will cause this issue.
A few modules are missing from the no-runtime-versions preset.
This also ensures the file is alphabetically ordered.
mojo and buf use "with" rather than "via", the preset now uses "with"
for these.
Signed-off-by: Christophe Fergeau <christophe@fergeau.eu>
* add Fedora installation instructions using COPR
Adds a Fedora 38+ entry to the install table using the existing atim/starship COPR repo.
Though the CentOS instructions work on Fedora, this improves clarity and discoverability for Fedora users.
Tested and confirmed working on Fedora 42.
* Order distros alphabetically
* Update min Fedora version to match the active release
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>
* 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
* New translations readme.md (Russian)
* New translations readme.md (Russian)
* New translations readme.md (Russian)
* New translations readme.md (Russian)
* 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
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>
* 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
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
run:cargo run --locked --features config-schema -- config-schema > .github/config-schema.json
- name:Check | Detect Changes
uses:reviewdog/action-suggester@v1.18.0
with:
tool_name:starship config-schema
filter_mode:nofilter
fail_on_error:'true'
run:|
if ! git diff --exit-code .github/config-schema.json; then
echo "::error file=.github/config-schema.json::config-schema.json is out of date. Run 'cargo run --features config-schema -- config-schema > .github/config-schema.json' and commit the result."
This policy supplements our [Contributing Guide](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md).
This project is maintained by volunteers.
This policy exists to keep review burden reasonable.
The policy is inspired by the [Ghostty](https://github.com/ghostty-org/ghostty/blob/main/AI_POLICY.md) and [LLVM](https://llvm.org/docs/AIToolPolicy.html) AI policies.
Contributions that violate this policy may be closed without further notice.
## Mandatory Disclosure
Every Pull Request that utilizes AI-assisted tooling (including but not limited to Claude Code, Cursor, GitHub Copilot, ChatGPT, or local LLMs) must disclose its usage.
### PR Description
You must complete the **AI-Assistance** section in our Pull Request Template.
## Human-in-the-Loop
Contributors must fully understand all submitted contributions.
### Contributions
- You must be able to explain what your changes do and defend your implementation choices.
- You are expected to have read and understood every line of code you submit.
- If your response to a maintainer's question is an unedited copy-paste from an LLM, or if you cannot explain the mechanics of your PR, the PR will be closed.
### Issue Triage and Discussions
You are not allowed to reply to user issues or discussions with unverified or raw AI-generated information.
## "Good First Issue" Protections
You may not submit contributions to close a `🌱 good first issue` if they were authored with substantial AI assistance.
These issues are intentionally triaged as learning opportunities for new developers navigating the codebase for the first time.
## Low-Effort Contributions & Prohibition of Autonomous Agents
- Contributions that are overly verbose, contain unsupported or hallucinated claims, or otherwise show the hallmarks of low-effort LLM usage may be closed without further notice.
- Contributions via OpenClaw, or any other unsupervised autonomous agent operating in an automated loop, are strictly prohibited.
* **git:** improve bare repository detection ([#7421](https://github.com/starship/starship/issues/7421)) ([27079d7](https://github.com/starship/starship/commit/27079d7669b3072a944d3610f5dd5fec65321841))
* **presets:** Update no-nerd-font to be up-to-date ([#7440](https://github.com/starship/starship/issues/7440)) ([65fb647](https://github.com/starship/starship/commit/65fb647bc38da09fe5d140f055c9f67d740bfa67))
* **python:** align `python_binary` schema with argument support ([#7415](https://github.com/starship/starship/issues/7415)) ([3ec9b5c](https://github.com/starship/starship/commit/3ec9b5c54caa828164c710500a25ccd43ef26a64))
* add statusline subcommand for Claude Code integration ([#7234](https://github.com/starship/starship/issues/7234)) ([b8ee821](https://github.com/starship/starship/commit/b8ee82167c5b49c7e9fd70e5542fad0e56810b39))
* **directory:** add support for regexes in substitutions ([#7145](https://github.com/starship/starship/issues/7145)) ([2e8f26e](https://github.com/starship/starship/commit/2e8f26e44846cd52d06563aef98e22b89965dd25))
* **env_var:** include $symbol in default format ([#7262](https://github.com/starship/starship/issues/7262)) ([3885e81](https://github.com/starship/starship/commit/3885e81357b04c244c19c0c8b05ccbbd4f797d62))
* **git_status:** add variables to track worktree and index changes ([#5655](https://github.com/starship/starship/issues/5655)) ([0110bf5](https://github.com/starship/starship/commit/0110bf59c86f6f0f33f95dc614c231acc19547b8))
* **python:** add option to replace generic venv-names with parent dir ([#7112](https://github.com/starship/starship/issues/7112)) ([083ab00](https://github.com/starship/starship/commit/083ab008fc77b982a223af8f4f18020c7a64fec6))
* **vcs:** Introduce the VCS module ([#6388](https://github.com/starship/starship/issues/6388)) ([0dd5a4f](https://github.com/starship/starship/commit/0dd5a4f402c8d94524aaaa5632b2d0cba7fe1630))
* **aws:** support `$duration` for `sso_session` ([#7100](https://github.com/starship/starship/issues/7100)) ([8108cc9](https://github.com/starship/starship/commit/8108cc95cf1b1182f239a3a4cc399d3fcd912187))
* **direnv:** accept null loadedRC state ([#7317](https://github.com/starship/starship/issues/7317)) ([56b8901](https://github.com/starship/starship/commit/56b8901f6feaa841de1f38054db7b3ae495a457b))
* **docs:** Re-add `style` option to `env_var` module ([#7298](https://github.com/starship/starship/issues/7298)) ([e2277e5](https://github.com/starship/starship/commit/e2277e5958c62a5bb1cc1f4ad76ccd051e22d1c5))
* enable std feature for whoami crate ([#7211](https://github.com/starship/starship/issues/7211)) ([9931ab2](https://github.com/starship/starship/commit/9931ab25b28b91b502dae93fc3826fd9a18a01b0))
* **format:** allow empty textgroups to set prev_fg/prev_bg ([#7201](https://github.com/starship/starship/issues/7201)) ([9186188](https://github.com/starship/starship/commit/91861886a779805cd8265a85c629e579d513aa75))
* **helm:** remove deprecated --client flag from helm version command ([#7193](https://github.com/starship/starship/issues/7193)) ([8a69666](https://github.com/starship/starship/commit/8a69666084d248b8fd76b6c54f38aea12abce6e3))
* **hg_state:** avoid false-positive MERGING state ([#7329](https://github.com/starship/starship/issues/7329)) ([7a27475](https://github.com/starship/starship/commit/7a274752d0803960ae25259c8641f6e676f9c7b2))
* **install:** improve UX for version option ([#7197](https://github.com/starship/starship/issues/7197)) ([c576625](https://github.com/starship/starship/commit/c576625343a8353ed2e99157d86065c2e713048e))
* **fish:** use native transient prompt if available ([#7015](https://github.com/starship/starship/issues/7015)) ([cc65e0c](https://github.com/starship/starship/commit/cc65e0c7429068f1123fe5d9844ebebdfa1b9547))
* **git:** Basic Reftable compatibility and future-proofing ([#7154](https://github.com/starship/starship/issues/7154)) ([6d9c8ea](https://github.com/starship/starship/commit/6d9c8ea8a9736d2e12bda46c9cdb1f8fc1de630c))
* **mise:** align documentation and implementation ([#7131](https://github.com/starship/starship/issues/7131)) ([08824d7](https://github.com/starship/starship/commit/08824d7c6e1f69150cc1c28f3ff46bbb5447a7d0))
* add mercurial state ([#6745](https://github.com/starship/starship/issues/6745)) ([5f0b31b](https://github.com/starship/starship/commit/5f0b31b4c8da64a3dbe27f5966dfbc4ab2b9f7bf))
* **aws:** support duration for aws sso ([#6614](https://github.com/starship/starship/issues/6614)) ([44e9e56](https://github.com/starship/starship/commit/44e9e56480a748ccda1a64a9f623dc2b19ecfe98))
* **cli:** accept 'powershell' for completions subcommand ([#7028](https://github.com/starship/starship/issues/7028)) ([4caee4a](https://github.com/starship/starship/commit/4caee4a7ca5dbb78c346a84cc39ca3a90a9238a5))
* **container:** Add detection of Incus containers ([#6917](https://github.com/starship/starship/issues/6917)) ([6886ad0](https://github.com/starship/starship/commit/6886ad082cd55a5a07160cc847c9c38915dca848))
* **fish:** support input-mode detection for helix-keybinds ([#6841](https://github.com/starship/starship/issues/6841)) ([26a6237](https://github.com/starship/starship/commit/26a62372d11a42f7fec0b65c388e585a79d05b04))
* new module `xmake` ([#6811](https://github.com/starship/starship/issues/6811)) ([ff0acb1](https://github.com/starship/starship/commit/ff0acb193eaa04ab63a8e56e1bd18019444b886f))
* **nu:** Add job support for nushell ([#6684](https://github.com/starship/starship/issues/6684)) ([ac2359c](https://github.com/starship/starship/commit/ac2359ca8a020825b5c68b5e3b8da35d4917f46e))
* **package:** Add support for Ansible Galaxy ([#6905](https://github.com/starship/starship/issues/6905)) ([07778a8](https://github.com/starship/starship/commit/07778a8452bb565db55e32c32d7c8434a7bda9dd))
* **package:** pyproject hatchling dynamic version ([#6656](https://github.com/starship/starship/issues/6656)) ([ef5227e](https://github.com/starship/starship/commit/ef5227eeafa4dd5c99aff1fdab07574bc423d648))
* **terraform:** support opentofu for terraform version detection ([#6910](https://github.com/starship/starship/issues/6910)) ([ef7d8bd](https://github.com/starship/starship/commit/ef7d8bd442f659b64cc23fd4b096e696531289ba))
### Bug Fixes
* consider text-only meta variables in conditionals set if non-empty ([#6338](https://github.com/starship/starship/issues/6338)) ([286b0f2](https://github.com/starship/starship/commit/286b0f2be30db81bc948579c137f0cc646fcde65))
* **docker_context:** add `compose.yml` and `compose.yaml` to files ([#6625](https://github.com/starship/starship/issues/6625)) ([a98a05f](https://github.com/starship/starship/commit/a98a05f1ac4dfc215337a266c784cd62256f0c33))
* **explain:** Filter out non-printing ANSI escape codes ([#6861](https://github.com/starship/starship/issues/6861)) ([2c11c08](https://github.com/starship/starship/commit/2c11c086b8da5ea43ae795fa0e71a621e983ebcc))
* **fossil_metrics:** match single-file ([#6785](https://github.com/starship/starship/issues/6785)) ([5dd40ea](https://github.com/starship/starship/commit/5dd40ea62fb697239c2a84072414bd30059067d9))
* **git_metrics:** adhere to `git_status``use_git_executable` option ([#6927](https://github.com/starship/starship/issues/6927)) ([05daa3e](https://github.com/starship/starship/commit/05daa3e27832dde93f784c2659b31f94bb827f80))
* **git_status:** Do not show up-to-date when untracked ([#6755](https://github.com/starship/starship/issues/6755)) ([f42b53e](https://github.com/starship/starship/commit/f42b53edd8bc26ec95dd027d9cf776ec70597cc3))
* **hg_branch:** Strip extraneous newlines from hg topic. ([#6766](https://github.com/starship/starship/issues/6766)) ([ccc32e7](https://github.com/starship/starship/commit/ccc32e73fc0a0f99d90cff3a0efb73efecce1d84))
* improve adhere to directory scanning timeout ([#6694](https://github.com/starship/starship/issues/6694)) ([109a681](https://github.com/starship/starship/commit/109a6811cee1faae677a24a7d92fa8ed39397485))
* **jobs:** Count job groups instead of processes for fish ([#6899](https://github.com/starship/starship/issues/6899)) ([95bf53f](https://github.com/starship/starship/commit/95bf53f6b9f7dbc50708e0f459b6dc7a7b7ebd20))
* **nushell:** Startup `cmd_duration` should be 0ms not 823ms ([#6854](https://github.com/starship/starship/issues/6854)) ([0ad1cf8](https://github.com/starship/starship/commit/0ad1cf831a9e7938ed5e3d3262d3647e828ee4de))
* **preset/nerd-font:** remove double spaces in `gcloud` default value and use Google Cloud-specific icon ([#6822](https://github.com/starship/starship/issues/6822)) ([3b5bbe3](https://github.com/starship/starship/commit/3b5bbe3566583f4549234f89874a3662d67c5012))
* **preset/pure:** only enable python module if venv is active ([#6689](https://github.com/starship/starship/issues/6689)) ([5e8851a](https://github.com/starship/starship/commit/5e8851a95364e9713d1c5ddc409248f0705a9410))
* remove double spaces in default values ([#6649](https://github.com/starship/starship/issues/6649)) ([e406f55](https://github.com/starship/starship/commit/e406f552f84b37631152f34617712085d65c5e7b))
* rust-ini 0.21.2 has been yanked from crates.io. ([#6916](https://github.com/starship/starship/issues/6916)) ([b698fb0](https://github.com/starship/starship/commit/b698fb05593c81c1e2f35af0f1e61c00dd85c6ce))
* **terraform:** amend module to `exec_cmds_return_first`-changes ([#6956](https://github.com/starship/starship/issues/6956)) ([0f5d8d4](https://github.com/starship/starship/commit/0f5d8d4a4a932b5ed99aece6a6484887d7f4e06a))
* **test/git_commit:** avoid spawning an editor lead to timeout if tag signing is enabled ([#6887](https://github.com/starship/starship/issues/6887)) ([32c29cf](https://github.com/starship/starship/commit/32c29cfda784bdcc6a97c0e637f99100af1a0c2d))
* **zsh:** check if vars are set before reading them ([#6742](https://github.com/starship/starship/issues/6742)) ([608ae37](https://github.com/starship/starship/commit/608ae37bcfd498b72020689b19debb79d236c411))
* **zsh:** do not fail under ERR_EXIT conditions if `STARSHIP_DURATION` computes to 0 ([#6922](https://github.com/starship/starship/issues/6922)) ([38db5f0](https://github.com/starship/starship/commit/38db5f0094d1109b8e7b4332b6c20c2a8b125cf1))
### Performance Improvements
* **git_status:** avoid gix index load when `core.fsmonitor` is used ([#6817](https://github.com/starship/starship/issues/6817)) ([1c2f4d4](https://github.com/starship/starship/commit/1c2f4d46594d38abd423752efa3b21903e5a1e3b))
* Parallelize child modules for env_var|custom ([#6748](https://github.com/starship/starship/issues/6748)) ([7f4eb6f](https://github.com/starship/starship/commit/7f4eb6fdae5218413963f07f86df4e2b340bd05e))
* Add support for pixi ([#6335](https://github.com/starship/starship/issues/6335)) ([7e88ba9](https://github.com/starship/starship/commit/7e88ba9561bead33cefaba1003637e0213199a15))
* added mise module ([#5747](https://github.com/starship/starship/issues/5747)) ([d24e787](https://github.com/starship/starship/commit/d24e78754a0ce1d5ea77eae0a7d3b19aaa7bcfc8))
* **c++:** adding c++ module ([#6570](https://github.com/starship/starship/issues/6570)) ([ed07646](https://github.com/starship/starship/commit/ed076460995cb5175e47442dc11b46ff0f039b4a))
* **nodejs:** disable if bun project files detected ([#6346](https://github.com/starship/starship/issues/6346)) ([00ce705](https://github.com/starship/starship/commit/00ce7057efb7c431e7f9b526ca3ee941573e9f40))
* **package:** support JSR package version ([#6502](https://github.com/starship/starship/issues/6502)) ([bd2321a](https://github.com/starship/starship/commit/bd2321a12fc47135f316e90f22ccab6a61b50730))
* **preset:** Add gcloud symbol to nerd-fonts preset to match aws ([#6693](https://github.com/starship/starship/issues/6693)) ([348c23f](https://github.com/starship/starship/commit/348c23fd58d90352cb128d32c495c1107a98d930))
* **python:** add support for `python_binary` arguments in config ([#6523](https://github.com/starship/starship/issues/6523)) ([7667555](https://github.com/starship/starship/commit/76675559c041fa2ae6a85cb946218e5e1f04bf75))
### Bug Fixes
* **battery:** prefer charge ratio over current capacity ([#6603](https://github.com/starship/starship/issues/6603)) ([d245939](https://github.com/starship/starship/commit/d2459391194cf5a142d98b1297fe5f630c3415f5))
* Change to a non-yanked version of the log crate ([#6495](https://github.com/starship/starship/issues/6495)) ([ed20b1d](https://github.com/starship/starship/commit/ed20b1d23b1b7ed914fca30fb6788f3d609f4a52))
* **fossil_metrics:** Add -i flag to the fossil_metrics module's command ([#6544](https://github.com/starship/starship/issues/6544)) ([eb7d80b](https://github.com/starship/starship/commit/eb7d80bafac8f6ae719ee357aeff129065ddd7e6))
* **package:** fix cargo workspace version ([#6626](https://github.com/starship/starship/issues/6626)) ([834bbf5](https://github.com/starship/starship/commit/834bbf53e53fc7f46f168e6d13677b737af73dbf))
* **preset:** add missing rlang to plain-text-symbols preset ([ddafaa6](https://github.com/starship/starship/commit/ddafaa62fc85fddff2bc2cc3a1daaf919f8b8f0d))
* **preset:** add missing rlang to plain-text-symbols preset ([#6458](https://github.com/starship/starship/issues/6458)) ([ddafaa6](https://github.com/starship/starship/commit/ddafaa62fc85fddff2bc2cc3a1daaf919f8b8f0d))
### Performance Improvements
* **ancestor-scan:** preallocate and reuse a single `PathBuf` ([#6387](https://github.com/starship/starship/issues/6387)) ([b3cb92e](https://github.com/starship/starship/commit/b3cb92e6483a6cc054c6f7db14951c99bd7c9e9b))
* use `gitoxide` for `git_status` and `git_metrics` modules ([#6476](https://github.com/starship/starship/issues/6476)) ([daf8d93](https://github.com/starship/starship/commit/daf8d93d27fdc70b110a4a56799d7dc3a10c3810))
### Reverts
* Remove specialized whoami hostname function choice for windows ([#6651](https://github.com/starship/starship/issues/6651)) ([8eefdb2](https://github.com/starship/starship/commit/8eefdb21a6099d86b831ff1d42ae7f2a1678185a))
* **battery:** Use best match instead of first match for `battery.display` threshold ([#6442](https://github.com/starship/starship/issues/6442)) ([2690a32](https://github.com/starship/starship/commit/2690a329cf9a6b4a160d024674193007fb292e1a))
* **bun:** Detect bun using new text-format lockfile ([#6441](https://github.com/starship/starship/issues/6441)) ([2df521c](https://github.com/starship/starship/commit/2df521c69b0b1400edee7b7b332b5e2a900c7775))
* **direnv:** allow direnv to detect environment variables ([#6196](https://github.com/starship/starship/issues/6196)) ([4593716](https://github.com/starship/starship/commit/45937166c8b3cb53f09b29c65d0f547aa7f2f022))
* **fish:** restore support for fish <v3.4.0 ([#6337](https://github.com/starship/starship/issues/6337)) ([85d3fb2](https://github.com/starship/starship/commit/85d3fb2e2ab96e639fe6b67ba1afbb94b6c5b83e))
* **hostname:** use DNS instead of NetBIOS name on Windows ([#6343](https://github.com/starship/starship/issues/6343)) ([43f097e](https://github.com/starship/starship/commit/43f097eae838c1fba52659113826669802081918))
* **init:** do not use cygpath for elvish ([#6376](https://github.com/starship/starship/issues/6376)) ([576aa14](https://github.com/starship/starship/commit/576aa14d15f57abf7d1c28e3486f2682e45c2f62))
* **status:** add trailing space to `pipestatus_format` ([#6404](https://github.com/starship/starship/issues/6404)) ([8a38b8f](https://github.com/starship/starship/commit/8a38b8f6f19fa6f17098e32f22183beac0498764))
* **username:** avoid using `whoami` on android ([#6342](https://github.com/starship/starship/issues/6342)) ([af5d139](https://github.com/starship/starship/commit/af5d139060bbb60690196dc53e05424ac3c0fb5d)), closes [#6340](https://github.com/starship/starship/issues/6340)
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
```
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
```sh
use ~/.cache/starship/init.nu
```
Note: Only Nushell v0.78+ is supported
Note: Only Nushell v0.96+ is supported
</details>
@@ -413,11 +421,11 @@ If you're looking to further customize Starship:
## 🤝 Contributing
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/).
If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋
If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/main/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋
## 💭 Inspired By
@@ -446,13 +454,13 @@ This program will not transfer any information to other networked systems unless
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
@@ -124,20 +124,17 @@ onMounted(() => {
```
#### Elvish
> [!WARNING]
> Only elvish v0.18 or higher is supported.
::: warning
Only elvish v0.18 or higher is supported.
:::
Add the following to the end of `~/.elvish/rc.elv`:
Add the following to the end of `~/.config/elvish/rc.elv` (`%AppData%\elvish\rc.elv` on Windows):
```sh
# ~/.elvish/rc.elv
eval (starship init elvish)
```
For elvish versions prior to v0.21.0 the config file might instead be `~/.elvish/rc.elv`
#### Tcsh
@@ -150,25 +147,15 @@ onMounted(() => {
```
#### Nushell
> [!WARNING]
> This will change in the future.
> Only Nushell v0.96+ is supported.
::: warning
This will change in the future.
Only Nushell v0.78+ is supported.
:::
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
Add the following to the end of your Nushell configuration (find it by running `$nu.config-path` in Nushell):
```sh
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu
```
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
@@ -4,11 +4,8 @@ While Starship is a versatile shell, sometimes you need to do more than edit
`starship.toml` to get it to do certain things. This page details some of the more
advanced configuration techniques used in starship.
::: warning
The configurations in this section are subject to change in future releases of Starship.
:::
> [!WARNING]
> The configurations in this section are subject to change in future releases of Starship.
## TransientPrompt in PowerShell
@@ -318,6 +315,12 @@ Produces a prompt like the following:
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
```
When using `zsh` (v5.0.5+), the shell adds a default trailing space to the right prompt. This can cause alignment issues specifically when using the Starship `$fill` module. To remove this gap, add the following to your `.zshrc`:
```zsh
ZLE_RPROMPT_INDENT=0
```
## Continuation Prompt
Some shells support a continuation prompt along with the normal prompt. This prompt is rendered instead of the normal prompt when the user has entered an incomplete statement (such as a single left parenthesis or quote).
@@ -341,6 +344,316 @@ Note: Continuation prompts are only available in the following shells:
continuation_prompt='▶▶ '
```
## Statusline for Claude Code
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
### Setup
To use Starship as your Claude Code statusline:
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
```json
{
"statusLine":{
"type":"command",
"command":"starship statusline claude-code"
}
}
```
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
### Overview
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
The profile includes three specialized modules:
-`claude_model`: Displays the current Claude model being used
-`claude_context`: Shows context window usage with a visual gauge
-`claude_cost`: Displays session cost and statistics
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
| `disabled` | `false` | Disables the `claude_context` module. |
##### Display
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
| percentage | `65%` | Context usage as a percentage |
| input_tokens | `45.2k` | Total input tokens in conversation |
| output_tokens | `12.3k` | Total output tokens in conversation |
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
| total_tokens | `200k` | Total context window size |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the style from the matching display threshold |
\*: This variable can only be used as a part of a style string
#### Examples
**Minimal gauge-only display**
```toml
# ~/.config/starship.toml
[claude_context]
format="[$gauge]($style) "
gauge_width=10
```
**Detailed token information**
```toml
# ~/.config/starship.toml
[claude_context]
format="[$percentage ($input_tokens in / $output_tokens out)]($style) "
```
**Custom gauge symbols**
```toml
# ~/.config/starship.toml
[claude_context]
gauge_full_symbol="▰"
gauge_partial_symbol=""
gauge_empty_symbol="▱"
gauge_width=10
format="[$gauge]($style) "
```
**Custom thresholds**
```toml
# ~/.config/starship.toml
[[claude_context.display]]
threshold=0
style="bold green"
[[claude_context.display]]
threshold=50
style="bold yellow"
[[claude_context.display]]
threshold=75
style="bold orange"
[[claude_context.display]]
threshold=90
style="bold red"
```
### Claude Cost
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
| `disabled` | `false` | Disables the `claude_cost` module. |
##### Display
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
@@ -136,19 +136,16 @@ onMounted(() => {
#### Elvish
::: warning
> [!WARNING] Only elvish v0.18 or higher is supported.
Only elvish v0.18 or higher is supported.
:::
أضف ما يلي إلى نهاية الملف `~/.elvish/rc.elv`:
Add the following to the end of `~/.config/elvish/rc.elv` (`%AppData%\elvish\rc.elv` on Windows):
```sh
# ~/.elvish/rc.elv
eval (starship init elvish)
```
For elvish versions prior to v0.21.0 the config file might instead be `~/.elvish/rc.elv`
#### Tcsh
@@ -164,23 +161,13 @@ onMounted(() => {
#### Nushell
::: warning
> [!WARNING] This will change in the future. Only Nushell v0.96+ is supported.
This will change in the future. Only Nushell v0.78+ is supported.
:::
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
Add the following to the end of your Nushell configuration (find it by running `$nu.config-path` in Nushell):
```sh
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu
```
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship.
::: تحذير
The configurations in this section are subject to change in future releases of Starship.
:::
> [!WARNING] The configurations in this section are subject to change in future releases of Starship.
## TransientPrompt in PowerShell
@@ -270,6 +266,316 @@ Note: Continuation prompts are only available in the following shells:
continuation_prompt='▶▶ '
```
## Statusline for Claude Code
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
### Setup
To use Starship as your Claude Code statusline:
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
```json
{
"statusLine":{
"type":"command",
"command":"starship statusline claude-code"
}
}
```
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
### Overview
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
The profile includes three specialized modules:
-`claude_model`: Displays the current Claude model being used
-`claude_context`: Shows context window usage with a visual gauge
-`claude_cost`: Displays session cost and statistics
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
| `disabled` | `false` | Disables the `claude_context` module. |
##### Display
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
| percentage | `65%` | Context usage as a percentage |
| input_tokens | `45.2k` | Total input tokens in conversation |
| output_tokens | `12.3k` | Total output tokens in conversation |
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
| total_tokens | `200k` | Total context window size |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the style from the matching display threshold |
\*: This variable can only be used as a part of a style string
#### Examples
**Minimal gauge-only display**
```toml
# ~/.config/starship.toml
[claude_context]
format="[$gauge]($style) "
gauge_width=10
```
**Detailed token information**
```toml
# ~/.config/starship.toml
[claude_context]
format="[$percentage ($input_tokens in / $output_tokens out)]($style) "
```
**Custom gauge symbols**
```toml
# ~/.config/starship.toml
[claude_context]
gauge_full_symbol="▰"
gauge_partial_symbol=""
gauge_empty_symbol="▱"
gauge_width=10
format="[$gauge]($style) "
```
**Custom thresholds**
```toml
# ~/.config/starship.toml
[[claude_context.display]]
threshold=0
style="bold green"
[[claude_context.display]]
threshold=50
style="bold yellow"
[[claude_context.display]]
threshold=75
style="bold orange"
[[claude_context.display]]
threshold=90
style="bold red"
```
### Claude Cost
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
| `disabled` | `false` | Disables the `claude_cost` module. |
##### Display
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
```
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
```sh
use ~/.cache/starship/init.nu
```
Note: Only Nushell v0.78+ is supported
Note: Only Nushell v0.96+ is supported
</details>
@@ -411,7 +408,7 @@ If you're looking to further customize Starship:
## 🤝 المساهمة
نبحث دائماً عن مساهمين من **جميع المستويات**! إذا كنت تتطلع إلى تسهيل طريقك إلى المشروع، جرب [إنشاء اول مشكلة](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
نبحث دائماً عن مساهمين من **جميع المستويات**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
إذا كنت تتحدث بطلاقة بلغة غير إنجليزية، فإننا نقدر أي مساعدة للحفاظ على ترجمة المستندات وتحديثها بلغات أخرى. إذا كنت ترغب في المساعدة، يمكن المساهمة بالترجمة على [Starship Crowdin](https://translate.starship.rs/).
@@ -431,7 +428,16 @@ If you're looking to further customize Starship:
Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website.
- Free code signing provided by [SignPath.io](https://signpath.io), certificate by [SignPath Foundation](https://signpath.org)
## 🔒 Code Signing Policy
Free code signing provided by [SignPath.io](https://signpath.io), certificate by [SignPath Foundation](https://signpath.org).
- Approvers and Authors: [Mission Control](https://github.com/orgs/starship/teams/mission-control)
This program will not transfer any information to other networked systems unless specifically requested by the user or the person installing or operating it.
@@ -14,11 +14,7 @@ This preset changes the symbols for each module to use Nerd Font symbols.
This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt.
::: tip
This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544).
:::
> [!TIP] This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544).
[Click to view No Nerd Font preset](./no-nerd-font)
@@ -75,3 +71,9 @@ This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), an
This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
[](./jetpack)
This preset is a minimally modified version of [Gruvbox Rainbow](./gruvbox-rainbow.md) using the [Catppuccin](https://github.com/catppuccin/catppuccin) theme palette.
[](./catppuccin-powerline)
This preset is a minimally modified version of [Gruvbox Rainbow](./gruvbox-rainbow.md) using the [Catppuccin](https://github.com/catppuccin/catppuccin) theme palette.

### المتطلبات الأساسية
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
@@ -136,19 +136,16 @@ onMounted(() => {
#### Elvish
::: warning
> [!WARNING] Only elvish v0.18 or higher is supported.
Only elvish v0.18 or higher is supported.
:::
`~/.elvish/rc.elv` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন:
Add the following to the end of `~/.config/elvish/rc.elv` (`%AppData%\elvish\rc.elv` on Windows):
```sh
# ~/.elvish/rc.elv
eval (starship init elvish)
```
For elvish versions prior to v0.21.0 the config file might instead be `~/.elvish/rc.elv`
#### Tcsh
@@ -164,23 +161,13 @@ onMounted(() => {
#### Nushell
::: warning
> [!WARNING] This will change in the future. Only Nushell v0.96+ is supported.
This will change in the future. Only Nushell v0.78+ is supported.
:::
আপনার Nushell env ফাইলের (Nushell এ `$nu.env-path` কমান্ডটি রান করে ফাইলটি খুঁজে বের করুন) শেষে নিম্নলিখিত লাইনগুলি যোগ করুন:
Add the following to the end of your Nushell configuration (find it by running `$nu.config-path` in Nushell):
```sh
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu
```
এরপর আপনার Nushell কনফিগের (Nushell এ `$nu.config-path` কমান্ডটি রান করে ফাইলটি খুঁজে বের করুন) শেষে নিম্নলিখিত লাইনটি যোগ করুন:
While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship.
::: warning
The configurations in this section are subject to change in future releases of Starship.
:::
> [!WARNING] The configurations in this section are subject to change in future releases of Starship.
## TransientPrompt in PowerShell
@@ -270,6 +266,316 @@ Note: Continuation prompts are only available in the following shells:
continuation_prompt='▶▶ '
```
## Statusline for Claude Code
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
### Setup
To use Starship as your Claude Code statusline:
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
```json
{
"statusLine":{
"type":"command",
"command":"starship statusline claude-code"
}
}
```
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
### Overview
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
The profile includes three specialized modules:
-`claude_model`: Displays the current Claude model being used
-`claude_context`: Shows context window usage with a visual gauge
-`claude_cost`: Displays session cost and statistics
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
| `disabled` | `false` | Disables the `claude_context` module. |
##### Display
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
| percentage | `65%` | Context usage as a percentage |
| input_tokens | `45.2k` | Total input tokens in conversation |
| output_tokens | `12.3k` | Total output tokens in conversation |
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
| total_tokens | `200k` | Total context window size |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the style from the matching display threshold |
\*: This variable can only be used as a part of a style string
#### Examples
**Minimal gauge-only display**
```toml
# ~/.config/starship.toml
[claude_context]
format="[$gauge]($style) "
gauge_width=10
```
**Detailed token information**
```toml
# ~/.config/starship.toml
[claude_context]
format="[$percentage ($input_tokens in / $output_tokens out)]($style) "
```
**Custom gauge symbols**
```toml
# ~/.config/starship.toml
[claude_context]
gauge_full_symbol="▰"
gauge_partial_symbol=""
gauge_empty_symbol="▱"
gauge_width=10
format="[$gauge]($style) "
```
**Custom thresholds**
```toml
# ~/.config/starship.toml
[[claude_context.display]]
threshold=0
style="bold green"
[[claude_context.display]]
threshold=50
style="bold yellow"
[[claude_context.display]]
threshold=75
style="bold orange"
[[claude_context.display]]
threshold=90
style="bold red"
```
### Claude Cost
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
| `disabled` | `false` | Disables the `claude_cost` module. |
##### Display
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
```
এরপর আপনার Nushell কনফিগের (Nushell এ `$nu.config-path` কমান্ডটি রান করে ফাইলটি খুঁজে বের করুন) শেষে নিম্নলিখিত লাইনটি যোগ করুন:
```sh
use ~/.cache/starship/init.nu
```
বিঃদ্রঃ শুধুমাত্র Nushell v0.78+ কাজ করবে ।
বিঃদ্রঃ শুধুমাত্র Nushell v0.96+ কাজ করবে ।
</details>
@@ -411,7 +408,7 @@ eval "$(starship init zsh)"
## 🤝 নিজে অবদান রাখুন
আমরা সবসময় **সকল দক্ষতা স্তরের** অবদানকারীদের খুঁজছি! আপনি যদি সহজ ভাবে এই প্রোজেক্টে অবদান রাখতে চান তাইলে ["good first issue"](https://github.com/starship/starship/labels/🌱%20good%20first%20issue) গুলির সমাধান করার চেষ্টা করতে পারেন ।
আমরা সবসময় **সকল দক্ষতা স্তরের** অবদানকারীদের খুঁজছি! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
আপনি যদি ইংরেজি ছাড়া অন্য কোন ভাষায় সাবলীল হন, তাহলে আপনি আমাদের ডকুমেন্টেশন অনুবাদে এবং আপ-টু-ডেট রাখতে সহায়তা করতে পারেন, আমরা খুবই কৃতজ্ঞ হব । যদি এক্ষেত্রে সাহায্য করতে চান, তাহলে [Starship Crowdin](https://translate.starship.rs/) পেইজ এ গিয়ে আপনার অনুবাদ গুলি যোগ করতে পারবেন ।
@@ -431,7 +428,16 @@ eval "$(starship init zsh)"
[একজন স্পনসর হয়ে](https://github.com/sponsors/starship) এই প্রোজেক্টটিকে আর্থিক ভাবে সহায়তা করুন । আপনার নাম অথবা লোগো নিম্নে দেখা যাবে আপনার ওয়েবসাইট এর লিঙ্ক সহ ।
- Free code signing provided by [SignPath.io](https://signpath.io), certificate by [SignPath Foundation](https://signpath.org)
## 🔒 Code Signing Policy
Free code signing provided by [SignPath.io](https://signpath.io), certificate by [SignPath Foundation](https://signpath.org).
- Approvers and Authors: [Mission Control](https://github.com/orgs/starship/teams/mission-control)
This program will not transfer any information to other networked systems unless specifically requested by the user or the person installing or operating it.
@@ -14,11 +14,7 @@ This preset changes the symbols for each module to use Nerd Font symbols.
This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt.
::: tip
This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544).
:::
> [!TIP] This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544).
[Click to view No Nerd Font preset](./no-nerd-font)
@@ -75,3 +71,9 @@ This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), an
This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
[](./jetpack)
This preset is a minimally modified version of [Gruvbox Rainbow](./gruvbox-rainbow.md) using the [Catppuccin](https://github.com/catppuccin/catppuccin) theme palette.
[](./catppuccin-powerline)
This preset is a minimally modified version of [Gruvbox Rainbow](./gruvbox-rainbow.md) using the [Catppuccin](https://github.com/catppuccin/catppuccin) theme palette.

### পূর্বশর্ত
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal
> [!WARNING] The configurations in this section are subject to change in future releases of Starship.
## TransientPrompt in PowerShell
@@ -270,6 +266,316 @@ Note: Continuation prompts are only available in the following shells:
continuation_prompt='▶▶ '
```
## Statusline for Claude Code
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
### Setup
To use Starship as your Claude Code statusline:
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
```json
{
"statusLine":{
"type":"command",
"command":"starship statusline claude-code"
}
}
```
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
### Overview
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
The profile includes three specialized modules:
-`claude_model`: Displays the current Claude model being used
-`claude_context`: Shows context window usage with a visual gauge
-`claude_cost`: Displays session cost and statistics
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
| `disabled` | `false` | Disables the `claude_context` module. |
##### Display
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
| percentage | `65%` | Context usage as a percentage |
| input_tokens | `45.2k` | Total input tokens in conversation |
| output_tokens | `12.3k` | Total output tokens in conversation |
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
| total_tokens | `200k` | Total context window size |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the style from the matching display threshold |
\*: This variable can only be used as a part of a style string
#### Examples
**Minimal gauge-only display**
```toml
# ~/.config/starship.toml
[claude_context]
format="[$gauge]($style) "
gauge_width=10
```
**Detailed token information**
```toml
# ~/.config/starship.toml
[claude_context]
format="[$percentage ($input_tokens in / $output_tokens out)]($style) "
```
**Custom gauge symbols**
```toml
# ~/.config/starship.toml
[claude_context]
gauge_full_symbol="▰"
gauge_partial_symbol=""
gauge_empty_symbol="▱"
gauge_width=10
format="[$gauge]($style) "
```
**Custom thresholds**
```toml
# ~/.config/starship.toml
[[claude_context.display]]
threshold=0
style="bold green"
[[claude_context.display]]
threshold=50
style="bold yellow"
[[claude_context.display]]
threshold=75
style="bold orange"
[[claude_context.display]]
threshold=90
style="bold red"
```
### Claude Cost
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
| `disabled` | `false` | Disables the `claude_cost` module. |
##### Display
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
ئێمە هەموو کات ئەگەڕێین بۆ بەژداریکەرێک لە هەر **ئاست و توانایەکدا بێت**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
- Approvers and Authors: [Mission Control](https://github.com/orgs/starship/teams/mission-control)
This program will not transfer any information to other networked systems unless specifically requested by the user or the person installing or operating it.
@@ -14,11 +14,7 @@ This preset changes the symbols for each module to use Nerd Font symbols.
This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt.
::: tip
This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544).
:::
> [!TIP] This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544).
[Click to view No Nerd Font preset](./no-nerd-font)
@@ -75,3 +71,9 @@ This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), an
This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
[](./jetpack)
This preset is a minimally modified version of [Gruvbox Rainbow](./gruvbox-rainbow.md) using the [Catppuccin](https://github.com/catppuccin/catppuccin) theme palette.
[](./catppuccin-powerline)
This preset is a minimally modified version of [Gruvbox Rainbow](./gruvbox-rainbow.md) using the [Catppuccin](https://github.com/catppuccin/catppuccin) theme palette.

### پێشمەرجەکان
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal
Füge das Folgende ans Ende von `Microsoft.PowerShell_profile.ps1` an. Du kannst den Speicherort dieser Datei überprüfen, indem du die `$PROFILE` Variable in PowerShell abfragst. Normalerweise ist der Pfad `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` oder `~/.config/powershell/Microsoft.PowerShell_profile.ps1` auf -Nix.
@@ -136,19 +136,16 @@ onMounted(() => {
#### Elvish
::: warning
> [!WARNUNG] Nur elvish v0.18 oder höher wird unterstützt.
Es wird nur elvish v0.18 oder höher unterstützt.
:::
Trage folgendes am Ende von `~/.config/fish/rc.elv` ein:
Add the following to the end of `~/.config/elvish/rc.elv` (`%AppData%\elvish\rc.elv` on Windows):
```sh
# ~/.elvish/rc.elv
eval (starship init elvish)
```
For elvish versions prior to v0.21.0 the config file might instead be `~/.elvish/rc.elv`
#### Tcsh
@@ -164,23 +161,13 @@ onMounted(() => {
#### Nushell
::: warning
> [!WARNUNG] Dies wird sich in Zukunft ändern. Nur Nushell v0.96+ wird unterstützt.
Das wird sich in Zukunft ändern. Nur Nushell v0.78+ wird unterstützt.
:::
Füge folgendes zum Ende deiner Nushell env Datei hinzu (finde sie, indem du `$nu.env-path` in Nushell ausführst):
Add the following to the end of your Nushell configuration (find it by running `$nu.config-path` in Nushell):
```sh
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu
```
Und füge folgendes am Ende deiner Nushell-Konfiguration hinzu (du findest diese, indem du folgenden Befehl in Nushell ausführst `$nu.config-path`):
Auch wenn Starship eine vielseitige Shell ist, reichen manche Konfigurationen in der `starship.toml` nicht aus, um manche Sachen zu erreichen. Diese Seite beschreibt einige fortgeschrittene Konfigurationen für Starship.
::: warning
Die hier beschriebenen Konfigurationen werden sich mit kommenden Updates von Starship verändern.
:::
> [!WARNING] Die Konfigurationen in diesem Abschnitt können in zukünftigen Releases von Starship Änderungen unterliegen.
## TransientPrompt in PowerShell
@@ -32,7 +28,7 @@ Clink allows you to replace the previous-printed prompt with custom strings. Das
-`same_dir`: replace the previous prompt only if the working directory is same
-`off`: do not replace the prompt (i.e. turn off transience)
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
Sie müssen dies nur einmal tun. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
@@ -45,7 +41,7 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
-By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
-Standardmäßig ist die rechte Seite de Eingabe leer. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
```lua
functionstarship_transient_rprompt_func(prompt)
@@ -70,7 +66,7 @@ starship init fish | source
enable_transience
```
-By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
-Standardmäßig ist die rechte Seite de Eingabe leer. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
functionstarship_transient_rprompt_func
@@ -80,7 +76,7 @@ starship init fish | source
enable_transience
```
## TransientPrompt and TransientRightPrompt in Bash
## „TransientPrompt“ und „TransientRightPrompt“ in Bash
The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework at v0.4 or higher allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc``bleopt prompt_ps1_transient=<value>`:
Die Bash Shell hat, im Gegensatz zu vielen anderen Shells, kein konventionelles preexec/precmd Framework. Daher gestaltet es sich schwierig, vollständig anpassbare Hooks für `bash` anzubieten. Starship bietet daher die begrenzte Möglichkeit, eigene Funktionen in das prompt rendering Verfahren einzufügen:
- Um eine benutzerdefinierte Funktion kurz vor Anzeige der Eingabeaufforderung auszuführen, definiere eine neue Funktion und weise den Namen `starship_precmd_user_func` zu. Um beispielsweise eine Rakete anzuzeigen, bevor die Eingabeaufforderung erscheint, würde man folgendes tun
- Um eine benutzerdefinierte Funktion kurz vor Anzeige der Eingabeaufforderung auszuführen, definiere eine neue Funktion und weise den Namen `starship_precmd_user_func` zu. Zum Beispiel, um vor der Eingabeaufforderung eine Rakete zu zeichnen, würden Sie Folgendes tun
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
Zum Beispiel, wenn sie ihr aktuelles Verzeichnis als Terminal Title anzeigen wollen, fügen Sie folgenden Code-Schnipsel zu ihrer `~/.bashrc` oder `~/.zshrc` hinzu:
Zum Beispiel, wenn Sie ihr aktuelles Verzeichnis im Titel Ihrer Terminal-Registerkarte anzeigen möchten, fügen Sie folgenden Code-Schnipsel zu Ihrer `~/.bashrc` oder `~/.zshrc` hinzu:
```bash
function set_win_title(){
@@ -270,6 +266,316 @@ Hinweis: Fortsetzungs-Prompts sind nur für folgende Shells verfügbar:
continuation_prompt='▶▶ '
```
## Statusline for Claude Code
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
### Setup
To use Starship as your Claude Code statusline:
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
```json
{
"statusLine":{
"type":"command",
"command":"starship statusline claude-code"
}
}
```
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
### Overview
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
The profile includes three specialized modules:
-`claude_model`: Displays the current Claude model being used
-`claude_context`: Shows context window usage with a visual gauge
-`claude_cost`: Displays session cost and statistics
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
| `disabled` | `false` | Disables the `claude_context` module. |
##### Display
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
| percentage | `65%` | Context usage as a percentage |
| input_tokens | `45.2k` | Total input tokens in conversation |
| output_tokens | `12.3k` | Total output tokens in conversation |
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
| total_tokens | `200k` | Total context window size |
| Symbol | | Spiegelt den Wert der Option `symbol` |
| style\* | | Mirrors the style from the matching display threshold |
\*: This variable can only be used as a part of a style string
#### Beispiele
**Minimal gauge-only display**
```toml
# ~/.config/starship.toml
[claude_context]
format="[$gauge]($style) "
gauge_width=10
```
**Detailed token information**
```toml
# ~/.config/starship.toml
[claude_context]
format="[$percentage ($input_tokens in / $output_tokens out)]($style) "
```
**Custom gauge symbols**
```toml
# ~/.config/starship.toml
[claude_context]
gauge_full_symbol="▰"
gauge_partial_symbol=""
gauge_empty_symbol="▱"
gauge_width=10
format="[$gauge]($style) "
```
**Custom thresholds**
```toml
# ~/.config/starship.toml
[[claude_context.display]]
threshold=0
style="bold green"
[[claude_context.display]]
threshold=50
style="bold yellow"
[[claude_context.display]]
threshold=75
style="bold orange"
[[claude_context.display]]
threshold=90
style="bold red"
```
### Claude Cost
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
| `disabled` | `false` | Disables the `claude_cost` module. |
##### Display
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
Stil-Zeichenketten sind eine Liste von Wörtern, getrennt durch Leerzeichen. Die Wörter haben keine Groß- und Kleinschreibung (z.B. `bold` und `BoLd` werden als dieselbe Zeichenkette betrachtet). Jedes Wort kann eines der folgenden sein:
## How do I get command completion as shown in the demoGIF?
## Wie bekomme ich die Autovervollständigung, wie sie im Demo-GIF gezeigt wird?
Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions).
Autovervollständigung wird von der Shell deiner Wahl bereitgestellt. In der Demo wurde die [Fish Shell](https://fishshell.com/) benutzt, welche Standardmäßig eine Autovervollständigung beinhaltet. Wenn du die Z Shell (zsh) nutzt, empfehle ich dir, einen Blick auf [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions) zu werfen.
## Do top level `format` and `<module>.disabled` do the same thing?
## Bewirken Top Level `format` und `<module>.disabled` dasselbe?
Ja, beide können benutzt werden, um Module in der Prompt zu deaktivieren. Wenn nur Module deaktiviert werden wollen, sollte `<module>.disabled` benutzt werden, aus den folgenden Gründen:
- Disabling modules is more explicit than omitting them from the top level `format`
- Die Deaktivierung von Modulen ist expliziter, als nur das Weglassen vom Top Level `format`
- Mit der Aktualisierung von Starship werden neu erstellte Module an die Eingabezeile angefügt
## Die Dokumentation sagt, dass die Starship interkompatibel ist. Warum wird meine bevorzugte Shell nicht unterstützt?
@@ -48,9 +48,9 @@ starship prompt --help
Die Eingabeaufforderung verwendet so viel Kontext wie möglich, aber keine Flagge ist "notwendig".
## How do I run Starship on Linux distributions with older versions of glibc?
## Wie führe ich Starship auf Linux-Distributionen mit älteren Versionen von glibc aus?
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with`musl`instead of`glibc`:
Wenn Sie einen Fehler wie "_Version 'GLIBC_2 erhalten.' nicht gefunden (wird von starship benötigt)_" wenn das vorkompilierte Programm verwendet wird (zum Beispiel auf CentOS 6 oder 7), Sie können eine Binärdatei verwenden, die mit `musl`anstelle von`glibc` kompiliert wurde:
```sh
curl -sS https://starship.rs/install.sh | sh -s -- --platform unknown-linux-musl
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](../config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
## I see symbols I don't understand or expect, what do they mean?
## Ich sehe Symbole, die ich nicht verstehe oder erwarte, was bedeuten sie?
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
Wenn du Symbole siehst, die du nicht kennst, kannst du `starship explain` verwenden um die aktuell angezeigten Module erklären zu lassen.
## Starship is doing something unexpected, how can I debug it?
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
Sie können die Debug-Logs aktivieren, indem Sie die `STARSHIP_LOG` Umgebungsvariable verwenden. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
```sh
env STARSHIP_LOG=trace starship module rust
@@ -86,7 +86,7 @@ Finally if you find a bug you can use the `bug-report` command to create a GitHu
starship bug-report
```
## Why don't I see a glyph symbol in my prompt?
## Warum sehe ich in meiner Eingabeaufforderung kein Glyphe-Symbol?
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. Sie müssen sicherstellen, dass:
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
```
Und füge Folgendes am Ende deiner Nushell-Konfiguration hinzu (finde sie, indem du folgenden Befehl in Nushell ausführst `$nu.config-path`):
```sh
use ~/.cache/starship/init.nu
```
Beachte: Nushell wird erst ab v0.78+ unterstützt
Beachte: Nushell wird erst ab v0.96+ unterstützt
</details>
@@ -411,7 +408,7 @@ Falls du Starship weiter anpassen möchtest:
## 🤝 Mitwirken
Wir sind immer auf der Suche nach Helfern **jeder Erfahrungsstufe**! Probleme mit dem Label [„Good first issues“](https://github.com/starship/starship/labels/🌱%20good%20first%20issue) sind der beste Weg, um dich mit dem Projekt vertraut zu machen.
Wir sind immer auf der Suche nach Helfern **jeder Erfahrungsstufe**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
Wenn du eine andere Sprache flüssig sprichts, würden wir uns sehr freuen wenn du helfen würdest die Dokumentation in anderen Sprachen auf dem aktuellsten Stand zu halten. Hier kannst du bei der Übersetzung helfen [Starship Crowdin](https://translate.starship.rs/).
@@ -431,7 +428,16 @@ Schaut euch bitte auch die Projekte an, die die Entstehung von Starship inspirie
Unterstütze dieses Projekt, indem du [ein Sponsor wirst](https://github.com/sponsors/starship). Dein Name und Logo wird hier mit einem Link zu deiner Website erscheinen.
- Free code signing provided by [SignPath.io](https://signpath.io), certificate by [SignPath Foundation](https://signpath.org)
## 🔒 Code Signing Policy
Free code signing provided by [SignPath.io](https://signpath.io), certificate by [SignPath Foundation](https://signpath.org).
- Approvers and Authors: [Mission Control](https://github.com/orgs/starship/teams/mission-control)
This program will not transfer any information to other networked systems unless specifically requested by the user or the person installing or operating it.
Um Starship zu installieren, musst du zwei Dinge tun:
1. Lade die **starship**Datei auf den Computer herunter
1. Weise deine Shell an die Starship Datei als Eingabeaufforderung zu nutzen, indem du eines der Initialisierungs-Skripte benutzt
1. Laden Sie die **starship**Binärdatei auf Ihren Computer herunter
1. Weisen Sie Ihre Shell an, die Starship-Binärdatei als Eingabeaufforderung zu verwenden, indem Sie die Init-Skripte entsprechend anpassen
For most users, the instructions on [the main page](../guide/#🚀-installation) will work great. Für einige speziellere Plattformen wird jedoch eine speziellere Anleitung benötigt.
Für die meisten Benutzer funktionieren die Anweisungen auf [der Hauptseite](../guide/#🚀-installation) hervorragend. Für einige speziellere Plattformen sind jedoch andere Anweisungen erforderlich.
Es gibt sehr viele Plattformen, sodass diese nicht alle in die Hauptanleitung passen, aus diesem Grund sind hier ein paar Installationsanweisungen für ein paar Plattformen von der Community. Ist deine Platform nicht dabei? Dann füge bitte deine hinzu, sobald du herausgefunden hast wie man starship mit dieser benutzt!
Es gibt so viele Plattformen, dass sie nicht alle in die Hauptdatei README.md passten; daher finden Sie hier einige Installationsanweisungen für andere Plattformen aus der Community. Ist Ihre nicht dabei? Bitte fügen Sie es hier hinzu, wenn Sie es herausgefunden haben!
## [Chocolatey](https://chocolatey.org)
### Voraussetzungen
Gehe zur [Chocolatey's Installations-Seite](https://chocolatey.org/install) und folge den Anweisungen um Chocolatey zu installieren.
Gehen Sie zu [Chocolatey Installations-Seite](https://chocolatey.org/install) und folgen Sie den Anweisungen, um Chocolatey zu installieren.
### Installation
@@ -23,23 +23,17 @@ choco install starship
## [termux](https://termux.com)
### Voraussetzungen
```sh
pkg install getconf
```
### Installation
```sh
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /data/data/com.termux/files/usr/bin
pkg install starship
```
## [Funtoo Linux](https://www.funtoo.org/Welcome)
### Installation
Unter Funtoo Linux kann starship von [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) über Portage installiert werden:
Unter Funtoo Linux kann starship aus [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) über Portage installiert werden:
```sh
emerge app-shells/starship
@@ -47,7 +41,7 @@ emerge app-shells/starship
## [Nix](https://wiki.nixos.org/wiki/Nix)
### Das Binary holen
### Abrufen der Binärdatei
#### Imperativ
@@ -78,7 +72,7 @@ Aktiviere das Modul `programs.starship` in deiner `home.nix`-Datei und füge dei
}
```
führe danach folgendes aus
Danach ausführen
```sh
home-manager switch
@@ -86,7 +80,7 @@ home-manager switch
#### Deklarativ, systemweit, mit NixOS
Füge `pkgs.starship` zu der Sektion `environment.systemPackages` in deiner `configuration.nix` hinzu, und führe folgenden Befehl aus
Fügen Sie`pkgs.starship` zu `environment.systemPackages` in Ihrer `configuration.nix` hinzu, danach führen Sie aus
Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization.
Starship v0.45.0 ist ein Release mit bahnbrechenden Änderungen in Vorbereitung auf das große v1.0.0. Wir haben einige wichtige Änderungen vorgenommen, wie die Konfiguration auf der Eingabeaufforderung durchgeführt wird, um einen höheren Grad an Individualisierung zu ermöglichen.
This guide is intended to walk you through the breaking changes.
@@ -10,7 +10,7 @@ Previously to v0.45.0, `prompt_order` would accept an array of module names in t
Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves.
**Example pre-v0.45.0 configuration**
**Beispiel für Pre-v0.45.0 Konfiguration**
```toml
prompt_order=[
@@ -31,7 +31,7 @@ prompt_order = [
]
```
**Example v0.45.0 configuration**
**Beispiel für v0.45.0 Konfiguration**
```toml
format="""\
@@ -58,14 +58,14 @@ Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in ord
Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output.
**Example pre-v0.45.0 configuration**
**Beispiel für Pre-v0.45.0 Konfiguration**
```toml
[cmd_duration]
prefix="took "
```
**Example v0.45.0 configuration**
**Beispiel für v0.45.0 Konfiguration**
```toml
[cmd_duration]
@@ -74,13 +74,13 @@ prefix = "took "
format="took [$duration]($style) "
```
### Affected Modules
### Betroffene Module
#### Zeichen
| Removed Property | Replacement |
| Entfernte Eigenschaft | Ersetzung |
| ----------------------- | ---------------- |
| `symbol` | `success_symbol` |
| `Symbol` | `success_symbol` |
| `use_symbol_for_status` | `error_symbol` |
| `style_success` | `success_symbol` |
| `style_failure` | `error_symbol` |
@@ -113,9 +113,9 @@ _Note:_ The `character` element automatically adds a space after, so unlike the
#### Befehlsdauer
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
| Entfernte Eigenschaft | Ersetzung |
| --------------------- | --------- |
| `prefix`| `format` |
**Änderungen an der Standardkonfiguration**
@@ -127,9 +127,9 @@ _Note:_ The `character` element automatically adds a space after, so unlike the
#### Verzeichnis
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
| Entfernte Eigenschaft | Ersetzung |
| --------------------- | --------- |
| `prefix`| `format` |
**Änderungen an der Standardkonfiguration**
@@ -141,10 +141,10 @@ _Note:_ The `character` element automatically adds a space after, so unlike the
#### Umgebungsvariablen
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
| Entfernte Eigenschaft | Ersetzung |
| --------------------- | --------- |
| `prefix`| `format` |
| `suffix`| `format` |
**Änderungen an der Standardkonfiguration**
@@ -155,12 +155,12 @@ _Note:_ The `character` element automatically adds a space after, so unlike the
++ format = "with [$env_value]($style) "
```
#### GitCommit
#### Git-Commit
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
| Entfernte Eigenschaft | Ersetzung |
| --------------------- | --------- |
| `prefix`| `format` |
| `suffix`| `format` |
**Änderungen an der Standardkonfiguration**
@@ -173,11 +173,11 @@ _Note:_ The `character` element automatically adds a space after, so unlike the
Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊
Hier eine Sammlung von Konfigurations-Presets für Starship, die von der Community eingereicht wurden. Wenn Sie ein Preset zum Teilen haben, bitte [reichen Sie einen PR ein](https://github.com/starship/starship/edit/master/docs/presets/README.md), um diese Datei zu aktualisieren! 😊
To get details on how to use a preset, simply click on the image.
Um weitere Details zur Verwendung eines Presets zu erhalten, klicken Sie einfach auf das Bild.
## [Nerd FontSymbole](./nerd-font.md)
## [Nerd Font-Symbole](./nerd-font.md)
This preset changes the symbols for each module to use Nerd Font symbols.
Dieses Preset ändert die Symbole für jedes Modul, um Nerd Font-Symbole zu verwenden.
[](./nerd-font)
[](./nerd-font)
## [No Nerd Fonts](./no-nerd-font.md)
## [Keine Nerd Fonts](./no-nerd-font.md)
This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt.
Dieses Preset ändert die Symbole für mehrere Module, sodass überall im Prompt No Nerd Font-Symbole verwendet werden.
::: tip
> [!TIPP] Dieses Preset wird in einem zukünftigen Release von Starship zu einem per Default vorgegebenem Preset [werden](https://github.com/starship/starship/pull/3544).
This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544).
:::
[Click to view No Nerd Font preset](./no-nerd-font)
[Klicken Sie hier, um das Preset „No Nerd Font“ anzusehen](./no-nerd-font)
## [Bracketed Segments](./bracketed-segments.md)
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
Dieses Preset ändert das Format aller integrierten Module, um deren Segment in Klammern zu zeigen, anstatt der Verwendung der Standardformulierung ("via", "on", etc.) von Starship.
[](./bracketed-segments)
[](./bracketed-segments)
## [Plain TextSymbols](./plain-text.md)
## [Plain Text-Symbols](./plain-text.md)
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
Dieses Preset ändert die Symbole für jedes Modul in Plain Text. Großartig, wenn Sie keinen Zugriff auf Unicode haben.
[](./plain-text)
[](./plain-text)
## [No Runtime Versions](./no-runtimes.md)
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
Dieses Preset blendet die Version der Sprachlaufzeiten aus. Wenn Sie in Containern oder virtualisierten Umgebungen arbeiten, dann ist dies für Sie!
[](./no-runtimes)
[](./no-runtimes)
## [No Empty Icons](./no-empty-icons.md)
## [Keine leeren Icons](./no-empty-icons.md)
This preset does not show icons if the toolset is not found.
Dieses Preset zeigt keine Icons, wenn das Toolset nicht gefunden wird.
[](./no-empty-icons.md)
[](./no-empty-icons.md)
## [Pure Prompt](./pure-preset.md)
Diese Voreinstellung emuliert das Aussehen und das Verhalten von [Pure](https://github.com/sindresorhus/pure).
Dieses Preset emuliert das Aussehen und Verhalten von [Pure](https://github.com/sindresorhus/pure).
[](./pure-preset)
[](./pure-preset)
## [Pastel Powerline](./pastel-powerline.md)
## [Pastell Powerline](./pastel-powerline.md)
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
Dieses Preset ist inspiriert von [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). Es zeigt außerdem, wie Pfadsubstitution in Starship funktioniert.
[](./pastel-powerline)
[](./pastel-powerline)
## [Tokyo Night](./tokyo-night.md)
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
Dieses Preset ist inspiriert von [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
[](./tokyo-night)
[](./tokyo-night)
## [Gruvbox Rainbow](./gruvbox-rainbow.md)
Diese Voreinstellung ist stark inspiriert von [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
Dieses Preset ist stark inspiriert von [Pastel Powerline](./pastel-powerline.md) und [Tokyo Night](./tokyo-night.md).
[](./gruvbox-rainbow)
[](./gruvbox-rainbow)
## [Jetpack](./jetpack.md)
This is a pseudominimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
Dies ist ein pseudo-minimalistisches Preset, inspiriert von den Prompts [geometry](https://github.com/geometry-zsh/geometry) und [spaceship](https://github.com/spaceship-prompt/spaceship-prompt).
[](./jetpack)
[](./jetpack)
Dieses Preset ist eine minimal modifizierte Version von [Gruvbox Rainbow](./gruvbox-rainbow.md) unter Verwendung der Theme-Palette [Catppuccin](https://github.com/catppuccin/catppuccin).
[](./catppuccin-powerline)
[Zurück zu den Voreinstellungen](./#bracketed-segments)
# Bracketed Segments Preset
# Preset - Bracketed Segments
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
Dieses Preset ändert das Format aller integrierten Module, um deren Segment in Klammern zu zeigen, anstatt der Verwendung der Standardformulierung ("via", "on", etc.) von Starship.


### Konfiguration
@@ -12,6 +12,6 @@ This preset changes the format of all the built-in modules to show their segment
Dieses Preset ist eine minimal modifizierte Version von [Gruvbox Rainbow](./gruvbox-rainbow.md) unter Verwendung der Theme-Palette [Catppuccin](https://github.com/catppuccin/catppuccin).

### Voraussetzungen
- Ein [Nerd Font](https://www.nerdfonts.com/) installiert und aktiviert in Ihrem Terminal
Standardmäßig verwendet dieses Preset die Note „Mocha“ von Catppucin, aber Sie können jede beliebige Note festlegen, indem Sie den Wert von `palette` modifizieren:
-`catppuccin_mocha`
-`catppuccin_frappe`
-`catppuccin_macchiato`
-`catppuccin_latte`
[Klicken, um TOML herunterzuladen](/presets/toml/catppuccin-powerline.toml)
This is a pseudominimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
Dies ist ein pseudo-minimalistisches Preset, inspiriert von den Prompts [geometry](https://github.com/geometry-zsh/geometry) und [spaceship](https://github.com/spaceship-prompt/spaceship-prompt).
> Jetpack uses the terminal's color theme.
> Jetpack verwendet das Farbschema des Terminals.


### Prerequisite
### Voraussetzung
-Requires a shell with [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt) support.
- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) is recommended.
-Erfordert eine Shell mit Unterstützung für [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt).
- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) wird empfohlen.
### Konfiguration
@@ -19,6 +19,6 @@ This is a pseudo minimalist preset inspired by the [geometry](https://github.com
[Zurück zu den Voreinstellungen](./#no-empty-icons)
[Zurück zu Presets](./#no-empty-icons)
# No Empty Icons Preset
# Preset - No Empty Icons
If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its versionnumber, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined.
Wenn Toolset-Dateien identifiziert werden, wird das Toolset-Icon angezeigt. Wenn das Toolset nicht gefunden wird, um dessen Versionsnummer zu bestimmen, wird dies nicht angezeigt. Dieses Preset ändert das Verhalten zum Anzeigen des Icons nur, wenn die Informationen des Toolsets bestimmt werden können.


### Konfiguration
@@ -12,6 +12,6 @@ If toolset files are identified the toolset icon is displayed. If the toolset is
[Zurück zu den Voreinstellungen](./#pastel-powerline)
[Zurück zu Presets](./#pastel-powerline)
# Pastel Powerline Preset
# Preset - Pastel Powerline
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
Dieses Preset ist inspiriert von [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). Es zeigt außerdem, wie Pfadsubstitution in Starship funktioniert.


### Voraussetzungen
-A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Caskaydia Cove Nerd Font)
-Ein [Nerd Font](https://www.nerdfonts.com/) installiert und aktiviert in Ihrem Terminal (das Beispiel verwendet die Caskaydia Cove Nerd Font)
### Konfiguration
@@ -16,6 +16,6 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
Añade lo siguiente al final de `Microsoft.PowerShell_profile.ps1`. Puedes comprobar la ubicación de este archivo consultando la variable `$PROFILE` en PowerShell. Normalmente la ruta es `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` o `~/.config/powershell/Microsoft.PowerShell_profile.ps1` en -Nix.
@@ -136,19 +136,16 @@ onMounted(() => {
#### Elvish
::: warning
> [!WARNING] Only elvish v0.18 or higher is supported.
Sólo se admite elvish v0.18 o superior.
:::
Añade el siguiente código al final de `~/.elvish/rc.elv`:
:
```sh
# ~/.elvish/rc.elv
eval (starship init elvish)
```
For elvish versions prior to v0.21.0 the config file might instead be `~/.elvish/rc.elv`
#### Tcsh
@@ -164,23 +161,13 @@ onMounted(() => {
#### Nushell
::: warning
> [!WARNING] This will change in the future. Sólo se admite Nushell v0.96+.
Esto cambiará en el futuro. Sólo se admite Nushell v0.78+.
:::
Añade lo siguiente al final de tu archivo Nushell env (encuéntralo ejecutando `$nu.env-path` en Nushell):
Agregue lo siguiente al final de su configuración de Nushell (encuéntrelo ejecutando `$nu.config-path` en Nushell):
```sh
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu
```
Añade lo siguiente al final de tu configuración de Nushell (encuéntrala ejecutando `$nu.config-path`):
A pesar de que Starship es una prompt versátil, a veces necesitas hacer más que editar `starhip.toml` para que haga ciertas cosas. Esta página detalla algunas de las técnicas de configuración más avanzadas en Starship.
::: warning
Las configuraciones de esta sección están sujetas a cambios en futuras versiones de Starship.
:::
> [!ADVERTENCIA] Las configuraciones de esta sección están sujetas a cambios en futuras versiones de Starship.
## Prompt Transitoria en PowerShell
@@ -80,21 +76,21 @@ starship init fish | source
enable_transience
```
## TransientPrompt and TransientRightPrompt in Bash
## TransientPrompt y TransientRightPrompt en Bash
The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework at v0.4 or higher allows you to replace the previous-printed prompt with custom strings. Esto es útil en los casos en que la información del prompt no es siempre necesaria. To enable this, put this in `~/.bashrc``bleopt prompt_ps1_transient=<value>`:
El marco estructura [Ble.sh](https://github.com/akinomyoga/ble.sh) en v0.4 o superior le permite reemplazar el mensaje impreso previamente con cadenas personalizadas. Esto es útil en los casos en que la información del prompt no es siempre necesaria. Para habilitar esto, coloque esto en `~/.bashrc``bleopt prompt_ps1_transient=<value>`:
The \<value\> here is a colon-separated list of `always`, `same-dir`and `trim`. When `prompt_ps1_final` is empty and the option `prompt_ps1_transient` has a non-empty \<value\>, the prompt specified by `PS1` is erased on leaving the current command line. If \<value\> contains a field `trim`, only the last line of multiline `PS1`is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field`same-dir`is contained in \<value\> and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient`is ignored.
El \<value\> aquí es una lista separada por dos puntos de `siempre`, `mismo-dir`y `recortar`. Cuando `prompt_ps1_final` está vacío y la opción `prompt_ps1_transient` tiene un \<value\> no vacío, el mensaje especificado por `PS1` se borra al salir de la línea de comando actual. Si \<value\> contiene un campo `trim`, solo se conserva la última línea de la multilínea`PS1`y las demás líneas se borran. De lo contrario, la línea de comando se volverá a dibujar como si se hubiera especificado `PS1=`. Cuando un campo`same-dir`está contenido en \<value\> y el directorio de trabajo actual es diferente del directorio final de la línea de comando anterior, esta opción `prompt_ps1_transient` se ignora.
Make the following changes to your`~/.blerc` (or in `~/.config/blesh/init.sh`) to customize what gets displayed on the left and on the right:
Realice los siguientes cambios en su`~/.blerc` (o en `~/.config/blesh/init.sh`) para personalizar lo que se muestra a la izquierda y a la derecha:
-To customize what the left side of input gets replaced with, configure the`prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do
-Para personalizar con qué se reemplaza el lado izquierdo de la entrada, configure la opción`prompt_ps1_final` de Ble.sh. Por ejemplo, para mostrar el módulo de `personaje` de Starship aquí, harías
-To customize what the right side of input gets replaced with, configure the`prompt_rps1_final` Ble.sh option. Por ejemplo, para mostrar la hora en la que se inició el último comando aquí, lo harías
-Para personalizar con qué se reemplaza el lado derecho de la entrada, configure la opción`prompt_rps1_final` de Ble.sh. Por ejemplo, para mostrar la hora en la que se inició el último comando aquí, lo harías
@@ -225,9 +221,9 @@ Algunos intérpretes de comandos soportan un prompt derecho que se renderiza en
Nota: El prompt derecho es una sola línea siguiendo la ubicación de entrada. Para alinear los módulos arriba de la línea de entrada en un prompt multi-línea, vea el [módulo de `relleno`](../config/#fill).
`right_format`is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash.
`right_format`actualmente es compatible con los siguientes shells: elvish, fish, zsh, xonsh, cmd, nushell, bash.
Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework v0.4 or higher should be installed in order to use right prompt in bash.
Nota: Se debe instalar el framework [Ble.sh](https://github.com/akinomyoga/ble.sh) v0.4 o superior para poder utilizar el indicador correcto en bash.
### Ejemplo
@@ -266,10 +262,320 @@ Nota: Los prompts de continuación solo están disponibles en los siguientes int
```toml
# ~/.config/starship.toml
# A continuation prompt that displays two filled-in arrows
# Un mensaje de continuación que muestra dos flechas rellenas
continuation_prompt='▶▶ '
```
## Statusline for Claude Code
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
### Setup
To use Starship as your Claude Code statusline:
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
```json
{
"statusLine":{
"type":"command",
"command":"starship statusline claude-code"
}
}
```
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
### Overview
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
The profile includes three specialized modules:
-`claude_model`: Displays the current Claude model being used
-`claude_context`: Shows context window usage with a visual gauge
-`claude_cost`: Displays session cost and statistics
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
| `disabled` | `false` | Disables the `claude_context` module. |
##### Display
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
| percentage | `65%` | Context usage as a percentage |
| input_tokens | `45.2k` | Total input tokens in conversation |
| output_tokens | `12.3k` | Total output tokens in conversation |
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
| total_tokens | `200k` | Total context window size |
| symbol | | Refleja el valor de la opción `symbol` |
| style\* | | Mirrors the style from the matching display threshold |
\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
#### Ejemplos
**Minimal gauge-only display**
```toml
# ~/.config/starship.toml
[claude_context]
format="[$gauge]($style) "
gauge_width=10
```
**Detailed token information**
```toml
# ~/.config/starship.toml
[claude_context]
format="[$percentage ($input_tokens in / $output_tokens out)]($style) "
```
**Custom gauge symbols**
```toml
# ~/.config/starship.toml
[claude_context]
gauge_full_symbol="▰"
gauge_partial_symbol=""
gauge_empty_symbol="▱"
gauge_width=10
format="[$gauge]($style) "
```
**Custom thresholds**
```toml
# ~/.config/starship.toml
[[claude_context.display]]
threshold=0
style="bold green"
[[claude_context.display]]
threshold=50
style="bold yellow"
[[claude_context.display]]
threshold=75
style="bold orange"
[[claude_context.display]]
threshold=90
style="bold red"
```
### Claude Cost
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
| `disabled` | `false` | Disables the `claude_cost` module. |
##### Display
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
Las cadenas de estilo son una lista de palabras, separadas por espacios en blanco. Las palabras no son sensibles a mayúsculas (es decir, `bold` y `BoLd` se consideran la misma cadena). Cada palabra puede ser una de las siguientes:
@@ -287,7 +593,7 @@ Las cadenas de estilo son una lista de palabras, separadas por espacios en blanc
-`<color>`
-`ninguno`
donde `<color>` es un especificador de color (discutido a continuación). `fg:<color>` y `<color>` hacen actualmente lo mismo, aunque esto puede cambiar en el futuro. `<color>`can also be set to `prev_fg` or`prev_bg` which evaluates to the previous item's foreground or background color respectively if available or`none`otherwise. `inverted` cambia el fondo y los colores de primer plano. El orden de las palabras en la cadena no importa.
donde `<color>` es un especificador de color (discutido a continuación). `fg:<color>` y `<color>` hacen actualmente lo mismo, aunque esto puede cambiar en el futuro. `<color>`también se puede configurar como `prev_fg` o `prev_bg`, que evalúa el color de primer plano o de fondo del elemento anterior respectivamente si está disponible o `none`en caso contrario. `inverted` cambia el fondo y los colores de primer plano. El orden de las palabras en la cadena no importa.
El token `none` anula todos los demás tokens en una cadena si no es parte de un especificador `bg:`, de modo que por ejemplo `fg:red none fg:blue` creará una cadena sin ningún estilo. `bg:none` establece el fondo al color por defecto, así que `fg:red bg:none` es equivalente a `red` o `fg:red` y `bg:green fg:red bg:none` también es equivalente a `fg:red` o `red`. Puede convertirse en un error usar `none` junto con otros estilos en el futuro.
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.