diff --git a/.dprint.json b/.dprint.json index 429a4563f..bb4f592de 100644 --- a/.dprint.json +++ b/.dprint.json @@ -18,32 +18,16 @@ "**/node_modules", "**/*-lock.json", ".github/*", - "docs/ar-SA/**", - "docs/ckb-IR/**", - "docs/de-DE/**", - "docs/es-ES/**", - "docs/fr-FR/**", - "docs/id-ID/**", - "docs/it-IT/**", - "docs/ja-JP/**", - "docs/ko-KR/**", - "docs/nl-NL/**", - "docs/no-NO/**", - "docs/pl-PL/**", - "docs/pt-BR/**", - "docs/pt-PT/**", - "docs/ru-RU/**", - "docs/tr-TR/**", - "docs/uk-UA/**", - "docs/vi-VN/**", - "docs/zh-CN/**", - "docs/zh-TW/**", + "docs/??-??/**", + "docs/??-???/**", + "docs/???-??/**", + "docs/???-???/**", "target/" ], "plugins": [ - "https://github.com/dprint/dprint-plugin-typescript/releases/download/0.88.1/plugin.wasm", - "https://github.com/dprint/dprint-plugin-json/releases/download/0.17.4/plugin.wasm", - "https://github.com/dprint/dprint-plugin-markdown/releases/download/0.16.2/plugin.wasm", + "https://github.com/dprint/dprint-plugin-typescript/releases/download/0.88.9/plugin.wasm", + "https://github.com/dprint/dprint-plugin-json/releases/download/0.19.1/plugin.wasm", + "https://github.com/dprint/dprint-plugin-markdown/releases/download/0.16.3/plugin.wasm", "https://github.com/dprint/dprint-plugin-toml/releases/download/0.5.4/plugin.wasm" ] } diff --git a/.github/config-schema.json b/.github/config-schema.json index bca26fe82..a4d6e1d92 100644 --- a/.github/config-schema.json +++ b/.github/config-schema.json @@ -361,6 +361,29 @@ } ] }, + "direnv": { + "default": { + "allowed_msg": "allowed", + "denied_msg": "denied", + "detect_extensions": [], + "detect_files": [ + ".envrc" + ], + "detect_folders": [], + "disabled": true, + "format": "[$symbol$loaded/$allowed]($style) ", + "loaded_msg": "loaded", + "not_allowed_msg": "not allowed", + "style": "bold orange", + "symbol": "direnv ", + "unloaded_msg": "not loaded" + }, + "allOf": [ + { + "$ref": "#/definitions/DirenvConfig" + } + ] + }, "docker_context": { "default": { "detect_extensions": [], @@ -1404,7 +1427,7 @@ "Rsx" ], "detect_files": [ - ".Rprofile" + "DESCRIPTION" ], "detect_folders": [ ".Rproj.user" @@ -1678,6 +1701,27 @@ } ] }, + "typst": { + "default": { + "detect_extensions": [ + "typ" + ], + "detect_files": [ + "template.typ" + ], + "detect_folders": [], + "disabled": false, + "format": "via [$symbol($version )]($style)", + "style": "bold #0093A7", + "symbol": "t ", + "version_format": "v${raw}" + }, + "allOf": [ + { + "$ref": "#/definitions/TypstConfig" + } + ] + }, "username": { "default": { "disabled": false, @@ -1801,6 +1845,10 @@ "default": true, "type": "boolean" }, + "follow_symlinks": { + "default": true, + "type": "boolean" + }, "palette": { "type": [ "string", @@ -1829,7 +1877,7 @@ "definitions": { "AwsConfig": { "title": "AWS", - "description": "The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required.\n\nThe module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected.\n\nWhen using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` or `AWS_CREDENTIAL_EXPIRATION` var.\n\nWhen using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.\n\nWhen using [`AWSume`](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var.", + "description": "The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required.\n\nThe module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected.\n\nWhen using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` or `AWS_CREDENTIAL_EXPIRATION` var.\n\nWhen using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.\n\nWhen using [`AWSume`](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var.\n\nWhen using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var.", "type": "object", "properties": { "format": { @@ -2764,6 +2812,71 @@ "Exists" ] }, + "DirenvConfig": { + "type": "object", + "properties": { + "format": { + "default": "[$symbol$loaded/$allowed]($style) ", + "type": "string" + }, + "symbol": { + "default": "direnv ", + "type": "string" + }, + "style": { + "default": "bold orange", + "type": "string" + }, + "disabled": { + "default": true, + "type": "boolean" + }, + "detect_extensions": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "detect_files": { + "default": [ + ".envrc" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "detect_folders": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "allowed_msg": { + "default": "allowed", + "type": "string" + }, + "not_allowed_msg": { + "default": "not allowed", + "type": "string" + }, + "denied_msg": { + "default": "denied", + "type": "string" + }, + "loaded_msg": { + "default": "loaded", + "type": "string" + }, + "unloaded_msg": { + "default": "not loaded", + "type": "string" + } + }, + "additionalProperties": false + }, "DockerContextConfig": { "type": "object", "properties": { @@ -5157,7 +5270,7 @@ }, "detect_files": { "default": [ - ".Rprofile" + "DESCRIPTION" ], "type": "array", "items": { @@ -5368,6 +5481,12 @@ "default": "psh", "type": "string" }, + "pwsh_indicator": { + "type": [ + "string", + "null" + ] + }, "ion_indicator": { "default": "ion", "type": "string" @@ -5787,6 +5906,57 @@ }, "additionalProperties": false }, + "TypstConfig": { + "type": "object", + "properties": { + "format": { + "default": "via [$symbol($version )]($style)", + "type": "string" + }, + "version_format": { + "default": "v${raw}", + "type": "string" + }, + "symbol": { + "default": "t ", + "type": "string" + }, + "style": { + "default": "bold #0093A7", + "type": "string" + }, + "disabled": { + "default": false, + "type": "boolean" + }, + "detect_extensions": { + "default": [ + "typ" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "detect_files": { + "default": [ + "template.typ" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "detect_folders": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, "UsernameConfig": { "type": "object", "properties": { diff --git a/.github/workflows/format-workflow.yml b/.github/workflows/format-workflow.yml index 67b071609..87e79ee88 100644 --- a/.github/workflows/format-workflow.yml +++ b/.github/workflows/format-workflow.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup | Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 - name: Docs | Format uses: dprint/check@v2.2 @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup | Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 - name: Install | Taplo run: cargo install --debug --locked --version 0.8.1 taplo-cli - name: Presets | Validate with schema @@ -35,7 +35,7 @@ jobs: if: ${{ github.event_name == 'pull_request' }} steps: - name: Prevent File Change - uses: xalvarez/prevent-file-change-action@v1.4.0 + uses: xalvarez/prevent-file-change-action@v1.5.1 if: ${{ github.event.pull_request.head.ref != 'i18n_master' }} with: githubToken: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 6391fefee..0aabea0cd 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup | Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 - name: Setup | Node uses: actions/setup-node@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 20ef4ed0b..666bd6d6f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,12 +20,11 @@ jobs: release_created: ${{ steps.release.outputs.release_created }} tag_name: ${{ steps.release.outputs.tag_name }} steps: - - uses: google-github-actions/release-please-action@v3 + - uses: google-github-actions/release-please-action@v4 id: release with: token: ${{ secrets.GITHUB_TOKEN }} release-type: rust - draft: true # Build sources for every OS github_build: @@ -89,7 +88,7 @@ jobs: RUSTFLAGS: ${{ matrix.rustflags || '' }} steps: - name: Setup | Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 - name: Setup | Rust uses: dtolnay/rust-toolchain@master @@ -179,7 +178,7 @@ jobs: STARSHIP_VERSION: ${{ needs.release_please.outputs.tag_name }} steps: - name: Checkout repository - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 with: # Required to include the recently merged Crowdin PR ref: master @@ -215,6 +214,11 @@ jobs: # Add Apple Developer ID credentials to keychain xcrun notarytool store-credentials "$KEYCHAIN_ENTRY" --team-id "$APPLEID_TEAMID" --apple-id "$APPLEID_USERNAME" --password "$APPLEID_PASSWORD" --keychain "$KEYCHAIN_PATH" + - name: Setup | Node + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Notarize | Build docs run: | cd docs @@ -285,7 +289,7 @@ jobs: if: ${{ needs.release_please.outputs.release_created == 'true' }} steps: - name: Setup | Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 - name: Setup | Rust uses: dtolnay/rust-toolchain@stable @@ -330,7 +334,7 @@ jobs: if: ${{ needs.release_please.outputs.release_created == 'true' }} steps: - name: Setup | Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 - name: Setup | Artifacts uses: actions/download-artifact@v3 - run: pwsh ./install/windows/choco/update.ps1 @@ -346,11 +350,11 @@ jobs: continue-on-error: true steps: - name: Setup | Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 - name: Merge | Merge Crowdin PR run: gh pr merge i18n_master --squash --repo=starship/starship env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_PAT }} publish_docs: name: Trigger docs deployment @@ -358,7 +362,7 @@ jobs: needs: merge_crowdin_pr steps: - name: Setup | Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 - name: Trigger workflow dispatch run: gh workflow run publish-docs.yml env: diff --git a/.github/workflows/security-audit.yml b/.github/workflows/security-audit.yml index 33350a7f5..a2e78eefa 100644 --- a/.github/workflows/security-audit.yml +++ b/.github/workflows/security-audit.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Setup | Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 - name: Test | Security Audit uses: EmbarkStudios/cargo-deny-action@v1.5.5 with: diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index 137ce9cad..5bb5b1ef7 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -6,5 +6,5 @@ jobs: name: Spell Check with Typos runs-on: ubuntu-latest steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 - - uses: crate-ci/typos@v1.16.19 + - uses: actions/checkout@v4 + - uses: crate-ci/typos@v1.17.1 diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 715093d4c..72ac94f95 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup | Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 - name: Setup | Rust uses: dtolnay/rust-toolchain@stable @@ -43,7 +43,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Setup | Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 - name: Setup | Rust uses: dtolnay/rust-toolchain@stable @@ -54,7 +54,7 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Build | Lint - uses: giraffate/clippy-action@871cc4173f2594435c7ea6b0bce499cf6c2164a1 + uses: giraffate/clippy-action@94e9bd8deab2618756ec5380f12eb35bcb0a88ca # Ensure that the project could be successfully compiled cargo_check: @@ -62,7 +62,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup | Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 - name: Setup | Rust uses: dtolnay/rust-toolchain@stable @@ -80,7 +80,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup | Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 - name: Setup | Rust uses: dtolnay/rust-toolchain@stable @@ -98,7 +98,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup | Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 - name: Setup | Rust uses: dtolnay/rust-toolchain@stable @@ -120,7 +120,7 @@ jobs: pull-requests: write steps: - name: Setup | Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 - name: Setup | Rust uses: dtolnay/rust-toolchain@stable @@ -132,7 +132,7 @@ jobs: run: cargo run --locked --features config-schema -- config-schema > .github/config-schema.json - name: Check | Detect Changes - uses: reviewdog/action-suggester@v1.8.0 + uses: reviewdog/action-suggester@v1.9.0 with: tool_name: starship config-schema filter_mode: nofilter @@ -156,7 +156,7 @@ jobs: RUSTFLAGS: ${{ matrix.rustflags || '' }} steps: - name: Setup | Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 # Install all the required dependencies for testing - name: Setup | Rust diff --git a/CHANGELOG.md b/CHANGELOG.md index 310ce9f3b..62053bcd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,49 @@ # Changelog +## [1.17.1](https://github.com/starship/starship/compare/v1.17.0...v1.17.1) (2024-01-02) + + +### Bug Fixes + +* v1.17.0 post-release fix-ups ([#5660](https://github.com/starship/starship/issues/5660)) ([89dc192](https://github.com/starship/starship/commit/89dc19214bb671fe50a8f1be79a4594e7998ddea)) + + +### Reverts + +* refactor(modules): use whoami crate to get username ([#5669](https://github.com/starship/starship/issues/5669)) ([a83e107](https://github.com/starship/starship/commit/a83e10776ba37bd1ab439e5e4d0125a06e947728)) + +## [1.17.0](https://github.com/starship/starship/compare/v1.16.0...v1.17.0) (2023-12-28) + + +### Features + +* add additional exit status code meanings from libc ([#5412](https://github.com/starship/starship/issues/5412)) ([81c7d0c](https://github.com/starship/starship/commit/81c7d0cc5805dc10018f0589a6671e1b727a0e9c)) +* add typst module ([7b21705](https://github.com/starship/starship/commit/7b217056bdb8dcb5b328b51fa3b68fe837f9fb3c)) +* **aws:** Adding the AWS SSO CLI env variable to profile list ([#5640](https://github.com/starship/starship/issues/5640)) ([6d96df3](https://github.com/starship/starship/commit/6d96df3c6828161bb9dc922fe45ef35a1ce33771)) +* **direnv:** add new direnv module ([#5157](https://github.com/starship/starship/issues/5157)) ([e47bfba](https://github.com/starship/starship/commit/e47bfbabb9b7d6af12a29db9413a6ec03fba174b)) +* **fossil_metrics:** add fossil_metrics module ([#4874](https://github.com/starship/starship/issues/4874)) ([e867cda](https://github.com/starship/starship/commit/e867cda1eb90ba452768bd2e0738afc2fd0db613)) +* **hostname:** add detect_env_vars as option ([#5196](https://github.com/starship/starship/issues/5196)) ([43b2d42](https://github.com/starship/starship/commit/43b2d42cd526e34c5f0290e7409fbd6d3a54e908)) +* **kubernetes:** Add styling based on current context ([#4550](https://github.com/starship/starship/issues/4550)) ([6b444e0](https://github.com/starship/starship/commit/6b444e05c688f9b871d0fe4624cd5559eba1f95c)) +* R lang packages version, remove .Rprofile from rlang detection ([#5588](https://github.com/starship/starship/issues/5588)) ([5267c46](https://github.com/starship/starship/commit/5267c464eb5e4b23e44cdb7c56919991f4f67ae3)) +* **scanner:** add option not to follow symlinks ([#5325](https://github.com/starship/starship/issues/5325)) ([7b851fc](https://github.com/starship/starship/commit/7b851fc30e109213e911eec38460315872f1ae59)) +* **shell:** allow distinguishing between pwsh and powershell ([#5478](https://github.com/starship/starship/issues/5478)) ([d7a34b4](https://github.com/starship/starship/commit/d7a34b45f88ced63bd79a582c14a6b2f8ebd9544)) + + +### Bug Fixes + +* **bash:** unbound variable error with STARSHIP_PREEXEC_READY ([#5438](https://github.com/starship/starship/issues/5438)) ([8168c21](https://github.com/starship/starship/commit/8168c21293de8118af1e95778b1eee8f26cd6d6a)) +* **docker_context:** ignore unix domain socket path from Docker Context ([#5616](https://github.com/starship/starship/issues/5616)) ([a910e09](https://github.com/starship/starship/commit/a910e094f77ba6d67349a561e5e9780becfe823a)), closes [#5548](https://github.com/starship/starship/issues/5548) +* **git_status:** Avoid printing error on missing stash ref ([#5434](https://github.com/starship/starship/issues/5434)) ([00d3dc8](https://github.com/starship/starship/commit/00d3dc86a21d11aede96f81ffbe49babe487984e)) +* **git:** prevent `core.fsmonitor` from executing external commands ([#3981](https://github.com/starship/starship/issues/3981)) ([03278e4](https://github.com/starship/starship/commit/03278e4de4f540cbd0e346e9df878c7e6798d757)) +* **install:** do not use curl installed through snap ([#5442](https://github.com/starship/starship/issues/5442)) ([0e73817](https://github.com/starship/starship/commit/0e738175c57d5789350b996b69c5713aac03835e)) +* **pastel-powerline:** remove `$path` from docker-context module format string ([#5534](https://github.com/starship/starship/issues/5534)) ([6abc83d](https://github.com/starship/starship/commit/6abc83decdf176842985b4daa5b09771c6b93415)) + + +### Performance Improvements + +* **git_status:** avoid running in bare repos ([#5581](https://github.com/starship/starship/issues/5581)) ([ac4a839](https://github.com/starship/starship/commit/ac4a83910357d69950ca304a3fb41d1d39bc3592)) +* Skip unnecessary indirection in starship init zsh ([#5322](https://github.com/starship/starship/issues/5322)) ([5ca8daa](https://github.com/starship/starship/commit/5ca8daacd4ce936f97170f814a780b34bfaa486e)) + ## [1.16.0](https://github.com/starship/starship/compare/v1.15.0...v1.16.0) (2023-07-30) diff --git a/Cargo.lock b/Cargo.lock index 16d6ca9e5..9be983ab0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,9 +10,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -34,9 +34,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "4cd2405b3ac1faab2990b74d728624cd9fd115651fcecc7c2d8daf01376275ba" dependencies = [ "anstyle", "anstyle-parse", @@ -48,43 +48,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "c9d19de80eff169429ac1e9f48fffb163916b448a44e8e046186232046d9e1f9" [[package]] name = "arc-swap" @@ -104,32 +104,34 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" dependencies = [ - "event-listener", + "event-listener 2.5.3", "futures-core", ] [[package]] name = "async-channel" -version = "1.8.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener 4.0.1", + "event-listener-strategy", "futures-core", + "pin-project-lite", ] [[package]] name = "async-executor" -version = "1.5.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" +checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" dependencies = [ - "async-lock", + "async-lock 3.2.0", "async-task", "concurrent-queue", - "fastrand 1.9.0", - "futures-lite", + "fastrand 2.0.1", + "futures-lite 2.1.0", "slab", ] @@ -139,10 +141,10 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" dependencies = [ - "async-lock", + "async-lock 2.8.0", "autocfg", "blocking", - "futures-lite", + "futures-lite 1.13.0", ] [[package]] @@ -151,80 +153,127 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ - "async-lock", + "async-lock 2.8.0", "autocfg", "cfg-if", "concurrent-queue", - "futures-lite", + "futures-lite 1.13.0", "log", "parking", - "polling", - "rustix 0.37.21", + "polling 2.8.0", + "rustix 0.37.27", "slab", "socket2", "waker-fn", ] [[package]] -name = "async-lock" -version = "2.7.0" +name = "async-io" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +checksum = "6afaa937395a620e33dc6a742c593c01aced20aa376ffb0f628121198578ccc7" dependencies = [ - "event-listener", + "async-lock 3.2.0", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite 2.1.0", + "parking", + "polling 3.3.1", + "rustix 0.38.28", + "slab", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener 2.5.3", +] + +[[package]] +name = "async-lock" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" +dependencies = [ + "event-listener 4.0.1", + "event-listener-strategy", + "pin-project-lite", ] [[package]] name = "async-process" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" dependencies = [ - "async-io", - "async-lock", - "autocfg", + "async-io 1.13.0", + "async-lock 2.8.0", + "async-signal", "blocking", "cfg-if", - "event-listener", - "futures-lite", - "rustix 0.37.21", - "signal-hook 0.3.15", - "windows-sys", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.28", + "windows-sys 0.48.0", ] [[package]] name = "async-recursion" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" +checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.46", +] + +[[package]] +name = "async-signal" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +dependencies = [ + "async-io 2.2.2", + "async-lock 2.8.0", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.28", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", ] [[package]] name = "async-task" -version = "4.4.0" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" +checksum = "e1d90cd0b264dfdd8eb5bad0a2c217c1f88fa96a8573f40e7b12de23fb468f46" [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "fdf6721fb0140e4f897002dd086c06f6c27775df19cfe1fccb21181a48fd2c98" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.46", ] [[package]] name = "atomic-waker" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" @@ -246,9 +295,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "block" @@ -276,28 +325,28 @@ dependencies = [ [[package]] name = "blocking" -version = "1.3.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" +checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ "async-channel", - "async-lock", + "async-lock 3.2.0", "async-task", - "atomic-waker", - "fastrand 1.9.0", - "futures-lite", - "log", + "fastrand 2.0.1", + "futures-io", + "futures-lite 2.1.0", + "piper", + "tracing", ] [[package]] name = "bstr" -version = "1.5.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" +checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" dependencies = [ "memchr", - "once_cell", - "regex-automata 0.1.10", + "regex-automata", "serde", ] @@ -312,27 +361,30 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytesize" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38fcc2979eff34a4b84e1cf9a1e3da42a7d44b3b690a40cdcb23e3d556cfb2e5" +checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -342,23 +394,23 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.30" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd4e7873dbddba6c7c91e199c7fcb946abc4a6a4ac3195400bcfb01b5de877" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets", + "windows-targets 0.48.5", ] [[package]] name = "clap" -version = "4.4.6" +version = "4.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956" +checksum = "58e54881c004cec7895b0068a0a954cd5d62da01aef83fa35b1e594497bf5445" dependencies = [ "clap_builder", "clap_derive", @@ -366,9 +418,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.6" +version = "4.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45" +checksum = "59cb82d7f531603d2fd1f507441cdd35184fa81beff7bd489570de7f773460bb" dependencies = [ "anstream", "anstyle", @@ -380,30 +432,30 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.4.3" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ae8ba90b9d8b007efe66e55e48fb936272f5ca00349b5b0e89877520d35ea7" +checksum = "97aeaa95557bd02f23fbb662f981670c3d20c5a26e69f7354b28f57092437fcd" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.4.2" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.46", ] [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "clru" @@ -428,49 +480,47 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] [[package]] name = "const-random" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368a7a772ead6ce7e1de82bfb04c485f3db8ec744f72925af5735e29a22cc18e" +checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a" dependencies = [ "const-random-macro", - "proc-macro-hack", ] [[package]] name = "const-random-macro" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ "getrandom", "once_cell", - "proc-macro-hack", "tiny-keccak", ] [[package]] name = "const_format" -version = "0.2.31" +version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c990efc7a285731f9a4378d81aff2f0e85a2c8781a05ef0f8baa8dac54d0ff48" +checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" dependencies = [ "const_format_proc_macros", ] [[package]] name = "const_format_proc_macros" -version = "0.2.31" +version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e026b6ce194a874cb9cf32cd5772d1ef9767cc8fcb5765948d74f37a9d8b2bf6" +checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" dependencies = [ "proc-macro2", "quote", @@ -479,9 +529,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -489,15 +539,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] @@ -513,9 +563,9 @@ dependencies = [ [[package]] name = "crossbeam" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c" +checksum = "6eb9105919ca8e40d437fc9cbb8f1975d916f1bd28afe795a48aae32a2cc8920" dependencies = [ "cfg-if", "crossbeam-channel", @@ -527,9 +577,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.8" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +checksum = "82a9b73a36529d9c47029b9fb3a6f0ea3cc916a261195352ba19e770fc1748b2" dependencies = [ "cfg-if", "crossbeam-utils", @@ -537,9 +587,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" dependencies = [ "cfg-if", "crossbeam-epoch", @@ -548,22 +598,20 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.15" +version = "0.9.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +checksum = "0e3681d554572a651dda4186cd47240627c3d0114d45a95f6ad27f2f22e7548d" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.9.0", - "scopeguard", ] [[package]] name = "crossbeam-queue" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +checksum = "adc6598521bb5a83d491e8c1fe51db7296019d2ca3cb93cc6c2a20369a4d78a2" dependencies = [ "cfg-if", "crossbeam-utils", @@ -571,9 +619,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c" dependencies = [ "cfg-if", ] @@ -610,9 +658,12 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +dependencies = [ + "powerfmt", +] [[package]] name = "derivative" @@ -625,12 +676,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "difflib" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" - [[package]] name = "digest" version = "0.9.0" @@ -693,9 +738,9 @@ dependencies = [ [[package]] name = "dlv-list" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d529fd73d344663edfd598ccb3f344e46034db51ebd103518eae34338248ad73" +checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f" dependencies = [ "const-random", ] @@ -714,21 +759,21 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "enumflags2" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" dependencies = [ "enumflags2_derive", "serde", @@ -736,20 +781,20 @@ dependencies = [ [[package]] name = "enumflags2_derive" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.46", ] [[package]] name = "equivalent" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" @@ -764,13 +809,12 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.1" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "errno-dragonfly", "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -790,10 +834,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] -name = "faster-hex" -version = "0.8.0" +name = "event-listener" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9042d281a5eec0f2387f8c3ea6c4514e2cf2732c90a85aaf383b761ee3b290d" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84f2cdcf274580f2d63697192d744727b3198894b1bf02923643bf59e2c26712" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +dependencies = [ + "event-listener 4.0.1", + "pin-project-lite", +] + +[[package]] +name = "faster-hex" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2a2b11eda1d40935b26cf18f6833c526845ae8c41e58d09af6adeb6f0269183" dependencies = [ "serde", ] @@ -809,9 +885,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "filedescriptor" @@ -826,21 +902,21 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.22" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", - "windows-sys", + "redox_syscall", + "windows-sys 0.52.0", ] [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "libz-ng-sys", @@ -848,15 +924,6 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "float-cmp" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" -dependencies = [ - "num-traits", -] - [[package]] name = "fnv" version = "1.0.7" @@ -865,9 +932,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -880,15 +947,15 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" @@ -906,22 +973,35 @@ dependencies = [ ] [[package]] -name = "futures-sink" -version = "0.3.28" +name = "futures-lite" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" +dependencies = [ + "fastrand 2.0.1", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", "futures-io", @@ -950,14 +1030,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" dependencies = [ "libc", - "windows-targets", + "windows-targets 0.48.5", ] [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "libc", @@ -966,9 +1046,9 @@ dependencies = [ [[package]] name = "gix" -version = "0.55.2" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "002667cd1ebb789313d0d0afe3d23b2821cf3b0e91605095f0e6d8751f0ceeea" +checksum = "6dd025382892c7b500a9ce1582cd803f9c2ebfe44aff52e9c7f86feee7ced75e" dependencies = [ "gix-actor", "gix-commitgraph", @@ -1008,9 +1088,9 @@ dependencies = [ [[package]] name = "gix-actor" -version = "0.28.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "948a5f9e43559d16faf583694f1c742eb401ce24ce8e6f2238caedea7486433c" +checksum = "da27b5ab4ab5c75ff891dccd48409f8cc53c28a79480f1efdd33184b2dc1d958" dependencies = [ "bstr", "btoi", @@ -1022,27 +1102,27 @@ dependencies = [ [[package]] name = "gix-bitmap" -version = "0.2.7" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ccab4bc576844ddb51b78d81b4a42d73e6229660fa614dfc3d3999c874d1959" +checksum = "78b6cd0f246180034ddafac9b00a112f19178135b21eb031b3f79355891f7325" dependencies = [ "thiserror", ] [[package]] name = "gix-chunk" -version = "0.4.4" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b42ea64420f7994000130328f3c7a2038f639120518870436d31b8bde704493" +checksum = "003ec6deacf68076a0c157271a127e0bb2c031c1a41f7168cbe5d248d9b85c78" dependencies = [ "thiserror", ] [[package]] name = "gix-commitgraph" -version = "0.22.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8bc78b1a6328fa6d8b3a53b6c73997af37fd6bfc1d6c49f149e63bda5cbb36" +checksum = "8a39c675fd737cb43a2120eddf1aa652c19d76b28d79783a198ac1b398ed9ce6" dependencies = [ "bstr", "gix-chunk", @@ -1054,9 +1134,9 @@ dependencies = [ [[package]] name = "gix-config" -version = "0.31.0" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cae98c6b4c66c09379bc35274b172587d6b0ac369a416c39128ad8c6454f9bb" +checksum = "367304855b369cadcac4ee5fb5a3a20da9378dd7905106141070b79f85241079" dependencies = [ "bstr", "gix-config-value", @@ -1075,11 +1155,11 @@ dependencies = [ [[package]] name = "gix-config-value" -version = "0.14.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea7505b97f4d8e7933e29735a568ba2f86d8de466669d9f0e8321384f9972f47" +checksum = "52e0be46f4cf1f8f9e88d0e3eb7b29718aff23889563249f379119bd1ab6910e" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "bstr", "gix-path", "libc", @@ -1088,9 +1168,9 @@ dependencies = [ [[package]] name = "gix-date" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7df669639582dc7c02737642f76890b03b5544e141caba68a7d6b4eb551e0d" +checksum = "fb7f3dfb72bebe3449b5e642be64e3c6ccbe9821c8b8f19f487cf5bfbbf4067e" dependencies = [ "bstr", "itoa", @@ -1100,10 +1180,11 @@ dependencies = [ [[package]] name = "gix-diff" -version = "0.37.0" +version = "0.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "931394f69fb8c9ed6afc0aae3487bd869e936339bcc13ed8884472af072e0554" +checksum = "fd6a0454f8c42d686f17e7f084057c717c082b7dbb8209729e4e8f26749eb93a" dependencies = [ + "bstr", "gix-hash", "gix-object", "thiserror", @@ -1111,9 +1192,9 @@ dependencies = [ [[package]] name = "gix-discover" -version = "0.26.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a45d5cf0321178883e38705ab2b098f625d609a7d4c391b33ac952eff2c490f2" +checksum = "b8d7b2896edc3d899d28a646ccc6df729827a6600e546570b2783466404a42d6" dependencies = [ "bstr", "dunce", @@ -1126,9 +1207,9 @@ dependencies = [ [[package]] name = "gix-features" -version = "0.36.0" +version = "0.37.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f4365ba17c4f218d7fd9ec102b8d2d3cb0ca200a835e81151ace7778aec827" +checksum = "77a80f0fe688d654c2a741751578b11131071026d1934d03c1820d6d767525ce" dependencies = [ "crc32fast", "crossbeam-channel", @@ -1148,20 +1229,20 @@ dependencies = [ [[package]] name = "gix-fs" -version = "0.8.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd171c0cae97cd0dc57e7b4601cb1ebf596450e263ef3c02be9107272c877bd" +checksum = "7555c23a005537434bbfcb8939694e18cad42602961d0de617f8477cc2adecdd" dependencies = [ "gix-features", ] [[package]] name = "gix-glob" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fac08925dbc14d414bd02eb45ffb4cecd912d1fce3883f867bd0103c192d3e4" +checksum = "ae6232f18b262770e343dcdd461c0011c9b9ae27f0c805e115012aa2b902c1b8" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "bstr", "gix-features", "gix-path", @@ -1169,9 +1250,9 @@ dependencies = [ [[package]] name = "gix-hash" -version = "0.13.1" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1884c7b41ea0875217c1be9ce91322f90bde433e91d374d0e1276073a51ccc60" +checksum = "b0ed89cdc1dce26685c80271c4287077901de3c3dd90234d5fa47c22b2268653" dependencies = [ "faster-hex", "thiserror", @@ -1179,22 +1260,22 @@ dependencies = [ [[package]] name = "gix-hashtable" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "409268480841ad008e81c17ca5a293393fbf9f2b6c2f85b8ab9de1f0c5176a16" +checksum = "ebe47d8c0887f82355e2e9e16b6cecaa4d5e5346a7a474ca78ff94de1db35a5b" dependencies = [ "gix-hash", - "hashbrown 0.14.1", + "hashbrown 0.14.3", "parking_lot", ] [[package]] name = "gix-index" -version = "0.26.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c83a4fcc121b2f2e109088f677f89f85e7a8ebf39e8e6659c0ae54d4283b1650" +checksum = "bd97a226ea6a7669109b84fa045bada556ec925e25145cb458adb4958b023ad0" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "bstr", "btoi", "filetime", @@ -1206,16 +1287,18 @@ dependencies = [ "gix-object", "gix-traverse", "itoa", + "libc", "memmap2", + "rustix 0.38.28", "smallvec", "thiserror", ] [[package]] name = "gix-lock" -version = "11.0.0" +version = "12.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4feb1dcd304fe384ddc22edba9dd56a42b0800032de6537728cea2f033a4f37" +checksum = "f40a439397f1e230b54cf85d52af87e5ea44cc1e7748379785d3f6d03d802b00" dependencies = [ "gix-tempfile", "gix-utils", @@ -1224,20 +1307,20 @@ dependencies = [ [[package]] name = "gix-macros" -version = "0.1.0" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d8acb5ee668d55f0f2d19a320a3f9ef67a6999ad483e11135abcc2464ed18b6" +checksum = "d75e7ab728059f595f6ddc1ad8771b8d6a231971ae493d9d5948ecad366ee8bb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.46", ] [[package]] name = "gix-object" -version = "0.38.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740f2a44267f58770a1cb3a3d01d14e67b089c7136c48d4bddbb3cfd2bf86a51" +checksum = "0c89402e8faa41b49fde348665a8f38589e461036475af43b6b70615a6a313a2" dependencies = [ "bstr", "btoi", @@ -1254,9 +1337,9 @@ dependencies = [ [[package]] name = "gix-odb" -version = "0.54.0" +version = "0.56.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8630b56cb80d8fa684d383dad006a66401ee8314e12fbf0e566ddad8c115143b" +checksum = "46ae6da873de41c6c2b73570e82c571b69df5154dcd8f46dfafc6687767c33b1" dependencies = [ "arc-swap", "gix-date", @@ -1273,9 +1356,9 @@ dependencies = [ [[package]] name = "gix-pack" -version = "0.44.0" +version = "0.46.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1431ba2e30deff1405920693d54ab231c88d7c240dd6ccc936ee223d8f8697c3" +checksum = "782b4d42790a14072d5c400deda9851f5765f50fe72bca6dece0da1cd6f05a9a" dependencies = [ "clru", "gix-chunk", @@ -1294,9 +1377,9 @@ dependencies = [ [[package]] name = "gix-path" -version = "0.10.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a1d370115171e3ae03c5c6d4f7d096f2981a40ddccb98dfd704c773530ba73b" +checksum = "b8dd0998ab245f33d40ca2267e58d542fe54185ebd1dc41923346cf28d179fb6" dependencies = [ "bstr", "gix-trace", @@ -1307,9 +1390,9 @@ dependencies = [ [[package]] name = "gix-quote" -version = "0.4.7" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "475c86a97dd0127ba4465fbb239abac9ea10e68301470c9791a6dd5351cdc905" +checksum = "9f7dc10303d73a960d10fb82f81188b036ac3e6b11b5795b20b1a60b51d1321f" dependencies = [ "bstr", "btoi", @@ -1318,9 +1401,9 @@ dependencies = [ [[package]] name = "gix-ref" -version = "0.38.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ec2f6d07ac88d2fb8007ee3fa3e801856fb9d82e7366ec0ca332eb2c9d74a52" +checksum = "64d9bd1984638d8f3511a2fcbe84fcedb8a5b5d64df677353620572383f42649" dependencies = [ "gix-actor", "gix-date", @@ -1339,9 +1422,9 @@ dependencies = [ [[package]] name = "gix-refspec" -version = "0.19.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccb0974cc41dbdb43a180c7f67aa481e1c1e160fcfa8f4a55291fd1126c1a6e7" +checksum = "be219df5092c1735abb2a53eccdf775e945eea6986ee1b6e7a5896dccc0be704" dependencies = [ "bstr", "gix-hash", @@ -1353,9 +1436,9 @@ dependencies = [ [[package]] name = "gix-revision" -version = "0.23.0" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ca97ac73459a7f3766aa4a5638a6e37d56d4c7962bc1986fbaf4883d0772588" +checksum = "aa78e1df3633bc937d4db15f8dca2abdb1300ca971c0fabcf9fa97e38cf4cd9f" dependencies = [ "bstr", "gix-date", @@ -1369,9 +1452,9 @@ dependencies = [ [[package]] name = "gix-revwalk" -version = "0.9.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a16d8c892e4cd676d86f0265bf9d40cefd73d8d94f86b213b8b77d50e77efae0" +checksum = "702de5fe5c2bbdde80219f3a8b9723eb927466e7ecd187cfd1b45d986408e45f" dependencies = [ "gix-commitgraph", "gix-date", @@ -1384,21 +1467,21 @@ dependencies = [ [[package]] name = "gix-sec" -version = "0.10.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92b9542ac025a8c02ed5d17b3fc031a111a384e859d0be3532ec4d58c40a0f28" +checksum = "78f6dce0c6683e2219e8169aac4b1c29e89540a8262fef7056b31d80d969408c" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "gix-path", "libc", - "windows 0.48.0", + "windows 0.52.0", ] [[package]] name = "gix-tempfile" -version = "11.0.0" +version = "12.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05cc2205cf10d99f70b96e04e16c55d4c7cf33efc151df1f793e29fd12a931f8" +checksum = "a8ef376d718b1f5f119b458e21b00fbf576bc9d4e26f8f383d29f5ffe3ba3eaa" dependencies = [ "gix-fs", "libc", @@ -1409,15 +1492,15 @@ dependencies = [ [[package]] name = "gix-trace" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b6d623a1152c3facb79067d6e2ecdae48130030cf27d6eb21109f13bd7b836" +checksum = "e8e1127ede0475b58f4fe9c0aaa0d9bb0bad2af90bbd93ccd307c8632b863d89" [[package]] name = "gix-traverse" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d050ec7d4e1bb76abf0636cf4104fb915b70e54e3ced9a4427c999100ff38a" +checksum = "cb64213e52e1b726cb04581690c1e98b5910f983b977d5e9f2eb09f1a7fea6d2" dependencies = [ "gix-commitgraph", "gix-date", @@ -1431,9 +1514,9 @@ dependencies = [ [[package]] name = "gix-url" -version = "0.25.1" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1b9ac8ed32ad45f9fc6c5f8c0be2ed911e544a5a19afd62d95d524ebaa95671" +checksum = "8f0f17cceb7552a231d1fec690bc2740c346554e3be6f5d2c41dfa809594dc44" dependencies = [ "bstr", "gix-features", @@ -1445,18 +1528,18 @@ dependencies = [ [[package]] name = "gix-utils" -version = "0.1.5" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b85d89dc728613e26e0ed952a19583744e7f5240fcd4aa30d6c824ffd8b52f0f" +checksum = "de6225e2de30b6e9bca2d9f1cc4731640fcef0fb3cabddceee366e7e85d3e94f" dependencies = [ - "fastrand 2.0.0", + "fastrand 2.0.1", ] [[package]] name = "gix-validate" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e05cab2b03a45b866156e052aa38619f4ece4adcb2f79978bfc249bc3b21b8c5" +checksum = "ac7cc36f496bd5d96cdca0f9289bb684480725d40db60f48194aa7723b883854" dependencies = [ "bstr", "thiserror", @@ -1482,15 +1565,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.13.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" - -[[package]] -name = "hashbrown" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heck" @@ -1500,9 +1577,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -1512,25 +1589,25 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows 0.48.0", + "windows-core 0.51.1", ] [[package]] @@ -1544,9 +1621,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1565,12 +1642,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.1", + "hashbrown 0.14.3", "serde", ] @@ -1591,7 +1668,7 @@ checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ "hermit-abi", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1619,15 +1696,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06d198e9919d9822d5f7083ba8530e04de87841eaf21ead9af8f2304efd57c89" -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.11.0" @@ -1638,16 +1706,25 @@ dependencies = [ ] [[package]] -name = "itoa" -version = "1.0.6" +name = "itertools" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] @@ -1676,15 +1753,26 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" + +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall", +] [[package]] name = "libz-ng-sys" -version = "1.1.9" +version = "1.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2468756f34903b582fe7154dc1ffdebd89d0562c4a43b53c621bb0f1b1043ccb" +checksum = "81157dde2fd4ad2b45ea3a4bb47b8193b52a6346b678840d91d80d3c2cd166c5" dependencies = [ "cmake", "libc", @@ -1692,9 +1780,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.9" +version = "1.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" +checksum = "295c17e837573c8c821dbaeb3cceb3d745ad082f7572191409e69cbc1b3fd050" dependencies = [ "cc", "pkg-config", @@ -1715,15 +1803,15 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.3" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -1750,9 +1838,9 @@ dependencies = [ [[package]] name = "mach2" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0d1830bcd151a6fc4aea1369af235b36c1528fe976b8ff678683c9995eade8" +checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" dependencies = [ "libc", ] @@ -1768,15 +1856,15 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.3" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memmap2" -version = "0.7.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" +checksum = "45fd3a57831bf88bc63f8cebc0cf956116276e97fef3966103e96416209f7c92" dependencies = [ "libc", ] @@ -1822,9 +1910,9 @@ dependencies = [ [[package]] name = "mockall" -version = "0.11.4" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" +checksum = "43766c2b5203b10de348ffe19f7e54564b64f3d6018ff7648d1e2d6d3a0f0a48" dependencies = [ "cfg-if", "downcast", @@ -1837,27 +1925,26 @@ dependencies = [ [[package]] name = "mockall_derive" -version = "0.11.4" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" +checksum = "af7cbce79ec385a1d4f54baa90a76401eb15d9cab93685f62e7e9f942aa00ae2" dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.46", ] [[package]] name = "nix" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.7.1", - "static_assertions", ] [[package]] @@ -1866,7 +1953,7 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "cfg-if", "libc", ] @@ -1891,17 +1978,11 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "normalize-line-endings" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" - [[package]] name = "notify-rust" -version = "4.9.0" +version = "4.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7b75c8958cb2eab3451538b32db8a7b74006abc33eb2e6a9a56d21e4775c2b" +checksum = "827c5edfa80235ded4ab3fe8e9dc619b4f866ef16fe9b1c6b8a7f8692c0f2226" dependencies = [ "log", "mac-notification-sys", @@ -1916,7 +1997,7 @@ version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c073d3c1930d0751774acf49e66653acecb416c3a54c6ec095a9b11caddb5a68" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1932,9 +2013,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] @@ -1979,9 +2060,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -1991,9 +2072,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "open" -version = "5.0.0" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfabf1927dce4d6fdf563d63328a0a506101ced3ec780ca2135747336c98cef8" +checksum = "90878fb664448b54c4e592455ad02831e23a3f7e157374a8b95654731aac7349" dependencies = [ "is-wsl", "libc", @@ -2002,21 +2083,21 @@ dependencies = [ [[package]] name = "ordered-float" -version = "2.10.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87" +checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" dependencies = [ "num-traits", ] [[package]] name = "ordered-multimap" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ed8acf08e98e744e5384c8bc63ceb0364e68a6854187221c18df61c4797690e" +checksum = "a4d6a8c22fc714f0c2373e6091bf6f5e9b37b1bc0b1184874b7e0a4e303d318f" dependencies = [ "dlv-list", - "hashbrown 0.13.2", + "hashbrown 0.14.3", ] [[package]] @@ -2042,9 +2123,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" @@ -2058,15 +2139,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", + "redox_syscall", "smallvec", - "windows-targets", + "windows-targets 0.48.5", ] [[package]] @@ -2093,15 +2174,15 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.4" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c022f1e7b65d6a24c0dbbd5fb344c66881bc01f3e5ae74a1c8100f2f985d98a4" +checksum = "1f200d8d83c44a45b21764d1916299752ca035d15ecd46faca3e9a2a2bf6ad06" dependencies = [ "memchr", "thiserror", @@ -2110,9 +2191,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.4" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35513f630d46400a977c4cb58f78e1bfbe01434316e60c37d27b9ad6139c66d8" +checksum = "bcd6ab1236bbdb3a49027e920e693192ebfe8913f6d60e294de57463a493cfde" dependencies = [ "pest", "pest_generator", @@ -2120,26 +2201,26 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.4" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc9fc1b9e7057baba189b5c626e2d6f40681ae5b6eb064dc7c7834101ec8123a" +checksum = "2a31940305ffc96863a735bef7c7994a00b325a7138fdbc5bda0f1a0476d3275" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.46", ] [[package]] name = "pest_meta" -version = "2.7.4" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df74e9e7ec4053ceb980e7c0c8bd3594e977fde1af91daba9c928e8e8c6708d" +checksum = "a7ff62f5259e53b78d1af898941cdcdccfae7385cf7d793a6e55de5d05bb4b7d" dependencies = [ "once_cell", "pest", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -2182,9 +2263,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2193,10 +2274,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "pkg-config" -version = "0.3.27" +name = "piper" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +dependencies = [ + "atomic-waker", + "fastrand 2.0.1", + "futures-io", +] + +[[package]] +name = "pkg-config" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" [[package]] name = "polling" @@ -2211,9 +2303,29 @@ dependencies = [ "libc", "log", "pin-project-lite", - "windows-sys", + "windows-sys 0.48.0", ] +[[package]] +name = "polling" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" +dependencies = [ + "cfg-if", + "concurrent-queue", + "pin-project-lite", + "rustix 0.38.28", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2222,16 +2334,13 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "predicates" -version = "2.1.5" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" +checksum = "6dfc28575c2e3f19cb3c73b93af36460ae898d426eba6fc15b9bd2a5220758a0" dependencies = [ - "difflib", - "float-cmp", - "itertools 0.10.5", - "normalize-line-endings", + "anstyle", + "itertools 0.11.0", "predicates-core", - "regex", ] [[package]] @@ -2260,17 +2369,11 @@ dependencies = [ "toml_edit 0.19.15", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro2" -version = "1.0.63" +version = "1.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "2de98502f212cfcea8d0bb305bd0f49d7ebdd75b64ba0a68f937d888f4e0d6db" dependencies = [ "unicode-ident", ] @@ -2283,24 +2386,15 @@ checksum = "32e056a69288d0a211f4c74c48391c6eb86e714fdcb9dc58a9f34302da9c20bf" dependencies = [ "crossbeam-channel", "libc", - "signal-hook 0.3.15", - "windows-sys", + "signal-hook 0.3.17", + "windows-sys 0.48.0", ] [[package]] name = "prodash" -version = "26.2.2" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794b5bf8e2d19b53dcdcec3e4bba628e20f5b6062503ba89281fa7037dd7bbcf" - -[[package]] -name = "quick-xml" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bafc859c6815fbaffbbbf4229ecb767ac913fecb27f9ad4343662e9ef099ea" -dependencies = [ - "memchr", -] +checksum = "744a264d26b88a6a7e37cbad97953fa233b94d585236310bcbc88474b4092d79" [[package]] name = "quick-xml" @@ -2312,10 +2406,19 @@ dependencies = [ ] [[package]] -name = "quote" -version = "1.0.29" +name = "quick-xml" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -2372,30 +2475,21 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ "getrandom", - "redox_syscall 0.2.16", + "libredox", "thiserror", ] @@ -2407,16 +2501,10 @@ checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.3", + "regex-automata", "regex-syntax", ] -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" - [[package]] name = "regex-automata" version = "0.4.3" @@ -2436,9 +2524,9 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rust-ini" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e2a3bcec1f113553ef1c88aae6c020a369d03d55b58de9869a0908930385091" +checksum = "3e0698206bcb8882bf2a9ecb4c1e7785db57ff052297085a6efd4fe42302068a" dependencies = [ "cfg-if", "ordered-multimap", @@ -2446,36 +2534,36 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.21" +version = "0.37.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25693a73057a1b4cb56179dd3c7ea21a7c6c5ee7d85781f5749b46f34b79c" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" dependencies = [ "bitflags 1.3.2", - "errno 0.3.1", + "errno 0.3.8", "io-lifetimes", "libc", "linux-raw-sys 0.3.8", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "rustix" -version = "0.38.11" +version = "0.38.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0c3dde1fc030af041adc40e79c0e7fbcf431dd24870053d187d7c66e4b87453" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" dependencies = [ - "bitflags 2.4.0", - "errno 0.3.1", + "bitflags 2.4.1", + "errno 0.3.8", "libc", - "linux-raw-sys 0.4.3", - "windows-sys", + "linux-raw-sys 0.4.12", + "windows-sys 0.52.0", ] [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "same-file" @@ -2488,13 +2576,13 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c" +checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" dependencies = [ "dyn-clone", "indexmap 1.9.3", - "indexmap 2.0.2", + "indexmap 2.1.0", "schemars_derive", "serde", "serde_json", @@ -2502,9 +2590,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c" +checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" dependencies = [ "proc-macro2", "quote", @@ -2514,9 +2602,9 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "semver" @@ -2529,9 +2617,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" [[package]] name = "semver-parser" @@ -2544,22 +2632,22 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.189" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.189" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.46", ] [[package]] @@ -2575,9 +2663,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ "itoa", "ryu", @@ -2586,20 +2674,20 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.12" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" +checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.46", ] [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -2618,9 +2706,9 @@ dependencies = [ [[package]] name = "sha1-asm" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "563d4f7100bc3fce234e5f37bbf63dc2752558964505ba6ac3f7204bdc59eaac" +checksum = "2ba6947745e7f86be3b8af00b7355857085dbdf8901393c89514510eb61f4e21" dependencies = [ "cc", ] @@ -2646,9 +2734,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -2657,9 +2745,9 @@ dependencies = [ [[package]] name = "shadow-rs" -version = "0.24.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9198caff1c94f1a5df6664bddbc379896b51b98a55b0b3fedcb23078fe00c77" +checksum = "878cb1e3162d98ee1016b832efbb683ad6302b462a2894c54f488dc0bd96f11c" dependencies = [ "const_format", "is_debug", @@ -2694,9 +2782,9 @@ dependencies = [ [[package]] name = "signal-hook" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" dependencies = [ "libc", "signal-hook-registry", @@ -2713,30 +2801,30 @@ dependencies = [ [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", @@ -2744,7 +2832,7 @@ dependencies = [ [[package]] name = "starship" -version = "1.16.0" +version = "1.17.1" dependencies = [ "chrono", "clap", @@ -2757,7 +2845,7 @@ dependencies = [ "gix-features", "guess_host_triple", "home", - "indexmap 2.0.2", + "indexmap 2.1.0", "log", "mockall", "nix 0.27.1", @@ -2770,13 +2858,13 @@ dependencies = [ "pest", "pest_derive", "process_control", - "quick-xml 0.30.0", + "quick-xml 0.31.0", "rand", "rayon", "regex", "rust-ini", "schemars", - "semver 1.0.20", + "semver 1.0.21", "serde", "serde_json", "sha1", @@ -2787,8 +2875,8 @@ dependencies = [ "systemstat", "tempfile", "terminal_size", - "toml 0.8.2", - "toml_edit 0.20.2", + "toml 0.8.8", + "toml_edit 0.21.0", "unicode-segmentation", "unicode-width", "urlencoding", @@ -2810,7 +2898,7 @@ dependencies = [ "lazycell", "libc", "mach2", - "nix 0.26.2", + "nix 0.26.4", "num-traits", "uom", "winapi", @@ -2824,9 +2912,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strsim" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "ccbca6f34534eb78dbee83f6b2c9442fea7113f43d9e80ea320f0972ae5dc08d" [[package]] name = "syn" @@ -2841,9 +2929,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.28" +version = "2.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +checksum = "89456b690ff72fddcecf231caedbe615c59480c93358a93dfae7fc29e3ebbf0e" dependencies = [ "proc-macro2", "quote", @@ -2866,25 +2954,25 @@ dependencies = [ [[package]] name = "tauri-winrt-notification" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d70573554e7630c2ca3677ea78d5ae6b030aedee5f9bf33c15d644904fa698" +checksum = "006851c9ccefa3c38a7646b8cec804bb429def3da10497bfa977179869c3e8e2" dependencies = [ - "quick-xml 0.23.1", - "windows 0.39.0", + "quick-xml 0.30.0", + "windows 0.51.1", ] [[package]] name = "tempfile" -version = "3.8.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" +checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" dependencies = [ "cfg-if", - "fastrand 2.0.0", - "redox_syscall 0.3.5", - "rustix 0.38.11", - "windows-sys", + "fastrand 2.0.1", + "redox_syscall", + "rustix 0.38.28", + "windows-sys 0.52.0", ] [[package]] @@ -2893,8 +2981,8 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ - "rustix 0.38.11", - "windows-sys", + "rustix 0.38.28", + "windows-sys 0.48.0", ] [[package]] @@ -2959,34 +3047,35 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.47" +version = "1.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" +checksum = "83a48fd946b02c0a526b2e9481c8e2a17755e47039164a86c4070446e3a4614d" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.47" +version = "1.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" +checksum = "e7fbe9b594d6568a6a1443250a7e67d80b74e1e96f6d1715e1e21cc1888291d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.46", ] [[package]] name = "time" -version = "0.3.25" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" +checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" dependencies = [ "deranged", "itoa", "libc", "num_threads", + "powerfmt", "serde", "time-core", "time-macros", @@ -2994,15 +3083,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.11" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" dependencies = [ "time-core", ] @@ -3042,22 +3131,22 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.2" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.1.0", "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.20.2", + "toml_edit 0.21.0", ] [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] @@ -3068,18 +3157,18 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.1.0", "toml_datetime", "winnow", ] [[package]] name = "toml_edit" -version = "0.20.2" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.1.0", "serde", "serde_spanned", "toml_datetime", @@ -3088,11 +3177,10 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -3100,42 +3188,43 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.46", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", ] [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "uds_windows" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce65604324d3cce9b966701489fbd0cf318cb1f7bd9dd07ac9a4ee6fb791930d" +checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" dependencies = [ + "memoffset 0.9.0", "tempfile", "winapi", ] @@ -3151,30 +3240,30 @@ dependencies = [ [[package]] name = "unicase" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" dependencies = [ "version_check", ] [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" [[package]] name = "unicode-bom" -version = "2.0.2" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98e90c70c9f0d4d1ee6d0a7d04aa06cb9bbd53d8cfbdd62a0269a7c2eb640552" +checksum = "7eec5d1121208364f6793f7d2e222bf75a915c19557537745b195b253dd64217" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -3215,9 +3304,9 @@ dependencies = [ [[package]] name = "url" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -3250,11 +3339,11 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "versions" -version = "5.0.1" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73a36bc44e3039f51fbee93e39f41225f6b17b380eb70cc2aab942df06b34dd" +checksum = "f37ff4899935ba747849dd9eeb27c0bdd0da0210236704b7e4681a6c7bd6f9c6" dependencies = [ - "itertools 0.11.0", + "itertools 0.12.0", "nom 7.1.3", ] @@ -3269,15 +3358,15 @@ dependencies = [ [[package]] name = "waker-fn" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -3291,9 +3380,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3301,24 +3390,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.46", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3326,33 +3415,34 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.46", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "which" -version = "4.4.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +checksum = "9bf3ea8596f3a0dd5980b46430f2058dfe2c36a27ccfbb1845d6fbfcd9ba6e14" dependencies = [ "either", "home", "once_cell", - "rustix 0.38.11", + "rustix 0.38.28", + "windows-sys 0.48.0", ] [[package]] @@ -3373,9 +3463,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -3386,26 +3476,51 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1c4bd0a50ac6020f65184721f758dba47bb9fbc2133df715ec74a237b26794a" -dependencies = [ - "windows_aarch64_msvc 0.39.0", - "windows_i686_gnu 0.39.0", - "windows_i686_msvc 0.39.0", - "windows_x86_64_gnu 0.39.0", - "windows_x86_64_msvc 0.39.0", -] - [[package]] name = "windows" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" +dependencies = [ + "windows-core 0.51.1", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +dependencies = [ + "windows-core 0.52.0", + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.0", ] [[package]] @@ -3414,101 +3529,137 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", ] [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" [[package]] name = "windows_aarch64_msvc" -version = "0.39.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec7711666096bd4096ffa835238905bb33fb87267910e154b18b44eaabb340f2" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" [[package]] name = "windows_i686_gnu" -version = "0.39.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763fc57100a5f7042e3057e7e8d9bdd7860d330070251a73d003563a3bb49e1b" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" [[package]] name = "windows_i686_msvc" -version = "0.39.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc7cbfe58828921e10a9f446fcaaf649204dcfe6c1ddd712c5eebae6bda1106" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" [[package]] name = "windows_x86_64_gnu" -version = "0.39.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6868c165637d653ae1e8dc4d82c25d4f97dd6605eaa8d784b5c6e0ab2a252b65" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" [[package]] name = "windows_x86_64_msvc" -version = "0.39.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4d40883ae9cae962787ca76ba76390ffa29214667a111db9e0a1ad8377e809" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.14" +version = "0.5.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d09770118a7eb1ccaf4a594a221334119a44a814fcb0d31c5b85e83e97227a97" +checksum = "97a4882e6b134d6c28953a387571f1acdd3496830d5e36c5e3a1075580ea641c" dependencies = [ "memchr", ] @@ -3528,7 +3679,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2769203cd13a0c6015d515be729c526d041e9cf2c0cc478d57faee85f40c6dcd" dependencies = [ - "nix 0.26.2", + "nix 0.26.4", "winapi", ] @@ -3550,8 +3701,8 @@ dependencies = [ "async-broadcast", "async-executor", "async-fs", - "async-io", - "async-lock", + "async-io 1.13.0", + "async-lock 2.8.0", "async-process", "async-recursion", "async-task", @@ -3560,12 +3711,12 @@ dependencies = [ "byteorder", "derivative", "enumflags2", - "event-listener", + "event-listener 2.5.3", "futures-core", "futures-sink", "futures-util", "hex", - "nix 0.26.2", + "nix 0.26.4", "once_cell", "ordered-stream", "rand", diff --git a/Cargo.toml b/Cargo.toml index 369fb7fdc..0338a09e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "starship" -version = "1.16.0" +version = "1.17.1" authors = ["Starship Contributors"] build = "build.rs" categories = ["command-line-utilities"] @@ -42,61 +42,61 @@ gix-max-perf = ["gix-features/zlib-ng", "gix/fast-sha1"] gix-faster = ["gix-features/zlib-stock", "gix/fast-sha1"] [dependencies] -chrono = { version = "0.4.30", default-features = false, features = ["clock", "std", "wasmbind"] } -clap = { version = "4.4.6", features = ["derive", "cargo", "unicode"] } -clap_complete = "4.4.3" +chrono = { version = "0.4.31", default-features = false, features = ["clock", "std", "wasmbind"] } +clap = { version = "4.4.16", features = ["derive", "cargo", "unicode"] } +clap_complete = "4.4.6" dirs-next = "2.0.0" dunce = "1.0.4" gethostname = "0.4.3" # default feature restriction addresses https://github.com/starship/starship/issues/4251 -gix = { version = "0.55.2", default-features = false, features = ["max-performance-safe", "revision"] } -gix-features = { version = "0.36.0", optional = true } -indexmap = { version = "2.0.2", features = ["serde"] } +gix = { version = "0.57.1", default-features = false, features = ["max-performance-safe", "revision"] } +gix-features = { version = "0.37.1", optional = true } +indexmap = { version = "2.1.0", features = ["serde"] } log = { version = "0.4.20", features = ["std"] } # notify-rust is optional (on by default) because the crate doesn't currently build for darwin with nix # see: https://github.com/NixOS/nixpkgs/issues/160876 -notify-rust = { version = "4.9.0", optional = true } +notify-rust = { version = "4.10.0", optional = true } nu-ansi-term = "0.49.0" -once_cell = "1.18.0" -open = "5.0.0" +once_cell = "1.19.0" +open = "5.0.1" # update os module config and tests when upgrading os_info os_info = "3.7.0" path-slash = "0.2.1" -pest = "2.7.4" -pest_derive = "2.7.4" -quick-xml = "0.30.0" +pest = "2.7.6" +pest_derive = "2.7.6" +quick-xml = "0.31.0" rand = "0.8.5" rayon = "1.8.0" regex = { version = "1.10.2", default-features = false, features = ["perf", "std", "unicode-perl"] } -rust-ini = "0.19.0" -semver = "1.0.20" -serde = { version = "1.0.189", features = ["derive"] } -serde_json = "1.0.107" +rust-ini = "0.20.0" +semver = "1.0.21" +serde = { version = "1.0.195", features = ["derive"] } +serde_json = "1.0.111" sha1 = "0.10.6" -shadow-rs = { version = "0.24.1", default-features = false } +shadow-rs = { version = "0.26.0", default-features = false } # battery is optional (on by default) because the crate doesn't currently build for Termux # see: https://github.com/svartalf/rust-battery/issues/33 starship-battery = { version = "0.8.2", optional = true } -strsim = "0.10.0" +strsim = "0.10.1" systemstat = "=0.2.3" terminal_size = "0.3.0" -toml = { version = "0.8.2", features = ["preserve_order"] } -toml_edit = "0.20.2" +toml = { version = "0.8.8", features = ["preserve_order"] } +toml_edit = "0.21.0" unicode-segmentation = "1.10.1" unicode-width = "0.1.11" urlencoding = "2.1.3" -versions = "5.0.1" -which = "4.4.2" +versions = "6.1.0" +which = "5.0.0" yaml-rust = "0.4.5" process_control = { version = "4.0.3", features = ["crossbeam-channel"] } guess_host_triple = "0.1.3" -home = "0.5.5" +home = "0.5.9" shell-words = "1.1.0" [dependencies.schemars] -version = "0.8.15" +version = "0.8.16" optional = true features = ["preserve_order", "indexmap2"] @@ -117,15 +117,15 @@ features = [ nix = { version = "0.27.1", default-features = false, features = ["feature", "fs", "user"] } [build-dependencies] -shadow-rs = { version = "0.24.1", default-features = false } +shadow-rs = { version = "0.26.0", default-features = false } dunce = "1.0.4" [target.'cfg(windows)'.build-dependencies] winres = "0.1.12" [dev-dependencies] -mockall = "0.11" -tempfile = "3.8.0" +mockall = "0.12" +tempfile = "3.9.0" [profile.release] codegen-units = 1 diff --git a/README.md b/README.md index 13f7d30e4..2c87fd812 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="Follow @StarshipPrompt on Twitter" /> + Stand With Ukraine

@@ -227,6 +232,7 @@ Alternatively, install Starship using any of the following package managers: | Gentoo | [Gentoo Packages] | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs] | `nix-env -iA nixpkgs.starship` | +| openSUSE | [OSS] | `zypper in starship` | | Void Linux | [Void Linux Packages] | `xbps-install -S starship` | @@ -453,6 +459,7 @@ This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) [homebrew]: https://formulae.brew.sh/formula/starship [macports]: https://ports.macports.org/port/starship [nixpkgs]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix +[OSS]: https://software.opensuse.org/package/starship [pkgsrc]: https://pkgsrc.se/shells/starship [scoop]: https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json [termux]: https://github.com/termux/termux-packages/tree/master/packages/starship diff --git a/docs/.vuepress/public/presets/toml/nerd-font-symbols.toml b/docs/.vuepress/public/presets/toml/nerd-font-symbols.toml index e791d29a5..540a4fc3f 100644 --- a/docs/.vuepress/public/presets/toml/nerd-font-symbols.toml +++ b/docs/.vuepress/public/presets/toml/nerd-font-symbols.toml @@ -10,6 +10,9 @@ symbol = " " [conda] symbol = " " +[crystal] +symbol = " " + [dart] symbol = " " @@ -20,11 +23,14 @@ read_only = " 󰌾" symbol = " " [elixir] -symbol = " " +symbol = " " [elm] symbol = " " +[fennel] +symbol = " " + [fossil_branch] symbol = " " @@ -55,6 +61,9 @@ symbol = " " [julia] symbol = " " +[kotlin] +symbol = " " + [lua] symbol = " " @@ -73,6 +82,9 @@ symbol = " " [nodejs] symbol = " " +[ocaml] +symbol = " " + [os.symbols] Alpaquita = " " Alpine = " " @@ -117,6 +129,12 @@ Windows = "󰍲 " [package] symbol = "󰏗 " +[perl] +symbol = " " + +[php] +symbol = " " + [pijul_channel] symbol = " " @@ -134,3 +152,9 @@ symbol = " " [scala] symbol = " " + +[swift] +symbol = " " + +[zig] +symbol = " " diff --git a/docs/.vuepress/public/presets/toml/no-empty-icons.toml b/docs/.vuepress/public/presets/toml/no-empty-icons.toml index eb94f1a31..8917c0a1a 100644 --- a/docs/.vuepress/public/presets/toml/no-empty-icons.toml +++ b/docs/.vuepress/public/presets/toml/no-empty-icons.toml @@ -108,6 +108,9 @@ format = '(via [$symbol($version )]($style))' [swift] format = '(via [$symbol($version )]($style))' +[typst] +format = '(via [$symbol($version )]($style))' + [vagrant] format = '(via [$symbol($version )]($style))' diff --git a/docs/.vuepress/public/presets/toml/no-nerd-font.toml b/docs/.vuepress/public/presets/toml/no-nerd-font.toml index a34b30443..3c4da2af8 100644 --- a/docs/.vuepress/public/presets/toml/no-nerd-font.toml +++ b/docs/.vuepress/public/presets/toml/no-nerd-font.toml @@ -13,3 +13,6 @@ symbol = "[⬢](bold green) " [pulumi] symbol = "🧊 " + +[typst] +symbol = "t " diff --git a/docs/.vuepress/public/presets/toml/no-runtime-versions.toml b/docs/.vuepress/public/presets/toml/no-runtime-versions.toml index dc5739546..a3ee88c83 100644 --- a/docs/.vuepress/public/presets/toml/no-runtime-versions.toml +++ b/docs/.vuepress/public/presets/toml/no-runtime-versions.toml @@ -109,6 +109,9 @@ format = 'via [$symbol]($style)' [solidity] format = 'via [$symbol]($style)' +[typst] +format = 'via [$symbol]($style)' + [swift] format = 'via [$symbol]($style)' diff --git a/docs/.vuepress/public/presets/toml/pastel-powerline.toml b/docs/.vuepress/public/presets/toml/pastel-powerline.toml index df77c83cb..983acba34 100644 --- a/docs/.vuepress/public/presets/toml/pastel-powerline.toml +++ b/docs/.vuepress/public/presets/toml/pastel-powerline.toml @@ -72,7 +72,7 @@ format = '[ $symbol ($version) ]($style)' [docker_context] symbol = " " style = "bg:#06969A" -format = '[ $symbol $context ]($style) $path' +format = '[ $symbol $context ]($style)' [elixir] symbol = " " diff --git a/docs/.vuepress/public/presets/toml/plain-text-symbols.toml b/docs/.vuepress/public/presets/toml/plain-text-symbols.toml index 32126a014..db0957a14 100644 --- a/docs/.vuepress/public/presets/toml/plain-text-symbols.toml +++ b/docs/.vuepress/public/presets/toml/plain-text-symbols.toml @@ -209,6 +209,9 @@ symbol = "sudo " [swift] symbol = "swift " +[typst] +symbol = "typst " + [terraform] symbol = "terraform " diff --git a/docs/ar-SA/config/README.md b/docs/ar-SA/config/README.md index d0b30c34d..23325dc03 100644 --- a/docs/ar-SA/config/README.md +++ b/docs/ar-SA/config/README.md @@ -206,6 +206,13 @@ This is the list of prompt-wide configuration options. | `add_newline` | `true` | Inserts blank line between shell prompts. | | `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: ### مثال @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### Options | Option | الافتراضي | الوصف | @@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. | | `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | | `style` | `'bold yellow'` | The style for the module. | -| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | +| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu ### Options -| Option | الافتراضي | الوصف | -| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'C '` | The symbol used before displaying the compiler details | -| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | -| `style` | `'bold 149'` | The style for the module. | -| `disabled` | `false` | Disables the `c` module. | +| Option | الافتراضي | الوصف | +| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | +| `style` | `'bold 149'` | The style for the module. | +| `disabled` | `false` | Disables the `c` module. | ### Variables @@ -671,7 +683,7 @@ The character will tell you whether the last command was successful or not. It c By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). -::: warning +::: تحذير `vimcmd_symbol` is only supported in cmd, fish and zsh. `vimcmd_replace_one_symbol`, `vimcmd_replace_symbol`, and `vimcmd_visual_symbol` are only supported in fish due to [upstream issues with mode detection in zsh](https://github.com/starship/starship/issues/625#issuecomment-732454148). @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### Options + +| Option | الافتراضي | الوصف | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | The style for the module. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['.envrc']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Variables + +| Variable | مثال | الوصف | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbol | | Mirrors the value of option `symbol`. | +| style\* | `red bold` | Mirrors the value of option `style`. | + +*: This variable can only be used as a part of a style string + +### مثال + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Docker Context The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). @@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `style` | `'bold green'` | The style for the module. | -| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. | +| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | | `disabled` | `false` | Disables the `fennel` module. | @@ -1524,11 +1577,46 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### Options + +| Option | الافتراضي | الوصف | +| -------------------- | ------------------------------------------------------------ | ------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | +| `added_style` | `'bold green'` | The style for the added count. | +| `deleted_style` | `'bold red'` | The style for the deleted count. | +| `only_nonzero_diffs` | `true` | Render status only for changed items. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### Variables + +| Variable | مثال | الوصف | +| ----------------- | ---- | ------------------------------------------- | +| added | `1` | The current number of added lines | +| deleted | `2` | The current number of deleted lines | +| added_style\* | | Mirrors the value of option `added_style` | +| deleted_style\* | | Mirrors the value of option `deleted_style` | + +*: This variable can only be used as a part of a style string + +### مثال + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. -When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set. +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. ### Options @@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | Option | الافتراضي | الوصف | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol]($style) '` | The format for the module. | -| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `style` | `"yellow bold"` | The style for the module. | +| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | The style for the module. | | `disabled` | `false` | Disables the `guix_shell` module. | ### Variables @@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `["gradle"]` | Which folders should trigger this module. | -| `style` | `"bold bright-cyan"` | The style for the module. | +| `detect_folders` | `['gradle']` | Which folders should trigger this module. | +| `style` | `'bold bright-cyan'` | The style for the module. | | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | Option | الافتراضي | الوصف | | ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. | -| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. | -| `style` | `"bold fg:202"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. | +| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. | +| `style` | `'bold fg:202'` | The style for the module. | | `disabled` | `false` | Disables the `haxe` module. | ### Variables @@ -2107,14 +2195,15 @@ The `hostname` module shows the system hostname. ### Options -| Option | الافتراضي | الوصف | -| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | -| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | -| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation | -| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | -| `style` | `'bold dimmed green'` | The style for the module. | -| `disabled` | `false` | Disables the `hostname` module. | +| Option | الافتراضي | الوصف | +| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | +| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | +| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation. | +| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | +| `style` | `'bold dimmed green'` | The style for the module. | +| `disabled` | `false` | Disables the `hostname` module. | ### Variables @@ -2126,7 +2215,9 @@ The `hostname` module shows the system hostname. *: This variable can only be used as a part of a style string -### مثال +### Examples + +#### Always show the hostname ```toml # ~/.config/starship.toml @@ -2138,6 +2229,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Hide the hostname in remote tmux sessions + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met: @@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc' ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. ::: tip @@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten ### Options +::: تحذير + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + | Option | الافتراضي | الوصف | | ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | | `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | | `style` | `'cyan bold'` | The style for the module. | -| `context_aliases` | `{}` | Table of context aliases to display. | -| `user_aliases` | `{}` | Table of user aliases to display. | +| `context_aliases`* | `{}` | Table of context aliases to display. | +| `user_aliases`* | `{}` | Table of user aliases to display. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | +| `contexts` | `[]` | Customized styles and symbols for specific contexts. | | `disabled` | `true` | Disables the `kubernetes` module. | +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| Variable | الوصف | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `style` | The style for the module when using this context. If not set, will use module's style. | +| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + ### Variables | Variable | مثال | الوصف | @@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Regex Matching +#### Kubernetes Context specific config -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. - -Long and automatically generated cluster names can be identified and shortened using regular expressions: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Line Break @@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_folders` | `['node_modules']` | Which folders should trigger this module. | | `style` | `'bold green'` | The style for the module. | | `disabled` | `false` | Disables the `nodejs` module. | -| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | +| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables @@ -2890,8 +3021,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | الافتراضي | الوصف | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | The format for the module. | -| `style` | `"bold white"` | The style for the module. | +| `format` | `'[$symbol]($style)'` | The format for the module. | +| `style` | `'bold white'` | The style for the module. | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met: | `symbol` | `'🐍 '` | A format string representing the symbol of Python | | `style` | `'yellow bold'` | The style for the module. | | `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `['py']` | Which extensions should trigger this module | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | @@ -3562,22 +3693,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | الافتراضي | الوصف | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `'bsh'` | A format string used to represent bash. | -| `fish_indicator` | `'fsh'` | A format string used to represent fish. | -| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | -| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | -| `ion_indicator` | `'ion'` | A format string used to represent ion. | -| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | -| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | -| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | -| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | -| `nu_indicator` | `'nu'` | A format string used to represent nu. | -| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | -| `format` | `'[$indicator]($style) '` | The format for the module. | -| `style` | `'white bold'` | The style for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | الافتراضي | الوصف | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | The style for the module. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https: | Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables this module. | ### Variables @@ -4009,6 +4141,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +By default, the module will be shown if any of the following conditions are met: + +- The current directory contains a `template.typ` file +- The current directory contains any `*.typ` file + +### Options + +| Option | الافتراضي | الوصف | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | The style for the module. | +| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. | +| `detect_files` | `['template.typ']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `disabled` | `false` | Disables the `daml` module. | + +### Variables + +| Variable | مثال | الوصف | +| ------------- | ----------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `الافتراضي` | The current Typst version | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + ## Username The `username` module shows active user's username. The module will be shown if any of the following conditions are met: diff --git a/docs/ar-SA/faq/README.md b/docs/ar-SA/faq/README.md index 41bb2d391..1f8484406 100644 --- a/docs/ar-SA/faq/README.md +++ b/docs/ar-SA/faq/README.md @@ -120,3 +120,11 @@ If Starship was installed using the install script, the following command will d # Locate and delete the starship binary sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/ar-SA/guide/README.md b/docs/ar-SA/guide/README.md index 9a0e3d0b0..0c51ea347 100644 --- a/docs/ar-SA/guide/README.md +++ b/docs/ar-SA/guide/README.md @@ -20,7 +20,7 @@ Packaging status
تابع @StarshipPrompt على تويتر + Stand With Ukraine

@@ -87,7 +92,7 @@ >Italiano  

-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

-استكشف مستندات Starship  ▶ +تصفّح مستندات Starship  ▶

@@ -229,6 +232,7 @@ curl -sS https://starship.rs/install.sh | sh | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| openSUSE | [OSS](https://software.opensuse.org/package/starship) | `zypper in starship` | | Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | @@ -299,7 +303,7 @@ load(io.popen('starship init cmd'):read("*a"))()
Elvish -أضف ما يلي إلى نهاية `~/.elvish/rc.elv`: +أضف ما يلي إلى نهاية الملف `~/.elvish/rc.elv`: ```sh eval (starship init elvish) diff --git a/docs/ar-SA/presets/README.md b/docs/ar-SA/presets/README.md index 3903bc17a..2e332ad14 100644 --- a/docs/ar-SA/presets/README.md +++ b/docs/ar-SA/presets/README.md @@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). [![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) diff --git a/docs/ar-SA/presets/gruvbox-rainbow.md b/docs/ar-SA/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..798ea8a0b --- /dev/null +++ b/docs/ar-SA/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#gruvbox-rainbow) + +# Gruvbox Rainbow Preset + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png) + +### المتطلبات الأساسية + +- تثبيت [Nerd Font](https://www.nerdfonts.com/) وتمكينه في موجه الأوامر الخاصة بك + +### Configuration + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/ar-SA/presets/jetpack.md b/docs/ar-SA/presets/jetpack.md new file mode 100644 index 000000000..0f52a9a9e --- /dev/null +++ b/docs/ar-SA/presets/jetpack.md @@ -0,0 +1,24 @@ +[Return to Presets](./README.md#jetpack) + +# Jetpack Preset + +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 uses the terminal's color theme. + +![Screenshot of Jetpack preset](/presets/img/jetpack.png) + +### Prerequisite + +- 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. + +### Configuration + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/bn-BD/README.md b/docs/bn-BD/README.md new file mode 100644 index 000000000..7db34ef61 --- /dev/null +++ b/docs/bn-BD/README.md @@ -0,0 +1,188 @@ +--- +home: true +heroImage: /logo.svg +heroText: +tagline: আপনার টার্মিনাল এর জন্য একটি সহজ, প্রচণ্ড দ্রুত এবং অশেষভাবে কাস্টমাইজ করার মতো সুবিধাসম্পন্ন একটি প্রম্প্ট! +actionText: Get Started → +actionLink: ./guide/ +features: + - + title: Compatibility First + details: Works on the most common shells on the most common operating systems. Use it everywhere! + - + title: Rust-Powered + details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible. + - + title: Customizable + details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be. +footer: ISC Licensed | Copyright © 2019-present Starship Contributors +#Used for the description meta tag, for SEO +metaTitle: "Starship: Cross-Shell Prompt" +description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell. +--- + +
+ +
+ +### পূর্বশর্ত + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal. + +### Quick Install + +1. Install the **starship** binary: + + + #### Install Latest Version + + With Shell: + + ```sh + curl -sS https://starship.rs/install.sh | sh + ``` + + To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration. + + + #### Install via Package Manager + + With [Homebrew](https://brew.sh/): + + ```sh + brew install starship + ``` + With [Winget](https://github.com/microsoft/winget-cli): + + ```powershell + winget install starship + ``` + +1. Add the init script to your shell's config file: + + + #### Bash + + `~/.bashrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন: + + ```sh + # ~/.bashrc + + eval "$(starship init bash)" + ``` + + + #### Fish + + `~/.config/fish/config.fish` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন: + + ```sh + # ~/.config/fish/config.fish + + starship init fish | source + ``` + + + #### Zsh + + `~/.zshrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন: + + ```sh + # ~/.zshrc + + eval "$(starship init zsh)" + ``` + + + #### Powershell + + 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. + + ```sh + Invoke-Expression (&starship init powershell) + ``` + + + #### Ion + + `~/.config/ion/initrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন: + + ```sh + # ~/.config/ion/initrc + + eval $(starship init ion) + ``` + + + #### Elvish + + ::: warning + + Only elvish v0.18 or higher is supported. + + ::: + + `~/.elvish/rc.elv` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন: + + ```sh + # ~/.elvish/rc.elv + + eval (starship init elvish) + ``` + + + #### Tcsh + + `~/.tcshrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + + + #### Nushell + + ::: warning + + This will change in the future. Only Nushell v0.78+ is supported. + + ::: + + আপনার Nushell env ফাইলের (Nushell এ `$nu.env-path` কমান্ডটি রান করে ফাইলটি খুঁজে বের করুন) শেষে নিম্নলিখিত লাইনগুলি যোগ করুন: + ```sh + mkdir ~/.cache/starship + starship init nu | save -f ~/.cache/starship/init.nu + ``` + + এরপর আপনার Nushell কনফিগের (Nushell এ `$nu.config-path` কমান্ডটি রান করে ফাইলটি খুঁজে বের করুন) শেষে নিম্নলিখিত লাইনটি যোগ করুন: + + ```sh + use ~/.cache/starship/init.nu + ``` + + + #### Xonsh + + `~/.xonshrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন: + + ```sh + # ~/.xonshrc + + execx($(starship init xonsh)) + ``` + + + #### Cmd + + আপনাকে Cmd এর সাথে [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) ব্যবহার করতে হবে । Add the following to a file `starship.lua` and place this file in Clink scripts directory: + + ```lua + -- starship.lua + + load(io.popen('starship init cmd'):read("*a"))() + ``` diff --git a/docs/bn-BD/advanced-config/README.md b/docs/bn-BD/advanced-config/README.md new file mode 100644 index 000000000..9dc0b4c6b --- /dev/null +++ b/docs/bn-BD/advanced-config/README.md @@ -0,0 +1,284 @@ +# Advanced Configuration + +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. + +::: + +## TransientPrompt in PowerShell + +It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`. + +By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do + +```powershell +function Invoke-Starship-TransientFunction { + &starship module character +} + +Invoke-Expression (&starship init powershell) + +Enable-TransientPrompt +``` + +## TransientPrompt and TransientRightPrompt in Cmd + +Clink 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, run `clink set prompt.transient ` where \ can be one of: + +- `always`: always replace the previous prompt +- `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: + +- 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 + +```lua +function starship_transient_prompt_func(prompt) + return io.popen("starship module character" + .." --keymap="..rl.getvariable('keymap') + ):read("*a") +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 + +```lua +function starship_transient_rprompt_func(prompt) + return io.popen("starship module time"):read("*a") +end +load(io.popen('starship init cmd'):read("*a"))() +``` + +## TransientPrompt and TransientRightPrompt in Fish + +It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `enable_transience` in the shell session. To make it permanent, put this statement in your `~/.config/fish/config.fish`. Transience can be disabled on-the-fly with `disable_transience`. + +Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct. + +- By default, the left side of input gets replaced with a bold-green `❯`. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do + +```fish +function starship_transient_prompt_func + starship module character +end +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 + +```fish +function starship_transient_rprompt_func + starship module time +end +starship init fish | source +enable_transience +``` + +## Custom pre-prompt and pre-execution Commands in Cmd + +Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: + +- To run a custom function right before the prompt is drawn, define a new function called `starship_preprompt_user_func`. This function receives the current prompt as a string that you can utilize. For example, to draw a rocket before the prompt, you would do + +```lua +function starship_preprompt_user_func(prompt) + print("🚀") +end + +load(io.popen('starship init cmd'):read("*a"))() +``` + +- To run a custom function right before a command is executed, define a new function called `starship_precmd_user_func`. This function receives the current commandline as a string that you can utilize. For example, to print the command that's about to be executed, you would do + +```lua +function starship_precmd_user_func(line) + print("Executing: "..line) +end + +load(io.popen('starship init cmd'):read("*a"))() +``` + +## Custom pre-prompt and pre-execution Commands in Bash + +Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure: + +- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do + +```bash +function blastoff(){ + echo "🚀" +} +starship_precmd_user_func="blastoff" +``` + +- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. + +```bash +function blastoff(){ + echo "🚀" +} +trap blastoff DEBUG # Trap DEBUG *before* running starship +set -o functrace +eval $(starship init bash) +set +o functrace +``` + +## Custom pre-prompt and pre-execution Commands in PowerShell + +PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure: + +Create a function named `Invoke-Starship-PreCommand` + +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") +} +``` + +## Change Window Title + +Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. + +First, define a window title change function (identical in bash and zsh): + +```bash +function set_win_title(){ + echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007" +} +``` + +You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). + +In `bash`, set this function to be the precmd starship function: + +```bash +starship_precmd_user_func="set_win_title" +``` + +In `zsh`, add this to the `precmd_functions` array: + +```bash +precmd_functions+=(set_win_title) +``` + +If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. + +For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: + +```bash +function set_win_title(){ + echo -ne "\033]0; $(basename "$PWD") \007" +} +starship_precmd_user_func="set_win_title" +``` + +For Cmd, you can change the window title using the `starship_preprompt_user_func` function. + +```lua +function starship_preprompt_user_func(prompt) + console.settitle(os.getenv('USERNAME').."@"..os.getenv('COMPUTERNAME')..": "..os.getcwd()) +end + +load(io.popen('starship init cmd'):read("*a"))() +``` + +You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. + +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" +} + +Invoke-Expression (&starship init powershell) +``` + +## Enable Right Prompt + +Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. + +Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill). + +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. + +### Example + +```toml +# ~/.config/starship.toml + +# A minimal left prompt +format = """$character""" + +# move the rest of the prompt to the right +right_format = """$all""" +``` + +Produces a prompt like the following: + +``` +▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s +``` + +## 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). + +Starship can set the continuation prompt using the `continuation_prompt` option. The default prompt is `'[∙](bright-black) '`. + +Note: `continuation_prompt` should be set to a literal string without any variables. + +Note: Continuation prompts are only available in the following shells: + +- `bash` +- `zsh` +- `PowerShell` + +### Example + +```toml +# ~/.config/starship.toml + +# A continuation prompt that displays two filled in arrows +continuation_prompt = '▶▶ ' +``` + +## Style Strings + +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: + +- `bold` +- `italic` +- `underline` +- `dimmed` +- `inverted` +- `blink` +- `hidden` +- `strikethrough` +- `bg:` +- `fg:` +- `` +- `none` + +where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. + +The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. + +A color specifier can be one of the following: + +- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). +- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). + +If multiple colors are specified for foreground/background, the last one in the string will take priority. + +Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: + +- Many terminals disable support for `blink` by default +- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `strikethrough` is not supported by the default macOS Terminal.app diff --git a/docs/bn-BD/config/README.md b/docs/bn-BD/config/README.md new file mode 100644 index 000000000..dccdabf20 --- /dev/null +++ b/docs/bn-BD/config/README.md @@ -0,0 +1,4484 @@ +# Configuration + +To get started configuring starship, create the following file: `~/.config/starship.toml`. + +```sh +mkdir -p ~/.config && touch ~/.config/starship.toml +``` + +All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file: + +```toml +# Get editor completions based on the config schema +"$schema" = 'https://starship.rs/config-schema.json' + +# Inserts a blank line between shell prompts +add_newline = true + +# Replace the '❯' symbol in the prompt with '➜' +[character] # The name of the module we are configuring is 'character' +success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green' + +# Disable the package module, hiding it from the prompt completely +[package] +disabled = true +``` + +### Config File Location + +You can change default configuration file location with `STARSHIP_CONFIG` environment variable: + +```sh +export STARSHIP_CONFIG=~/example/non/default/path/starship.toml +``` + +Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: + +```powershell +$ENV:STARSHIP_CONFIG = "$HOME\example\non\default\path\starship.toml" +``` + +Or for Cmd (Windows) would be adding this line to your `starship.lua`: + +```lua +os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\starship.toml') +``` + +### Logging + +By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to an instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable: + +```sh +export STARSHIP_CACHE=~/.starship/cache +``` + +Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: + +```powershell +$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" +``` + +Or for Cmd (Windows) would be adding this line to your `starship.lua`: + +```lua +os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') +``` + +### Terminology + +**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of Node.js that is currently installed on your computer, if your current directory is a Node.js project. + +**Variable**: Smaller sub-components that contain information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of Node.js. + +By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. + +### Strings + +In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. + +The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. + +| Symbol | Type | Notes | +| ------ | ------------------------- | ------------------------------------------------------ | +| `'` | literal string | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | + +For example: + +```toml +# literal string +format = '☺\☻ ' + +# regular string +format = "☺\\☻ " + +# escaping Starship symbols +format = '\[\$\] ' +``` + +When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: + +```toml +# with literal string +format = ''' + +\$''' + +# with multiline basic string +format = """ + +\\$""" + +# with basic string +format = "\n\\$" +``` + +In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. + +```toml +format = """ +line1\ +line1\ +line1 +line2\ +line2\ +line2 +""" +``` + +### Format Strings + +Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. + +#### Variable + +A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`. + +For example: + +- `'$version'` is a format string with a variable named `version`. +- `'$git_branch$git_commit'` is a format string with two variables named `git_branch` and `git_commit`. +- `'$git_branch $git_commit'` has the two variables separated with a space. + +#### Text Group + +A text group is made up of two different parts. + +The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. + +In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part. + +For example: + +- `'[on](red bold)'` will print a string `on` with bold text colored red. +- `'[⌘ $version](bold green)'` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green. +- `'[a [b](red) c](green)'` will print `a b c` with `b` red, and `a` and `c` green. + +#### Style Strings + +Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). + +- `'fg:green bg:blue'` sets green text on a blue background +- `'bg:blue fg:bright-green'` sets bright green text on a blue background +- `'bold fg:27'` sets bold text with [ANSI color](https://i.stack.imgur.com/KTSQa.png) 27 +- `'underline bg:#bf5700'` sets underlined text on a burnt orange background +- `'bold italic fg:purple'` sets bold italic purple text +- `''` explicitly disables all styling + +Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. + +#### Conditional Format Strings + +A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. + +For example: + +- `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. +- `'(some text)'` will always show nothing since there are no variables wrapped in the braces. +- When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. + +### Negative matching + +Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. + +Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. + +To see how this works in practice, you could match TypeScript but not MPEG Transport Stream files thus: + +```toml +detect_extensions = ['ts', '!video.ts', '!audio.ts'] +``` + +## Prompt + +This is the list of prompt-wide configuration options. + +### Options + +| Option | Default | Description | +| ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `format` | [link](#default-prompt-format) | Configure the format of the prompt. | +| `right_format` | `''` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | +| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | +| `add_newline` | `true` | Inserts blank line between shell prompts. | +| `palette` | `''` | Sets which color palette from `palettes` to use. | +| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: + +### Example + +```toml +# ~/.config/starship.toml + +# Use custom format +format = ''' +[┌───────────────────>](bold green) +[│](bold green)$directory$rust$package +[└─>](bold green) ''' + +# Wait 10 milliseconds for starship to check files under the current directory. +scan_timeout = 10 + +# Disable the blank line at the start of the prompt +add_newline = false + +# Set 'foo' as custom color palette +palette = 'foo' + +# Define custom colors +[palettes.foo] +# Overwrite existing color +blue = '21' +# Define new color +mustard = '#af8700' +``` + +### Default Prompt Format + +The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown: + +```toml +format = '$all' + +# Which is equivalent to +format = """ +$username\ +$hostname\ +$localip\ +$shlvl\ +$singularity\ +$kubernetes\ +$directory\ +$vcsh\ +$fossil_branch\ +$fossil_metrics\ +$git_branch\ +$git_commit\ +$git_state\ +$git_metrics\ +$git_status\ +$hg_branch\ +$pijul_channel\ +$docker_context\ +$package\ +$c\ +$cmake\ +$cobol\ +$daml\ +$dart\ +$deno\ +$dotnet\ +$elixir\ +$elm\ +$erlang\ +$fennel\ +$golang\ +$guix_shell\ +$haskell\ +$haxe\ +$helm\ +$java\ +$julia\ +$kotlin\ +$gradle\ +$lua\ +$nim\ +$nodejs\ +$ocaml\ +$opa\ +$perl\ +$php\ +$pulumi\ +$purescript\ +$python\ +$raku\ +$rlang\ +$red\ +$ruby\ +$rust\ +$scala\ +$solidity\ +$swift\ +$terraform\ +$typst\ +$vlang\ +$vagrant\ +$zig\ +$buf\ +$nix_shell\ +$conda\ +$meson\ +$spack\ +$memory_usage\ +$aws\ +$gcloud\ +$openstack\ +$azure\ +$direnv\ +$env_var\ +$crystal\ +$custom\ +$sudo\ +$cmd_duration\ +$line_break\ +$jobs\ +$battery\ +$time\ +$status\ +$os\ +$container\ +$shell\ +$character""" +``` + +If you just want to extend the default format, you can use `$all`; modules you explicitly add to the format will not be duplicated. Eg. + +```toml +# Move the directory to the second line +format = '$all$directory$character' +``` + +## AWS + +The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required. + +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. + +When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. + +When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. + +When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. + +When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. + +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + +### Options + +| Option | Default | Description | +| ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | The format for the module. | +| `symbol` | `'☁️ '` | The symbol used before displaying the current AWS profile. | +| `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. | +| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | +| `style` | `'bold yellow'` | The style for the module. | +| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. | +| `disabled` | `false` | Disables the `AWS` module. | +| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------------- | +| region | `ap-northeast-1` | The current AWS region | +| profile | `astronauts` | The current AWS profile | +| duration | `2h27m20s` | The temporary credentials validity duration | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Examples + +#### Display everything + +```toml +# ~/.config/starship.toml + +[aws] +format = 'on [$symbol($profile )(\($region\) )]($style)' +style = 'bold blue' +symbol = '🅰 ' +[aws.region_aliases] +ap-southeast-2 = 'au' +us-east-1 = 'va' +[aws.profile_aliases] +CompanyGroupFrobozzOnCallAccess = 'Frobozz' +``` + +#### Display region + +```toml +# ~/.config/starship.toml + +[aws] +format = 'on [$symbol$region]($style) ' +style = 'bold blue' +symbol = '🅰 ' +[aws.region_aliases] +ap-southeast-2 = 'au' +us-east-1 = 'va' +``` + +#### Display profile + +```toml +# ~/.config/starship.toml + +[aws] +format = 'on [$symbol$profile]($style) ' +style = 'bold blue' +symbol = '🅰 ' +[aws.profile_aliases] +Enterprise_Naming_Scheme-voidstars = 'void**' +``` + +## Azure + +The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. + +### Options + +| Variable | Default | Description | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'󰠅 '` | The symbol used in the format. | +| `style` | `'blue bold'` | The style used in the format. | +| `disabled` | `true` | Disables the `azure` module. | +| `subscription_aliases` | `{}` | Table of subscription name aliases to display in addition to Azure subscription name. | + +### Examples + +#### Display Subscription Name + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = 'on [$symbol($subscription)]($style) ' +symbol = '󰠅 ' +style = 'blue bold' +``` + +#### Display Username + +```toml +# ~/.config/starship.toml + +[azure] +disabled = false +format = "on [$symbol($username)]($style) " +symbol = "󰠅 " +style = "blue bold" +``` + +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + +## Battery + +The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. + +### Options + +| Option | Default | Description | +| -------------------- | --------------------------------- | --------------------------------------------------- | +| `full_symbol` | `'󰁹 '` | The symbol shown when the battery is full. | +| `charging_symbol` | `'󰂄 '` | The symbol shown when the battery is charging. | +| `discharging_symbol` | `'󰂃 '` | The symbol shown when the battery is discharging. | +| `unknown_symbol` | `'󰁽 '` | The symbol shown when the battery state is unknown. | +| `empty_symbol` | `'󰂎 '` | The symbol shown when the battery state is empty. | +| `format` | `'[$symbol$percentage]($style) '` | The format for the module. | +| `display` | [link](#battery-display) | Display threshold and style for the module. | +| `disabled` | `false` | Disables the `battery` module. | + +### Example + +```toml +# ~/.config/starship.toml + +[battery] +full_symbol = '🔋 ' +charging_symbol = '⚡️ ' +discharging_symbol = '💀 ' +``` + +### Battery Display + +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown: + +```toml +[[battery.display]] +threshold = 10 +style = 'bold red' +``` + +The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. + +#### Options + +The `display` option is an array of the following table. + +| Option | Default | Description | +| -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | +| `threshold` | `10` | The upper bound for the display option. | +| `style` | `'red bold'` | The style used if the display option is in use. | +| `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. | +| `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. | + +#### Example + +```toml +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% +threshold = 10 +style = 'bold red' + +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% +threshold = 30 +style = 'bold yellow' +discharging_symbol = '💦' + +# when capacity is over 30%, the battery indicator will not be displayed +``` + +## Buf + +The `buf` module shows the currently installed version of [Buf](https://buf.build). By default, the module is shown if all of the following conditions are met: + +- The [`buf`](https://github.com/bufbuild/buf) CLI is installed. +- The current directory contains a [`buf.yaml`](https://docs.buf.build/configuration/v1/buf-yaml), [`buf.gen.yaml`](https://docs.buf.build/configuration/v1/buf-gen-yaml), or [`buf.work.yaml`](https://docs.buf.build/configuration/v1/buf-work-yaml) configuration file. + +### Options + +| Option | Default | Description | +| ------------------- | ----------------------------------------------- | ----------------------------------------------------- | +| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | +| `version_format` | `'v${raw}'` | The version format. | +| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `style` | `'bold blue'` | The style for the module. | +| `disabled` | `false` | Disables the `elixir` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| `version` | `v1.0.0` | The version of `buf` | +| `symbol` | | Mirrors the value of option `symbol` | +| `style`* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[buf] +symbol = '🦬 ' +``` + +## Bun + +The `bun` module shows the currently installed version of the [bun](https://bun.sh) JavaScript runtime. By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `bun.lockb` file +- The current directory contains a `bunfig.toml` file + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold red'` | The style for the module. | +| `disabled` | `false` | Disables the `bun` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v0.1.4` | The version of `bun` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[bun] +format = 'via [🍔 $version](bold green) ' +``` + +## C + +The `c` module shows some information about your C compiler. By default the module will be shown if the current directory contains a `.c` or `.h` file. + +### Options + +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | +| `style` | `'bold 149'` | The style for the module. | +| `disabled` | `false` | Disables the `c` module. | + +### Variables + +| Variable | Example | Description | +| -------- | ------- | ------------------------------------ | +| name | clang | The name of the compiler | +| version | 13.0.0 | The version of the compiler | +| symbol | | Mirrors the value of option `symbol` | +| style | | Mirrors the value of option `style` | + +NB that `version` is not in the default format. + +### Commands + +The `commands` option accepts a list of commands to determine the compiler version and name. + +Each command is represented as a list of the executable name, followed by its arguments, usually something like `['mycc', '--version']`. Starship will try executing each command until it gets a result on STDOUT. + +If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/). + +### Example + +```toml +# ~/.config/starship.toml + +[c] +format = 'via [$name $version]($style)' +``` + +## Character + +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. + +The character will tell you whether the last command was successful or not. It can do this in two ways: + +- changing color (`red`/`green`) +- changing shape (`❯`/`✖`) + +By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). + +::: warning + +`vimcmd_symbol` is only supported in cmd, fish and zsh. `vimcmd_replace_one_symbol`, `vimcmd_replace_symbol`, and `vimcmd_visual_symbol` are only supported in fish due to [upstream issues with mode detection in zsh](https://github.com/starship/starship/issues/625#issuecomment-732454148). + +::: + +### Options + +| Option | Default | Description | +| --------------------------- | -------------------- | --------------------------------------------------------------------------------------- | +| `format` | `'$symbol '` | The format string used before the text input. | +| `success_symbol` | `'[❯](bold green)'` | The format string used before the text input if the previous command succeeded. | +| `error_symbol` | `'[❯](bold red)'` | The format string used before the text input if the previous command failed. | +| `vimcmd_symbol` | `'[❮](bold green)'` | The format string used before the text input if the shell is in vim normal mode. | +| `vimcmd_replace_one_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim `replace_one` mode. | +| `vimcmd_replace_symbol` | `'[❮](bold purple)'` | The format string used before the text input if the shell is in vim replace mode. | +| `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | +| `disabled` | `false` | Disables the `character` module. | + +### Variables + +| Variable | Example | Description | +| -------- | ------- | -------------------------------------------------------------------------------------------------------- | +| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. | + +### Examples + +#### With custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = '[➜](bold green) ' +error_symbol = '[✗](bold red) ' +``` + +#### Without custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = '[➜](bold green) ' +error_symbol = '[➜](bold red) ' +``` + +#### With custom vim shape + +```toml +# ~/.config/starship.toml + +[character] +vimcmd_symbol = '[V](bold green) ' +``` + +## CMake + +The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met: + +- The current directory contains a `CMakeLists.txt` file +- The current directory contains a `CMakeCache.txt` file + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'△ '` | The symbol used before the version of cmake. | +| `detect_extensions` | `[]` | Which extensions should trigger this module | +| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Which filenames should trigger this module | +| `detect_folders` | `[]` | Which folders should trigger this module | +| `style` | `'bold blue'` | The style for the module. | +| `disabled` | `false` | Disables the `cmake` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v3.17.3` | The version of cmake | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +## COBOL / GNUCOBOL + +The `cobol` module shows the currently installed version of COBOL. By default, the module will be shown if any of the following conditions are met: + +- The current directory contains any files ending in `.cob` or `.COB` +- The current directory contains any files ending in `.cbl` or `.CBL` + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold blue'` | The style for the module. | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `disabled` | `false` | Disables the `cobol` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v3.1.2.0` | The version of `cobol` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +## Command Duration + +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. + +::: warning Do not hook the DEBUG trap in Bash + +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. + +::: + +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. + +### Options + +| Option | Default | Description | +| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `'took [$duration]($style) '` | The format for the module. | +| `style` | `'bold yellow'` | The style for the module. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | +| `notification_timeout` | | Duration to show notification for (in milliseconds). If unset, notification timeout will be determined by daemon. Not all notification daemons honor this option. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | --------------------------------------- | +| duration | `16m40s` | The time it took to execute the command | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[cmd_duration] +min_time = 500 +format = 'underwent [$duration](bold yellow)' +``` + +## Conda + +The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set. + +::: tip + +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. + +::: + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | +| `symbol` | `'🅒 '` | The symbol used before the environment name. | +| `style` | `'bold green'` | The style for the module. | +| `format` | `'via [$symbol$environment]($style) '` | The format for the module. | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Disables the `conda` module. | + +### Variables + +| Variable | Example | Description | +| ----------- | ------------ | ------------------------------------ | +| environment | `astronauts` | The current conda environment | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[conda] +format = '[$symbol$environment](dimmed green) ' +``` + +## Container + +The `container` module displays a symbol and container name, if inside a container. + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | ----------------------------------------- | +| `symbol` | `'⬢'` | The symbol shown, when inside a container | +| `style` | `'bold red dimmed'` | The style for the module. | +| `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. | +| `disabled` | `false` | Disables the `container` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------------- | ------------------------------------ | +| name | `fedora-toolbox:35` | The name of the container | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[container] +format = '[$symbol \[$name\]]($style) ' +``` + +## Crystal + +The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `shard.yml` file +- The current directory contains a `.cr` file + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `symbol` | `'🔮 '` | The symbol used before displaying the version of crystal. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold red'` | The style for the module. | +| `detect_extensions` | `['cr']` | Which extensions should trigger this module. | +| `detect_files` | `['shard.yml']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `disabled` | `false` | Disables the `crystal` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.32.1` | The version of `crystal` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[crystal] +format = 'via [✨ $version](bold blue) ' +``` + +## Daml + +The `daml` module shows the currently used [Daml](https://www.digitalasset.com/developers) SDK version when you are in the root directory of your Daml project. The `sdk-version` in the `daml.yaml` file will be used, unless it's overridden by the `DAML_SDK_VERSION` environment variable. By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `daml.yaml` file + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | The style for the module. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['daml.yaml']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `disabled` | `false` | Disables the `daml` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.2.0` | The version of `daml` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[daml] +format = 'via [D $version](bold bright-green) ' +``` + +## Dart + +The `dart` module shows the currently installed version of [Dart](https://dart.dev/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a file with `.dart` extension +- The current directory contains a `.dart_tool` directory +- The current directory contains a `pubspec.yaml`, `pubspec.yml` or `pubspec.lock` file + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🎯 '` | A format string representing the symbol of Dart | +| `detect_extensions` | `['dart']` | Which extensions should trigger this module. | +| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Which filenames should trigger this module. | +| `detect_folders` | `['.dart_tool']` | Which folders should trigger this module. | +| `style` | `'bold blue'` | The style for the module. | +| `disabled` | `false` | Disables the `dart` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.8.4` | The version of `dart` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[dart] +format = 'via [🔰 $version](bold red) ' +``` + +## Deno + +The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file + +### Options + +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦕 '` | A format string representing the symbol of Deno | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'green bold'` | The style for the module. | +| `disabled` | `false` | Disables the `deno` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.8.3` | The version of `deno` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +### Example + +```toml +# ~/.config/starship.toml + +[deno] +format = 'via [🦕 $version](green bold) ' +``` + +## Directory + +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. + +When using the `fish_style_pwd_dir_length` option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. + +For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`. + +### Options + +| Option | Default | Description | +| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `'[$path]($style)[$read_only]($read_only_style) '` | The format for the module. | +| `style` | `'bold cyan'` | The style for the module. | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `'🔒'` | The symbol indicating current directory is read only. | +| `read_only_style` | `'red'` | The style for the read only symbol. | +| `truncation_symbol` | `''` | The symbol to prefix to truncated paths. eg: '…/' | +| `before_repo_root_style` | | The style for the path segment above the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `'[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '` | The format of a git repo when `before_repo_root_style` and `repo_root_style` is defined. | +| `home_symbol` | `'~'` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) | + +
+This module has a few advanced configuration options that control how the directory is displayed. + +| Advanced Option | Default | Description | +| --------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `substitutions` | | A table of substitutions to be made to the path. | +| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | +| `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. | + +`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD. + +```toml +[directory.substitutions] +'/Volumes/network/path' = '/net' +'src/com/long/java/path' = 'mypath' +``` + +`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`. + +
+ +### Variables + +| Variable | Example | Description | +| --------- | --------------------- | ----------------------------------- | +| path | `'D:/Projects'` | The current directory path | +| style\* | `'black bold dimmed'` | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| Variable | Example | Description | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `'/path/to/home/'` | The path before git root directory path | +| repo_root | `'git_repo'` | The git root directory name | +| path | `'/src/lib'` | The remaining path | +| style | `'black bold dimmed'` | Mirrors the value of option `style` | +| repo_root_style | `'underline white'` | Style for git root directory name | + +
+ +### Example + +```toml +# ~/.config/starship.toml + +[directory] +truncation_length = 8 +truncation_symbol = '…/' +``` + +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | The style for the module. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['.envrc']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbol | | Mirrors the value of option `symbol`. | +| style\* | `red bold` | Mirrors the value of option `style`. | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + +## Docker Context + +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `format` | `'via [$symbol$context]($style) '` | The format for the module. | +| `symbol` | `'🐳 '` | The symbol used before displaying the Docker context. | +| `only_with_files` | `true` | Only show when there's a match | +| `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | +| `style` | `'blue bold'` | The style for the module. | +| `disabled` | `false` | Disables the `docker_context` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------------- | ------------------------------------ | +| context | `test_context` | The current docker context | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[docker_context] +format = 'via [🐋 $context](blue bold)' +``` + +## Dotnet + +The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK. + +By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: + +- `global.json` +- `project.json` +- `Directory.Build.props` +- `Directory.Build.targets` +- `Packages.props` +- `*.csproj` +- `*.fsproj` +- `*.xproj` + +You'll also need the .NET Core SDK installed in order to use it correctly. + +Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options. + +The module will also show the Target Framework Moniker () when there is a `.csproj` file in the current directory. + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )(🎯 $tfm )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'.NET '` | The symbol used before displaying the version of dotnet. | +| `heuristic` | `true` | Use faster version detection to keep starship snappy. | +| `detect_extensions` | `['csproj', 'fsproj', 'xproj']` | Which extensions should trigger this module. | +| `detect_files` | `['global.json', 'project.json', 'Directory.Build.props', 'Directory.Build.targets', 'Packages.props']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `style` | `'bold blue'` | The style for the module. | +| `disabled` | `false` | Disables the `dotnet` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------------------------------------ | +| version | `v3.1.201` | The version of `dotnet` sdk | +| tfm | `netstandard2.0` | The Target Framework Moniker that the current project is targeting | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[dotnet] +symbol = '🥅 ' +style = 'green' +heuristic = false +``` + +## Elixir + +The `elixir` module shows the currently installed version of [Elixir](https://elixir-lang.org/) and [Erlang/OTP](https://erlang.org/doc/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `mix.exs` file. + +### Options + +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version \(OTP $otp_version\) )]($style)'` | The format for the module elixir. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💧 '` | The symbol used before displaying the version of Elixir/Erlang. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['mix.exs']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `style` | `'bold purple'` | The style for the module. | +| `disabled` | `false` | Disables the `elixir` module. | + +### Variables + +| Variable | Example | Description | +| ----------- | ------- | ------------------------------------ | +| version | `v1.10` | The version of `elixir` | +| otp_version | | The otp version of `elixir` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[elixir] +symbol = '🔮 ' +``` + +## Elm + +The `elm` module shows the currently installed version of [Elm](https://elm-lang.org/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `elm.json` file +- The current directory contains a `elm-package.json` file +- The current directory contains a `.elm-version` file +- The current directory contains a `elm-stuff` folder +- The current directory contains `*.elm` files + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌳 '` | A format string representing the symbol of Elm. | +| `detect_extensions` | `['elm']` | Which extensions should trigger this module. | +| `detect_files` | `['elm.json', 'elm-package.json', '.elm-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['elm-stuff']` | Which folders should trigger this modules. | +| `style` | `'cyan bold'` | The style for the module. | +| `disabled` | `false` | Disables the `elm` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.19.1` | The version of `elm` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[elm] +format = 'via [ $version](cyan bold) ' +``` + +## Environment Variable + +The `env_var` module displays the current value of a selected environment variables. The module will be shown only if any of the following conditions are met: + +- The `variable` configuration option matches an existing environment variable +- The `variable` configuration option is not defined, but the `default` configuration option is + +::: tip + +The order in which env_var modules are shown can be individually set by including `${env_var.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `env_var` module will simply show all env_var modules in the order they were defined. + +::: + +::: tip + +Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character. + +Example: following configuration will display value of USER environment variable + +```toml +# ~/.config/starship.toml + +[env_var.USER] +default = 'unknown user' +``` + +::: + +### Options + +| Option | Default | Description | +| ------------- | ------------------------------ | ---------------------------------------------------------------------------- | +| `symbol` | `""` | The symbol used before displaying the variable value. | +| `variable` | | The environment variable to be displayed. | +| `default` | | The default value to be displayed when the selected variable is not defined. | +| `format` | `"with [$env_value]($style) "` | The format for the module. | +| `description` | `""` | The description of the module that is shown when running `starship explain`. | +| `disabled` | `false` | Disables the `env_var` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------------------------------------- | ------------------------------------------ | +| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | `black bold dimmed` | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[env_var] +variable = 'SHELL' +default = 'unknown shell' +``` + +Displaying multiple environmental variables: + +```toml +# ~/.config/starship.toml + +[env_var.SHELL] +variable = 'SHELL' +default = 'unknown shell' +[env_var.USER] +default = 'unknown user' +``` + +## Erlang + +The `erlang` module shows the currently installed version of [Erlang/OTP](https://erlang.org/doc/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `rebar.config` file. +- The current directory contains a `erlang.mk` file. + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | The symbol used before displaying the version of erlang. | +| `style` | `'bold red'` | The style for the module. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['rebar.config', 'elang.mk']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `disabled` | `false` | Disables the `erlang` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v22.1.3` | The version of `erlang` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[erlang] +format = 'via [e $version](bold red) ' +``` + +## Fennel + +The `fennel` module shows the currently installed version of [Fennel](https://fennel-lang.org). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.fnl` extension + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. | +| `style` | `'bold green'` | The style for the module. | +| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `disabled` | `false` | Disables the `fennel` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.2.1` | The version of `fennel` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[fennel] +symbol = '⫰ ' +``` + +## Fill + +The `fill` module fills any extra space on the line with a symbol. If multiple `fill` modules are present in a line they will split the space evenly between them. This is useful for aligning other modules. + +### Options + +| Option | Default | Description | +| ---------- | -------------- | --------------------------------- | +| `symbol` | `'.'` | The symbol used to fill the line. | +| `style` | `'bold black'` | The style for the module. | +| `disabled` | `false` | Disables the `fill` module | + +### Example + +```toml +# ~/.config/starship.toml +format = 'AA $fill BB $fill CC' + +[fill] +symbol = '-' +style = 'bold green' +``` + +Produces a prompt that looks like: + +``` +AA -------------------------------------------- BB -------------------------------------------- CC +``` + +## Fossil Branch + +The `fossil_branch` module shows the name of the active branch of the check-out in your current directory. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol$branch]($style) '` | The format for the module. Use `'$branch'` to refer to the current branch name. | +| `symbol` | `' '` | The symbol used before the branch name of the check-out in your current directory. | +| `style` | `'bold purple'` | The style for the module. | +| `truncation_length` | `2^63 - 1` | Truncates a Fossil branch name to `N` graphemes | +| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. You can use `''` for no symbol. | +| `disabled` | `true` | Disables the `fossil_branch` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| branch | `trunk` | The active Fossil branch | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[fossil_branch] +symbol = '🦎 ' +truncation_length = 4 +truncation_symbol = '' +``` + +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------------ | ------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | +| `added_style` | `'bold green'` | The style for the added count. | +| `deleted_style` | `'bold red'` | The style for the deleted count. | +| `only_nonzero_diffs` | `true` | Render status only for changed items. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### Variables + +| Variable | Example | Description | +| ----------------- | ------- | ------------------------------------------- | +| added | `1` | The current number of added lines | +| deleted | `2` | The current number of deleted lines | +| added_style\* | | Mirrors the value of option `added_style` | +| deleted_style\* | | Mirrors the value of option `deleted_style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + +## Google Cloud (`gcloud`) + +The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. + +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------------------------------- | ---------------------------------------------------------------- | +| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. | +| `symbol` | `'☁️ '` | The symbol used before displaying the current GCP profile. | +| `region_aliases` | `{}` | Table of region aliases to display in addition to the GCP name. | +| `project_aliases` | `{}` | Table of project aliases to display in addition to the GCP name. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | +| `style` | `'bold blue'` | The style for the module. | +| `disabled` | `false` | Disables the `gcloud` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------- | ------------------------------------------------------------------ | +| region | `us-central1` | The current GCP region | +| account | `foo` | The current GCP profile | +| domain | `example.com` | The current GCP profile domain | +| project | | The current GCP project | +| active | `default` | The active config name written in `~/.config/gcloud/active_config` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Examples + +#### Display account and project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(@$domain)(\($project\))]($style) ' +``` + +#### Display active config name only + +```toml +# ~/.config/starship.toml + +[gcloud] +format = '[$symbol$active]($style) ' +style = 'bold yellow' +``` + +#### Display account and aliased region + +```toml +# ~/.config/starship.toml + +[gcloud] +symbol = '️🇬️ ' +[gcloud.region_aliases] +us-central1 = 'uc1' +asia-northeast1 = 'an1' +``` + +#### Display account and aliased project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(@$domain)(\($project\))]($style) ' +[gcloud.project_aliases] +very-long-project-name = 'vlpn' +``` + +## Git Branch + +The `git_branch` module shows the active branch of the repo in your current directory. + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. | +| `format` | `'on [$symbol$branch(:$remote_branch)]($style) '` | The format for the module. Use `'$branch'` to refer to the current branch name. | +| `symbol` | `' '` | A format string representing the symbol of git branch. | +| `style` | `'bold purple'` | The style for the module. | +| `truncation_length` | `2^63 - 1` | Truncates a git branch to `N` graphemes. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. You can use `''` for no symbol. | +| `only_attached` | `false` | Only show the branch name when not in a detached `HEAD` state. | +| `ignore_branches` | `[]` | A list of names to avoid displaying. Useful for 'master' or 'main'. | +| `disabled` | `false` | Disables the `git_branch` module. | + +### Variables + +| Variable | Example | Description | +| ------------- | -------- | ------------------------------------------------------------------------------------------------------ | +| branch | `master` | The current branch name, falls back to `HEAD` if there's no current branch (e.g. git detached `HEAD`). | +| remote_name | `origin` | The remote name. | +| remote_branch | `master` | The name of the branch tracked on `remote_name`. | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_branch] +symbol = '🌱 ' +truncation_length = 4 +truncation_symbol = '' +ignore_branches = ['master', 'main'] +``` + +## Git Commit + +The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory. + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ | +| `commit_hash_length` | `7` | The length of the displayed git commit hash. | +| `format` | `'[\($hash$tag\)]($style) '` | The format for the module. | +| `style` | `'bold green'` | The style for the module. | +| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state | +| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. | +| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. | +| `tag_symbol` | `' 🏷 '` | Tag symbol prefixing the info shown | +| `disabled` | `false` | Disables the `git_commit` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | -------------------------------------------- | +| hash | `b703eb3` | The current git commit hash | +| tag | `v1.0.0` | The tag name if showing tag info is enabled. | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_commit] +commit_hash_length = 4 +tag_symbol = '🔖 ' +``` + +## Git State + +The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too. + +### Options + +| Option | Default | Description | +| -------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `rebase` | `'REBASING'` | A format string displayed when a `rebase` is in progress. | +| `merge` | `'MERGING'` | A format string displayed when a `merge` is in progress. | +| `revert` | `'REVERTING'` | A format string displayed when a `revert` is in progress. | +| `cherry_pick` | `'CHERRY-PICKING'` | A format string displayed when a `cherry-pick` is in progress. | +| `bisect` | `'BISECTING'` | A format string displayed when a `bisect` is in progress. | +| `am` | `'AM'` | A format string displayed when an `apply-mailbox` (`git am`) is in progress. | +| `am_or_rebase` | `'AM/REBASE'` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. | +| `style` | `'bold yellow'` | The style for the module. | +| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | The format for the module. | +| `disabled` | `false` | Disables the `git_state` module. | + +### Variables + +| Variable | Example | Description | +| ---------------- | ---------- | ----------------------------------- | +| state | `REBASING` | The current state of the repo | +| progress_current | `1` | The current operation progress | +| progress_total | `2` | The total operation progress | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_state] +format = '[\($state( $progress_current of $progress_total)\)]($style) ' +cherry_pick = '[🍒 PICKING](bold red)' +``` + +## Git Metrics + +The `git_metrics` module will show the number of added and deleted lines in the current git repository. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------------ | ------------------------------------- | +| `added_style` | `'bold green'` | The style for the added count. | +| `deleted_style` | `'bold red'` | The style for the deleted count. | +| `only_nonzero_diffs` | `true` | Render status only for changed items. | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | +| `disabled` | `true` | Disables the `git_metrics` module. | +| `ignore_submodules` | `false` | Ignore changes to submodules | + +### Variables + +| Variable | Example | Description | +| ----------------- | ------- | ------------------------------------------- | +| added | `1` | The current number of added lines | +| deleted | `2` | The current number of deleted lines | +| added_style\* | | Mirrors the value of option `added_style` | +| deleted_style\* | | Mirrors the value of option `deleted_style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + +## Git Status + +The `git_status` module shows symbols representing the state of the repo in your current directory. + +::: tip + +The Git Status module is very slow in Windows directories (for example under `/mnt/c/`) when in a WSL environment. You can disable the module or use the `windows_starship` option to use a Windows-native Starship executable to compute `git_status` for those paths. + +::: + +### Options + +| Option | Default | Description | +| ------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` | +| `conflicted` | `'='` | This branch has merge conflicts. | +| `ahead` | `'⇡'` | The format of `ahead` | +| `behind` | `'⇣'` | The format of `behind` | +| `diverged` | `'⇕'` | The format of `diverged` | +| `up_to_date` | `''` | The format of `up_to_date` | +| `untracked` | `'?'` | The format of `untracked` | +| `stashed` | `'$'` | The format of `stashed` | +| `modified` | `'!'` | The format of `modified` | +| `staged` | `'+'` | The format of `staged` | +| `renamed` | `'»'` | The format of `renamed` | +| `deleted` | `'✘'` | The format of `deleted` | +| `typechanged` | `""` | The format of `typechange` | +| `style` | `'bold red'` | The style for the module. | +| `ignore_submodules` | `false` | Ignore changes to submodules. | +| `disabled` | `false` | Disables the `git_status` module. | +| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. | + +### Variables + +The following variables can be used in `format`: + +| Variable | Description | +| -------------- | ------------------------------------------------------------------------------------------------------------- | +| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` | +| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. | +| `conflicted` | Displays `conflicted` when this branch has merge conflicts. | +| `untracked` | Displays `untracked` when there are untracked files in the working directory. | +| `stashed` | Displays `stashed` when a stash exists for the local repository. | +| `modified` | Displays `modified` when there are file modifications in the working directory. | +| `staged` | Displays `staged` when a new file has been added to the staging area. | +| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | +| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | +| style\* | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +The following variables can be used in `diverged`: + +| Variable | Description | +| -------------- | ---------------------------------------------- | +| `ahead_count` | Number of commits ahead of the tracking branch | +| `behind_count` | Number of commits behind the tracking branch | + +The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`: + +| Variable | Description | +| -------- | ------------------------ | +| `count` | Show the number of files | + +### Example + +```toml +# ~/.config/starship.toml + +[git_status] +conflicted = '🏳' +ahead = '🏎💨' +behind = '😰' +diverged = '😵' +up_to_date = '✓' +untracked = '🤷' +stashed = '📦' +modified = '📝' +staged = '[++\($count\)](green)' +renamed = '👅' +deleted = '🗑' +``` + +Show ahead/behind count of the branch being tracked + +```toml +# ~/.config/starship.toml + +[git_status] +ahead = '⇡${count}' +diverged = '⇕⇡${ahead_count}⇣${behind_count}' +behind = '⇣${count}' +``` + +Use Windows Starship executable on Windows paths in WSL + +```toml +# ~/.config/starship.toml + +[git_status] +windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe' +``` + +## Go + +The `golang` module shows the currently installed version of [Go](https://golang.org/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `go.mod` file +- The current directory contains a `go.sum` file +- The current directory contains a `go.work` file +- The current directory contains a `glide.yaml` file +- The current directory contains a `Gopkg.yml` file +- The current directory contains a `Gopkg.lock` file +- The current directory contains a `.go-version` file +- The current directory contains a `Godeps` directory +- The current directory contains a file with the `.go` extension + +### Options + +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐹 '` | A format string representing the symbol of Go. | +| `detect_extensions` | `['go']` | Which extensions should trigger this module. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | +| `style` | `'bold cyan'` | The style for the module. | +| `not_capable_style` | `'bold red'` | The style for the module when the go directive in the go.mod file does not match the installed Go version. | +| `disabled` | `false` | Disables the `golang` module. | + +### Variables + +| Variable | Example | Description | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | The version of `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` version. | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [🏎💨 $version](bold cyan) ' +``` + +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + +## Guix-shell + +The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. + +### Options + +| Option | Default | Description | +| ---------- | -------------------------- | ------------------------------------------------------ | +| `format` | `'via [$symbol]($style) '` | The format for the module. | +| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | The style for the module. | +| `disabled` | `false` | Disables the `guix_shell` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[guix_shell] +disabled = true +format = 'via [🐂](yellow bold) ' +``` + +## Gradle + +The `gradle` module shows the version of the [Gradle Wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html) currently used in the project directory. + +By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `gradle/wrapper/gradle-wrapper.properties` directory. +- The current directory contains a file ending with `.gradle` or `.gradle.kts`. + +The `gradle` module is only able to read your Gradle Wrapper version from your config file, we don't execute your wrapper, because of the security concerns. + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `['gradle']` | Which folders should trigger this module. | +| `style` | `'bold bright-cyan'` | The style for the module. | +| `disabled` | `false` | Disables the `gradle` module. | +| `recursive` | `false` | Enables recursive finding for the `gradle` directory. | + +### Variables + +| Variable | Example | Description | +| -------- | -------- | ------------------------------------ | +| version | `v7.5.1` | The version of `gradle` | +| symbol | | Mirrors the value of option `symbol` | +| style* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +## Haskell + +The `haskell` module finds the current selected GHC version and/or the selected Stack snapshot. + +By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `stack.yaml` file +- The current directory contains any `.hs`, `.cabal`, or `.hs-boot` file + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | -------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `symbol` | `'λ '` | A format string representing the symbol of Haskell | +| `detect_extensions` | `['hs', 'cabal', 'hs-boot']` | Which extensions should trigger this module. | +| `detect_files` | `['stack.yaml', 'cabal.project']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold purple'` | The style for the module. | +| `disabled` | `false` | Disables the `haskell` module. | + +### Variables + +| Variable | Example | Description | +| -------------- | ----------- | --------------------------------------------------------------------------------------- | +| version | | `ghc_version` or `snapshot` depending on whether the current project is a Stack project | +| snapshot | `lts-18.12` | Currently selected Stack snapshot | +| ghc\_version | `9.2.1` | Currently installed GHC version | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +## Haxe + +The `haxe` module shows the currently installed version of [Haxe](https://haxe.org/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `project.xml`, `Project.xml`, `application.xml`, `haxelib.json`, `hxformat.json` or `.haxerc` file +- The current directory contains a `.haxelib` or a `haxe_libraries` directory +- The current directory contains a file with the `.hx` or `.hxml` extension + +### Options + +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. | +| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. | +| `style` | `'bold fg:202'` | The style for the module. | +| `disabled` | `false` | Disables the `haxe` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v4.2.5` | The version of `haxe` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[haxe] +format = "via [⌘ $version](bold fg:202) " +``` + +## Helm + +The `helm` module shows the currently installed version of [Helm](https://helm.sh/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `helmfile.yaml` file +- The current directory contains a `Chart.yaml` file + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['helmfile.yaml', 'Chart.yaml']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `symbol` | `'⎈ '` | A format string representing the symbol of Helm. | +| `style` | `'bold white'` | The style for the module. | +| `disabled` | `false` | Disables the `helm` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v3.1.1` | The version of `helm` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[helm] +format = 'via [⎈ $version](bold white) ' +``` + +## Hostname + +The `hostname` module shows the system hostname. + +### Options + +| Option | Default | Description | +| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | +| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | +| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation. | +| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | +| `style` | `'bold dimmed green'` | The style for the module. | +| `disabled` | `false` | Disables the `hostname` module. | + +### Variables + +| Variable | Example | Description | +| ---------- | ---------- | ----------------------------------------------------- | +| hostname | `computer` | The hostname of the computer | +| style\* | | Mirrors the value of option `style` | +| ssh_symbol | `'🌏 '` | The symbol to represent when connected to SSH session | + +*: This variable can only be used as a part of a style string + +### Examples + +#### Always show the hostname + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +format = '[$ssh_symbol](bold blue) on [$hostname](bold red) ' +trim_at = '.companyname.com' +disabled = false +``` + +#### Hide the hostname in remote tmux sessions + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + +## Java + +The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, `build.boot`, or `.sdkmanrc` file +- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension + +### Options + +| Option | Default | Description | +| ------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [${symbol}(${version} )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['java', 'class', 'gradle', 'jar', 'cljs', 'cljc']` | Which extensions should trigger this module. | +| `detect_files` | `['pom.xml', 'build.gradle.kts', 'build.sbt', '.java-version', 'deps.edn', 'project.clj', 'build.boot', '.sdkmanrc']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `symbol` | `'☕ '` | A format string representing the symbol of Java | +| `style` | `'red dimmed'` | The style for the module. | +| `disabled` | `false` | Disables the `java` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| version | `v14` | The version of `java` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[java] +symbol = '🌟 ' +``` + +## Jobs + +The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to _always_ show the symbol and number of jobs, even if there are 0 jobs running. + +The default functionality is: + +- 0 jobs -> Nothing is shown. +- 1 job -> `symbol` is shown. +- 2 jobs or more -> `symbol` + `number` are shown. + +::: warning + +This module is not supported on tcsh and nu. + +::: + +::: warning + +The `threshold` option is deprecated, but if you want to use it, the module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. If `threshold` is set to 0, then the module will also show when there are 0 jobs running. + +::: + +### Options + +| Option | Default | Description | +| ------------------ | ----------------------------- | ------------------------------------------------------------------------ | +| `threshold`* | `1` | Show number of jobs if exceeded. | +| `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. | +| `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. | +| `format` | `'[$symbol$number]($style) '` | The format for the module. | +| `symbol` | `'✦'` | The string used to represent the `symbol` variable. | +| `style` | `'bold blue'` | The style for the module. | +| `disabled` | `false` | Disables the `jobs` module. | + +*: This option is deprecated, please use the `number_threshold` and `symbol_threshold` options instead. + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| number | `1` | The number of jobs | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[jobs] +symbol = '+ ' +number_threshold = 4 +symbol_threshold = 0 +``` + +## Julia + +The `julia` module shows the currently installed version of [Julia](https://julialang.org/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `Project.toml` file +- The current directory contains a `Manifest.toml` file +- The current directory contains a file with the `.jl` extension + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['jl']` | Which extensions should trigger this module. | +| `detect_files` | `['Project.toml', 'Manifest.toml']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `symbol` | `'ஃ '` | A format string representing the symbol of Julia. | +| `style` | `'bold purple'` | The style for the module. | +| `disabled` | `false` | Disables the `julia` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.4.0` | The version of `julia` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[julia] +symbol = '∴ ' +``` + +## Kotlin + +The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `.kt` or a `.kts` file + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['kt', 'kts']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `symbol` | `'🅺 '` | A format string representing the symbol of Kotlin. | +| `style` | `'bold blue'` | The style for the module. | +| `kotlin_binary` | `'kotlin'` | Configures the kotlin binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `kotlin` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v1.4.21` | The version of `kotlin` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[kotlin] +symbol = '🅺 ' +``` + +```toml +# ~/.config/starship.toml + +[kotlin] +# Uses the Kotlin Compiler binary to get the installed version +kotlin_binary = 'kotlinc' +``` + +## Kubernetes + +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +When the module is enabled it will always be active, unless any of `detect_extensions`, `detect_files` or `detect_folders` have been set in which case the module will only be active in directories that match those conditions. + +::: + +### Options + +::: warning + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + +| Option | Default | Description | +| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | +| `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. | +| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | +| `style` | `'cyan bold'` | The style for the module. | +| `context_aliases`* | `{}` | Table of context aliases to display. | +| `user_aliases`* | `{}` | Table of user aliases to display. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `contexts` | `[]` | Customized styles and symbols for specific contexts. | +| `disabled` | `true` | Disables the `kubernetes` module. | + +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| Variable | Description | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `style` | The style for the module when using this context. If not set, will use module's style. | +| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + +### Variables + +| Variable | Example | Description | +| --------- | -------------------- | ---------------------------------------- | +| context | `starship-context` | The current kubernetes context name | +| namespace | `starship-namespace` | If set, the current kubernetes namespace | +| user | `starship-user` | If set, the current kubernetes user | +| cluster | `starship-cluster` | If set, the current kubernetes cluster | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[kubernetes] +format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' +disabled = false +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] +``` + +Only show the module in directories that contain a `k8s` file. + +```toml +# ~/.config/starship.toml + +[kubernetes] +disabled = false +detect_files = ['k8s'] +``` + +#### Kubernetes Context specific config + +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. + +```toml +# ~/.config/starship.toml + +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups +# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. +# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) +# and renames every matching kube context into a more readable format (`gke-cluster-name`): +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" +``` + +## Line Break + +The `line_break` module separates the prompt into two lines. + +### Options + +| Option | Default | Description | +| ---------- | ------- | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | + +### Example + +```toml +# ~/.config/starship.toml + +[line_break] +disabled = true +``` + +## Local IP + +The `localip` module shows the IPv4 address of the primary network interface. + +### Options + +| Option | Default | Description | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `'[$localipv4]($style) '` | The format for the module. | +| `style` | `'bold yellow'` | The style for the module. | +| `disabled` | `true` | Disables the `localip` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ----------------------------------- | +| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[localip] +ssh_only = false +format = '@[$localipv4](bold red) ' +disabled = false +``` + +## Lua + +The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `.lua-version` file +- The current directory contains a `lua` directory +- The current directory contains a file with the `.lua` extension + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | -------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🌙 '` | A format string representing the symbol of Lua. | +| `detect_extensions` | `['lua']` | Which extensions should trigger this module. | +| `detect_files` | `['.lua-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['lua']` | Which folders should trigger this module. | +| `style` | `'bold blue'` | The style for the module. | +| `lua_binary` | `'lua'` | Configures the lua binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `lua` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v5.4.0` | The version of `lua` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[lua] +format = 'via [🌕 $version](bold blue) ' +``` + +## Memory Usage + +The `memory_usage` module shows current system memory and swap usage. + +By default the swap usage is displayed if the total system swap is non-zero. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------- | ----------------------------------------------- | -------------------------------------------------------- | +| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | +| `format` | `'via $symbol [${ram}( \| ${swap})]($style) '` | The format for the module. | +| `symbol` | `'🐏'` | The symbol used before displaying the memory usage. | +| `style` | `'bold dimmed white'` | The style for the module. | +| `disabled` | `true` | Disables the `memory_usage` module. | + +### Variables + +| Variable | Example | Description | +| ---------------- | ------------- | ------------------------------------------------------------------ | +| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. | +| ram_pct | `48%` | The percentage of the current system memory. | +| swap\*\* | `1GiB/4GiB` | The swap memory size of the current system swap memory file. | +| swap_pct\*\* | `77%` | The swap memory percentage of the current system swap memory file. | +| symbol | `🐏` | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string *\*: The SWAP file information is only displayed if detected on the current system + +### Example + +```toml +# ~/.config/starship.toml + +[memory_usage] +disabled = false +threshold = -1 +symbol = ' ' +style = 'bold dimmed green' +``` + +## Meson + +The `meson` module shows the current Meson developer environment status. + +By default the Meson project name is displayed, if `$MESON_DEVENV` is set. + +### Options + +| Option | Default | Description | +| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | +| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | +| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | +| `format` | `'via [$symbol$project]($style) '` | The format for the module. | +| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `style` | `'blue bold'` | The style for the module. | +| `disabled` | `false` | Disables the `meson` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| project | `starship` | The current Meson project name | +| symbol | `🐏` | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[meson] +disabled = false +truncation_symbol = '--' +symbol = ' ' +style = 'bold dimmed green' +``` + +## Mercurial Branch + +The `hg_branch` module shows the active branch and topic of the repo in your current directory. + +### Options + +| Option | Default | Description | +| ------------------- | ----------------------------------------- | -------------------------------------------------------------------------------------------- | +| `symbol` | `' '` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `'bold purple'` | The style for the module. | +| `format` | `'on [$symbol$branch(:$topic)]($style) '` | The format for the module. | +| `truncation_length` | `2^63 - 1` | Truncates the hg branch / topic name to `N` graphemes | +| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. | +| `disabled` | `true` | Disables the `hg_branch` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| branch | `master` | The active mercurial branch | +| topic | `feature` | The active mercurial topic | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[hg_branch] +format = 'on [🌱 $branch](bold purple)' +truncation_length = 4 +truncation_symbol = '' +``` + +## Nim + +The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `nim.cfg` file +- The current directory contains a file with the `.nim` extension +- The current directory contains a file with the `.nims` extension +- The current directory contains a file with the `.nimble` extension + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | +| `detect_extensions` | `['nim', 'nims', 'nimble']` | Which extensions should trigger this module. | +| `detect_files` | `['nim.cfg']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold yellow'` | The style for the module. | +| `disabled` | `false` | Disables the `nim` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.2.0` | The version of `nimc` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nim] +style = 'yellow' +symbol = '🎣 ' +``` + +## Nix-shell + +The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment. + +### Options + +| Option | Default | Description | +| ------------- | ---------------------------------------------- | --------------------------------------------------------------------- | +| `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. | +| `symbol` | `'❄️ '` | A format string representing the symbol of nix-shell. | +| `style` | `'bold blue'` | The style for the module. | +| `impure_msg` | `'impure'` | A format string shown when the shell is impure. | +| `pure_msg` | `'pure'` | A format string shown when the shell is pure. | +| `unknown_msg` | `''` | A format string shown when it is unknown if the shell is pure/impure. | +| `disabled` | `false` | Disables the `nix_shell` module. | +| `heuristic` | `false` | Attempts to detect new `nix shell`-style shells with a heuristic. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| state | `pure` | The state of the nix-shell | +| name | `lorri` | The name of the nix-shell | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nix_shell] +disabled = true +impure_msg = '[impure shell](bold red)' +pure_msg = '[pure shell](bold green)' +unknown_msg = '[unknown shell](bold yellow)' +format = 'via [☃️ $state( \($name\))](bold blue) ' +``` + +## Node.js + +The `nodejs` module shows the currently installed version of [Node.js](https://nodejs.org/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `package.json` file +- The current directory contains a `.node-version` file +- The current directory contains a `.nvmrc` file +- The current directory contains a `node_modules` directory +- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension +- The current directory contains a file with the `.ts`, `.mts` or `.cts` extension + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Which extensions should trigger this module. | +| `detect_files` | `['package.json', '.node-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['node_modules']` | Which folders should trigger this module. | +| `style` | `'bold green'` | The style for the module. | +| `disabled` | `false` | Disables the `nodejs` module. | +| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. | + +### Variables + +| Variable | Example | Description | +| --------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v13.12.0` | The version of `node` | +| engines_version | `>=12.0.0` | `node` version requirement as set in the engines property of `package.json`. Will only show if the version requirement does not match the `node` version. | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nodejs] +format = 'via [🤖 $version](bold green) ' +``` + +## OCaml + +The `ocaml` module shows the currently installed version of [OCaml](https://ocaml.org/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a file with `.opam` extension or `_opam` directory +- The current directory contains a `esy.lock` directory +- The current directory contains a `dune` or `dune-project` file +- The current directory contains a `jbuild` or `jbuild-ignore` file +- The current directory contains a `.merlin` file +- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension + +### Options + +| Option | Default | Description | +| ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. | +| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Which extensions should trigger this module. | +| `detect_files` | `['dune', 'dune-project', 'jbuild', 'jbuild-ignore', '.merlin']` | Which filenames should trigger this module. | +| `detect_folders` | `['_opam', 'esy.lock']` | Which folders should trigger this module. | +| `style` | `'bold yellow'` | The style for the module. | +| `disabled` | `false` | Disables the `ocaml` module. | + +### Variables + +| Variable | Example | Description | +| ---------------- | ------------ | ----------------------------------------------------------------- | +| version | `v4.10.0` | The version of `ocaml` | +| switch_name | `my-project` | The active OPAM switch | +| switch_indicator | | Mirrors the value of `indicator` for currently active OPAM switch | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[ocaml] +format = 'via [🐪 $version]($style) ' +``` + +## Open Policy Agent + +The `opa` module shows the currently installed version of the OPA tool. By default the module will be shown if the current directory contains a `.rego` file. + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `detect_extensions` | `['rego']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold blue'` | The style for the module. | +| `disabled` | `false` | Disables the `opa` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.44.0` | The version of `opa` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[opa] +format = 'via [⛑️ $version](bold red) ' +``` + +## OpenStack + +The `openstack` module shows the current OpenStack cloud and project. The module only active when the `OS_CLOUD` env var is set, in which case it will read `clouds.yaml` file from any of the [default locations](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files). to fetch the current project in use. + +### Options + +| Option | Default | Description | +| ---------- | ----------------------------------------------- | -------------------------------------------------------------- | +| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. | +| `symbol` | `'☁️ '` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `'bold yellow'` | The style for the module. | +| `disabled` | `false` | Disables the `openstack` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| cloud | `corp` | The current OpenStack cloud | +| project | `dev` | The current OpenStack project | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[openstack] +format = 'on [$symbol$cloud(\($project\))]($style) ' +style = 'bold yellow' +symbol = '☁️ ' +``` + +## OS + +The `os` module shows the current operating system. OS information is detected via the [os_info](https://lib.rs/crates/os_info) crate. + +::: warning + +The [os_info](https://lib.rs/crates/os_info) crate used by this module is known to be inaccurate on some systems. + +::: + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ---------- | --------------------- | ------------------------------------------------------ | +| `format` | `'[$symbol]($style)'` | The format for the module. | +| `style` | `'bold white'` | The style for the module. | +| `disabled` | `true` | Disables the `os` module. | +| `symbols` | | A table that maps each operating system to its symbol. | + +`symbols` allows you to define arbitrary symbols to display for each operating system type. Operating system types not defined by your configuration use the default symbols table below. All operating systems currently supported by the module are listed below. If you would like an operating system to be added, feel free to open a [feature request](https://github.com/starship/starship/issues/new/choose). + +```toml +# This is the default symbols table. +[os.symbols] +Alpaquita = "🔔 " +Alpine = "🏔️ " +Amazon = "🙂 " +Android = "🤖 " +Arch = "🎗️ " +Artix = "🎗️ " +CentOS = "💠 " +Debian = "🌀 " +DragonFly = "🐉 " +Emscripten = "🔗 " +EndeavourOS = "🚀 " +Fedora = "🎩 " +FreeBSD = "😈 " +Garuda = "🦅 " +Gentoo = "🗜️ " +HardenedBSD = "🛡️ " +Illumos = "🐦 " +Linux = "🐧 " +Mabox = "📦 " +Macos = "🍎 " +Manjaro = "🥭 " +Mariner = "🌊 " +MidnightBSD = "🌘 " +Mint = "🌿 " +NetBSD = "🚩 " +NixOS = "❄️ " +OpenBSD = "🐡 " +OpenCloudOS = "☁️ " +openEuler = "🦉 " +openSUSE = "🦎 " +OracleLinux = "🦴 " +Pop = "🍭 " +Raspbian = "🍓 " +Redhat = "🎩 " +RedHatEnterprise = "🎩 " +Redox = "🧪 " +Solus = "⛵ " +SUSE = "🦎 " +Ubuntu = "🎯 " +Unknown = "❓ " +Windows = "🪟 " +``` + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ------------------------------------------------------------------ | +| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| name | `Arch Linux` | The current operating system name | +| type | `Arch` | The current operating system type | +| codename | | The current operating system codename, if applicable | +| edition | | The current operating system edition, if applicable | +| version | | The current operating system version, if applicable | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[os] +format = "on [($name )]($style)" +style = "bold blue" +disabled = false + +[os.symbols] +Windows = " " +Arch = "Arch is the best! " +``` + +## Package Version + +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` and `dart` packages. + +- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory +- [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory +- [**Nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command +- [**Poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory +- [**Python**](https://www.python.org) - The `python` package version is extracted from a [PEP 621](https://peps.python.org/pep-0621/) compliant `pyproject.toml` or a `setup.cfg` present in the current directory +- [**Composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory +- [**Gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present in the current directory +- [**Julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present in the current directory +- [**Mix**](https://hexdocs.pm/mix/) - The `mix` package version is extracted from the `mix.exs` present in the current directory +- [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present in the current directory +- [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present in the current directory +- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present in the current directory +- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present in the current directory +- [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present in the current directory +- [**SBT**](https://scala-sbt.org) - The `sbt` package version is extracted from the `build.sbt` present in the current directory +- [**Daml**](https://www.digitalasset.com/developers) - The `daml` package version is extracted from the `daml.yaml` present in the current directory +- [**Dart**](https://pub.dev/) - The `dart` package version is extracted from the `pubspec.yaml` present in the current directory + +> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. + +### Options + +| Option | Default | Description | +| ----------------- | --------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'is [$symbol$version]($style) '` | The format for the module. | +| `symbol` | `'📦 '` | The symbol used before displaying the version the package. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold 208'` | The style for the module. | +| `display_private` | `false` | Enable displaying version for packages marked as private. | +| `disabled` | `false` | Disables the `package` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.0.0` | The version of your package | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[package] +format = 'via [🎁 $version](208 bold) ' +``` + +## Perl + +The `perl` module shows the currently installed version of [Perl](https://www.perl.org/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `Makefile.PL` or `Build.PL` file +- The current directory contains a `cpanfile` or `cpanfile.snapshot` file +- The current directory contains a `META.json` file or `META.yml` file +- The current directory contains a `.perl-version` file +- The current directory contains a `.pl`, `.pm` or `.pod` + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Which extensions should trigger this module. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold 149'` | The style for the module. | +| `disabled` | `false` | Disables the `perl` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v5.26.1` | The version of `perl` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +### Example + +```toml +# ~/.config/starship.toml + +[perl] +format = 'via [🦪 $version]($style) ' +``` + +## PHP + +The `php` module shows the currently installed version of [PHP](https://www.php.net/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `composer.json` file +- The current directory contains a `.php-version` file +- The current directory contains a `.php` extension + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐘 '` | The symbol used before displaying the version of PHP. | +| `detect_extensions` | `['php']` | Which extensions should trigger this module. | +| `detect_files` | `['composer.json', '.php-version']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'147 bold'` | The style for the module. | +| `disabled` | `false` | Disables the `php` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v7.3.8` | The version of `php` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[php] +format = 'via [🔹 $version](147 bold) ' +``` + +## Pijul Channel + +The `pijul_channel` module shows the active channel of the repo in your current directory. + +### Options + +| Option | Default | Description | +| ------------------- | --------------------------------- | ------------------------------------------------------------------------------------ | +| `symbol` | `' '` | The symbol used before the pijul channel name of the repo in your current directory. | +| `style` | `'bold purple'` | The style for the module. | +| `format` | `'on [$symbol$channel]($style) '` | The format for the module. | +| `truncation_length` | `2^63 - 1` | Truncates the pijul channel name to `N` graphemes | +| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. | +| `disabled` | `true` | Disables the `pijul` module. | + +## Pulumi + +The `pulumi` module shows the current username, selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/), and version. + +::: tip + +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). + +::: + +By default the module will be shown if any of the following conditions are met: + +- The current directory contains either `Pulumi.yaml` or `Pulumi.yml` +- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` unless `search_upwards` is set to `false` + +### Options + +| Option | Default | Description | +| ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `style` | `'bold 5'` | The style for the module. | +| `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | +| `disabled` | `false` | Disables the `pulumi` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| username | `alice` | The current Pulumi username | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +#### With Pulumi Version + +```toml +# ~/.config/starship.toml + +[pulumi] +format = '[🛥 ($version )$stack]($style) ' +``` + +#### Without Pulumi version + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = '🛥 ' +format = '[$symbol$stack]($style) ' +``` + +## PureScript + +The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `spago.dhall` file +- The current directory contains a file with the `.purs` extension + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `['purs']` | Which extensions should trigger this module. | +| `detect_files` | `['spago.dhall']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold white'` | The style for the module. | +| `disabled` | `false` | Disables the `purescript` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `0.13.5` | The version of `purescript` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[purescript] +format = 'via [$symbol$version](bold white)' +``` + +## Python + +The `python` module shows the currently installed version of [Python](https://www.python.org/) and the current [Python virtual environment](https://docs.python.org/tutorial/venv.html) if one is activated. + +If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. + +By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `.python-version` file +- The current directory contains a `Pipfile` file +- The current directory contains a `__init__.py` file +- The current directory contains a `pyproject.toml` file +- The current directory contains a `requirements.txt` file +- The current directory contains a `setup.py` file +- The current directory contains a `tox.ini` file +- The current directory contains a file with the `.py` extension. +- A virtual environment is currently activated + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐍 '` | A format string representing the symbol of Python | +| `style` | `'yellow bold'` | The style for the module. | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | +| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `['py']` | Which extensions should trigger this module | +| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | +| `detect_folders` | `[]` | Which folders should trigger this module | +| `disabled` | `false` | Disables the `python` module. | + +::: tip + +The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. + +The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `'python3'` will hide any Python version 2, see example below. + +::: + +### Variables + +| Variable | Example | Description | +| ------------ | --------------- | ------------------------------------------ | +| version | `'v3.8.1'` | The version of `python` | +| symbol | `'🐍 '` | Mirrors the value of option `symbol` | +| style | `'yellow bold'` | Mirrors the value of option `style` | +| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` | +| virtualenv | `'venv'` | The current `virtualenv` name | + +### Example + +```toml +# ~/.config/starship.toml + +[python] +symbol = '👾 ' +pyenv_version_name = true +``` + +```toml +# ~/.config/starship.toml + +[python] +# Only use the `python3` binary to get the version. +python_binary = 'python3' +``` + +```toml +# ~/.config/starship.toml + +[python] +# Don't trigger for files with the py extension +detect_extensions = [] +``` + +```toml +# ~/.config/starship.toml + +[python] +# Display the version of python from inside a local venv. +# +# Note this will only work when the venv is inside the project and it will only +# work in the directory that contains the venv dir but maybe this is ok? +python_binary = ['./venv/bin/python', 'python', 'python3', 'python2'] +``` + +## R + +The `rlang` module shows the currently installed version of [R](https://www.r-project.org/). The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.R` extension. +- The current directory contains a file with the `.Rd` extension. +- The current directory contains a file with the `.Rmd` extension. +- The current directory contains a file with the `.Rproj` extension. +- The current directory contains a file with the `.Rsx` extension. +- The current directory contains a `.Rprofile` file +- The current directory contains a `.Rproj.user` folder + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'📐'` | A format string representing the symbol of R. | +| `style` | `'blue bold'` | The style for the module. | +| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Which extensions should trigger this module | +| `detect_files` | `['.Rprofile']` | Which filenames should trigger this module | +| `detect_folders` | `['.Rproj.user']` | Which folders should trigger this module | +| `disabled` | `false` | Disables the `r` module. | + +### Variables + +| Variable | Example | Description | +| -------- | ------------- | ------------------------------------ | +| version | `v4.0.5` | The version of `R` | +| symbol | | Mirrors the value of option `symbol` | +| style | `'blue bold'` | Mirrors the value of option `style` | + +### Example + +```toml +# ~/.config/starship.toml + +[rlang] +format = 'with [📐 $version](blue bold) ' +``` + +## Raku + +The `raku` module shows the currently installed version of [Raku](https://www.raku.org/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `META6.json` file +- The current directory contains a `.p6`, `.pm6`, `.raku`, `.rakumod` or `.pod6` + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Which extensions should trigger this module. | +| `detect_files` | `['META6.json']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold 149'` | The style for the module. | +| `disabled` | `false` | Disables the `raku` module. | + +### Variables + +| Variable | Example | Description | +| ---------- | ------- | ------------------------------------ | +| version | `v6.d` | The version of `raku` | +| vm_version | `moar` | The version of VM `raku` is built on | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +### Example + +```toml +# ~/.config/starship.toml + +[raku] +format = 'via [🦪 $version]($style) ' +``` + +## Red + +By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met: + +- The current directory contains a file with `.red` or `.reds` extension + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🔺 '` | A format string representing the symbol of Red. | +| `detect_extensions` | `['red']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'red bold'` | The style for the module. | +| `disabled` | `false` | Disables the `red` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.5.1` | The version of `red` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[red] +symbol = '🔴 ' +``` + +## Ruby + +By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met: + +- The current directory contains a `Gemfile` file +- The current directory contains a `.ruby-version` file +- The current directory contains a `.rb` file +- The environment variables `RUBY_VERSION` or `RBENV_VERSION` are set + +Starship gets the current Ruby version by running `ruby -v`. + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💎 '` | A format string representing the symbol of Ruby. | +| `detect_extensions` | `['rb']` | Which extensions should trigger this module. | +| `detect_files` | `['Gemfile', '.ruby-version']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | +| `style` | `'bold red'` | The style for the module. | +| `disabled` | `false` | Disables the `ruby` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.5.1` | The version of `ruby` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[ruby] +symbol = '🔺 ' +``` + +## Rust + +By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met: + +- The current directory contains a `Cargo.toml` file +- The current directory contains a file with the `.rs` extension + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🦀 '` | A format string representing the symbol of Rust | +| `detect_extensions` | `['rs']` | Which extensions should trigger this module. | +| `detect_files` | `['Cargo.toml']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold red'` | The style for the module. | +| `disabled` | `false` | Disables the `rust` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ----------------- | -------------------------------------------- | +| version | `v1.43.0-nightly` | The version of `rustc` | +| numver | `1.51.0` | The numeric component of the `rustc` version | +| toolchain | `beta` | The toolchain version | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[rust] +format = 'via [⚙️ $version](red bold)' +``` + +## Scala + +The `scala` module shows the currently installed version of [Scala](https://www.scala-lang.org/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file +- The current directory contains a file with the `.scala` or `.sbt` extension +- The current directory contains a directory named `.metals` + +### Options + +| Option | Default | Description | +| ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [${symbol}(${version} )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. | +| `detect_folders` | `['.metals']` | Which folders should trigger this modules. | +| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. | +| `style` | `'red dimmed'` | The style for the module. | +| `disabled` | `false` | Disables the `scala` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `2.13.5` | The version of `scala` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[scala] +symbol = '🌟 ' +``` + +## Shell + +The `shell` module shows an indicator for currently used shell. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | The style for the module. | +| `disabled` | `true` | Disables the `shell` module. | + +### Variables + +| Variable | Default | Description | +| --------- | ------- | ---------------------------------------------------------- | +| indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | + +*: This variable can only be used as a part of a style string + +### Examples + +```toml +# ~/.config/starship.toml + +[shell] +fish_indicator = '󰈺 ' +powershell_indicator = '_' +unknown_indicator = 'mystery shell' +style = 'cyan bold' +disabled = false +``` + +## SHLVL + +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ('shell level') environment variable, if it is set to a number and meets or exceeds the specified threshold. + +### Options + +| Option | Default | Description | +| --------------- | ---------------------------- | ------------------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `'[$symbol$shlvl]($style) '` | The format for the module. | +| `symbol` | `'↕️ '` | The symbol used to represent the `SHLVL`. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. | +| `repeat_offset` | `0` | Decrements number of times `symbol` is repeated by the offset value | +| `style` | `'bold yellow'` | The style for the module. | +| `disabled` | `true` | Disables the `shlvl` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| shlvl | `3` | The current value of `SHLVL` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[shlvl] +disabled = false +format = '$shlvl level(s) down' +threshold = 3 +``` + +Using `repeat` and `repeat_offset` along with `character` module, one can get prompt like `❯❯❯` where last character is colored appropriately for return status code and preceeding characters are provided by `shlvl`. + +```toml +# ~/.config/starship.toml + +[shlvl] +disabled = false +format = '[$symbol$shlvl]($style)' +repeat = true +symbol = '❯' +repeat_offset = 1 +threshold = 0 +``` + +## Singularity + +The `singularity` module shows the current [Singularity](https://sylabs.io/singularity/) image, if inside a container and `$SINGULARITY_NAME` is set. + +### Options + +| Option | Default | Description | +| ---------- | -------------------------------- | ------------------------------------------------ | +| `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. | +| `symbol` | `''` | A format string displayed before the image name. | +| `style` | `'bold dimmed blue'` | The style for the module. | +| `disabled` | `false` | Disables the `singularity` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ------------------------------------ | +| env | `centos.img` | The current Singularity image | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[singularity] +format = '[📦 \[$env\]]($style) ' +``` + +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold blue'` | The style for the module. | +| `disabled` | `false` | Disables this module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v0.8.1` | The version of `solidity` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml +[solidity] +format = "via [S $version](blue bold)" +``` + +## Spack + +The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/latest/) environment, if `$SPACK_ENV` is set. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0` means no truncation. Also see the [`directory`](#directory) module. | +| `symbol` | `'🅢 '` | The symbol used before the environment name. | +| `style` | `'bold blue'` | The style for the module. | +| `format` | `'via [$symbol$environment]($style) '` | The format for the module. | +| `disabled` | `false` | Disables the `spack` module. | + +### Variables + +| Variable | Example | Description | +| ----------- | ------------ | ------------------------------------ | +| environment | `astronauts` | The current spack environment | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[spack] +format = '[$symbol$environment](dimmed blue) ' +``` + +## Status + +The `status` module displays the exit code of the previous command. If $success_symbol is empty (default), the module will be shown only if the exit code is not `0`. The status code will cast to a signed 32-bit integer. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `format` | `'[$symbol$status]($style) '` | The format of the module | +| `symbol` | `'❌'` | The symbol displayed on program error | +| `success_symbol` | `''` | The symbol displayed on program success | +| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `'🧱'` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `'⚡'` | The symbol displayed on any signal | +| `style` | `'bold red'` | The style for the module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `pipestatus` | `false` | Enable pipestatus reporting | +| `pipestatus_separator` | | | The symbol used to separate pipestatus segments (supports formatting) | +| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | The format of the module when the command is a pipeline | +| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments | +| `disabled` | `true` | Disables the `status` module. | + +### Variables + +| Variable | Example | Description | +| -------------- | ------- | ------------------------------------------------------------------------------------------ | +| status | `127` | The exit code of the last command | +| hex_status | `0x7F` | The exit code of the last command in hex | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | +| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | +| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | +| maybe_int | `7` | Contains the exit code number when no meaning has been found | +| pipestatus | | Rendering of in pipeline programs' exit codes, this is only available in pipestatus_format | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[status] +style = 'bg:blue' +symbol = '🔴 ' +success_symbol = '🟢 SUCCESS' +format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' +map_symbol = true +disabled = false +``` + +## Sudo + +The `sudo` module displays if sudo credentials are currently cached. The module will only be shown if credentials are cached. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| --------------- | ------------------------ | ------------------------------------------------------- | +| `format` | `'[as $symbol]($style)'` | The format of the module | +| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | +| `style` | `'bold blue'` | The style for the module. | +| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | +| `disabled` | `true` | Disables the `sudo` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[sudo] +style = 'bold green' +symbol = '👩‍💻 ' +disabled = false +``` + +```toml +# On windows +# $HOME\.starship\config.toml + +[sudo] +allow_windows = true +disabled = false +``` + +## Swift + +By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met: + +- The current directory contains a `Package.swift` file +- The current directory contains a file with the `.swift` extension + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐦 '` | A format string representing the symbol of Swift | +| `detect_extensions` | `['swift']` | Which extensions should trigger this module. | +| `detect_files` | `['Package.swift']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'bold 202'` | The style for the module. | +| `disabled` | `false` | Disables the `swift` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v5.2.4` | The version of `swift` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[swift] +format = 'via [🏎 $version](red bold)' +``` + +## Terraform + +The `terraform` module shows the currently selected [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) and version. + +::: tip + +By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). + +::: + +By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `.terraform` folder +- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol$workspace]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'💠'` | A format string shown before the terraform workspace. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `['.terraform']` | Which folders should trigger this module. | +| `style` | `'bold 105'` | The style for the module. | +| `disabled` | `false` | Disables the `terraform` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `terraform` | +| workspace | `default` | The current Terraform workspace | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +#### With Terraform Version + +```toml +# ~/.config/starship.toml + +[terraform] +format = '[🏎💨 $version$workspace]($style) ' +``` + +#### Without Terraform version + +```toml +# ~/.config/starship.toml + +[terraform] +format = '[🏎💨 $workspace]($style) ' +``` + +## Time + +The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `format` | `'at [$time]($style) '` | The format string for the module. | +| `use_12hr` | `false` | Enables 12 hour formatting | +| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. | +| `style` | `'bold yellow'` | The style for the module time | +| `utc_time_offset` | `'local'` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | +| `disabled` | `true` | Disables the `time` module. | +| `time_range` | `'-'` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | + +If `use_12hr` is `true`, then `time_format` defaults to `'%r'`. Otherwise, it defaults to `'%T'`. Manually setting `time_format` will override the `use_12hr` setting. + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ----------------------------------- | +| time | `13:08:10` | The current time. | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[time] +disabled = false +format = '🕙[\[ $time \]]($style) ' +time_format = '%T' +utc_time_offset = '-5' +time_range = '10:00:00-14:00:00' +``` + +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +By default, the module will be shown if any of the following conditions are met: + +- The current directory contains a `template.typ` file +- The current directory contains any `*.typ` file + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | The style for the module. | +| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. | +| `detect_files` | `['template.typ']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `disabled` | `false` | Disables the `daml` module. | + +### Variables + +| Variable | Example | Description | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +## Username + +The `username` module shows active user's username. The module will be shown if any of the following conditions are met: + +- The current user is root/admin +- The current user isn't the same as the one that is logged in +- The user is currently connected as an SSH session +- The variable `show_always` is set to true + +::: tip + +SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. + +::: + +### Options + +| Option | Default | Description | +| ------------- | ----------------------- | ------------------------------------------- | +| `style_root` | `'bold red'` | The style used when the user is root/admin. | +| `style_user` | `'bold yellow'` | The style used for non-root users. | +| `format` | `'[$user]($style) in '` | The format for the module. | +| `show_always` | `false` | Always shows the `username` module. | +| `disabled` | `false` | Disables the `username` module. | + +### Variables + +| Variable | Example | Description | +| -------- | ------------ | ------------------------------------------------------------------------------------------- | +| `style` | `'red bold'` | Mirrors the value of option `style_root` when root is logged in and `style_user` otherwise. | +| `user` | `'matchai'` | The currently logged-in user ID. | + +### Example + +```toml +# ~/.config/starship.toml + +[username] +style_user = 'white bold' +style_root = 'black bold' +format = 'user: [$user]($style) ' +disabled = false +show_always = true +``` + +## Vagrant + +The `vagrant` module shows the currently installed version of [Vagrant](https://www.vagrantup.com/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `Vagrantfile` file + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['Vagrantfile']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'cyan bold'` | The style for the module. | +| `disabled` | `false` | Disables the `vagrant` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------ | +| version | `Vagrant 2.2.10` | The version of `Vagrant` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[vagrant] +format = 'via [⍱ $version](bold white) ' +``` + +## V + +The `vlang` module shows you your currently installed version of [V](https://vlang.io/). By default the module will be shown if any of the following conditions are met: + +- The current directory contains a file with `.v` extension +- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'V '` | A format string representing the symbol of V | +| `detect_extensions` | `['v']` | Which extensions should trigger this module. | +| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `'blue bold'` | The style for the module. | +| `disabled` | `false` | Disables the `vlang` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| version | `v0.2` | The version of `v` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +### Example + +```toml +# ~/.config/starship.toml +[vlang] +format = 'via [V $version](blue bold) ' +``` + +## VCSH + +The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use. + +### Options + +| Option | Default | Description | +| ---------- | -------------------------------- | ------------------------------------------------------ | +| `symbol` | `''` | The symbol used before displaying the repository name. | +| `style` | `'bold yellow'` | The style for the module. | +| `format` | `'vcsh [$symbol$repo]($style) '` | The format for the module. | +| `disabled` | `false` | Disables the `vcsh` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------------------------------------- | ------------------------------------ | +| repo | `dotfiles` if in a VCSH repo named dotfiles | The active repository name | +| symbol | | Mirrors the value of option `symbol` | +| style\* | `black bold dimmed` | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[vcsh] +format = '[🆅 $repo](bold blue) ' +``` + +## Zig + +By default the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met: + +- The current directory contains a `.zig` file + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `style` | `'bold yellow'` | The style for the module. | +| `disabled` | `false` | Disables the `zig` module. | +| `detect_extensions` | `['zig']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v0.6.0` | The version of `zig` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[zig] +symbol = '⚡️ ' +``` + +## Custom commands + +The `custom` modules show the output of some arbitrary commands. + +These modules will be shown if any of the following conditions are met: + +- The current directory contains a file whose name is in `detect_files` +- The current directory contains a directory whose name is in `detect_folders` +- The current directory contains a file whose extension is in `detect_extensions` +- The `when` command returns 0 +- The current Operating System (std::env::consts::OS) matches with `os` field if defined. + +::: tip + +Multiple custom modules can be defined by using a `.`. + +::: + +::: tip + +The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined. + +::: + +::: tip + +[Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there! + +::: + +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). + +::: + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | +| `require_repo` | `false` | If `true`, the module will only be shown in paths containing a (git) repository. This option alone is not sufficient display condition in absence of other options. | +| `shell` | | [See below](#custom-command-shell) | +| `description` | `''` | The description of the module that is shown when running `starship explain`. | +| `detect_files` | `[]` | The files that will be searched in the working directory for a match. | +| `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | +| `detect_extensions` | `[]` | The extensions that will be searched in the working directory for a match. | +| `symbol` | `''` | The symbol used before displaying the command output. | +| `style` | `'bold green'` | The style for the module. | +| `format` | `'[$symbol($output )]($style)'` | The format for the module. | +| `disabled` | `false` | Disables this `custom` module. | +| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | +| `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | +| `ignore_timeout` | `false` | Ignore global `command_timeout` setting and keep running external commands, no matter how long they take. | + +### Variables + +| Variable | Description | +| --------- | -------------------------------------- | +| output | The output of shell command in `shell` | +| symbol | Mirrors the value of option `symbol` | +| style\* | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +#### Custom command shell + +`shell` accepts a non-empty list of strings, where: + +- The first string is the path to the shell to use to execute the command. +- Other following arguments are passed to the shell. + +If unset, it will fallback to STARSHIP_SHELL and then to 'sh' on Linux, and 'cmd /C' on Windows. + +The `command` will be passed in on stdin. + +If `shell` is not given or only contains one element and Starship detects PowerShell will be used, the following arguments will automatically be added: `-NoProfile -Command -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. + +```toml +shell = ['pwsh', '-Command', '-'] +``` + +::: warning Make sure your custom shell configuration exits gracefully + +If you set a custom command, make sure that the default Shell used by starship will properly execute the command with a graceful exit (via the `shell` option). + +For example, PowerShell requires the `-Command` parameter to execute a one liner. Omitting this parameter might throw starship into a recursive loop where the shell might try to load a full profile environment with starship itself again and hence re-execute the custom command, getting into a never ending loop. + +Parameters similar to `-NoProfile` in PowerShell are recommended for other shells as well to avoid extra loading time of a custom profile on every starship invocation. + +Automatic detection of shells and proper parameters addition are currently implemented, but it's possible that not all shells are covered. [Please open an issue](https://github.com/starship/starship/issues/new/choose) with shell details and starship configuration if you hit such scenario. + +::: + +### Example + +```toml +# ~/.config/starship.toml + +[custom.foo] +command = 'echo foo' # shows output of command +detect_files = ['foo'] # can specify filters but wildcards are not supported +when = ''' test "$HOME" = "$PWD" ''' +format = ' transcending [$output]($style)' + +[custom.time] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command', '-'] + +[custom.time-as-arg] +command = 'time /T' +detect_extensions = ['pst'] # filters *.pst files +shell = ['pwsh.exe', '-NoProfile', '-Command'] +use_stdin = false +``` diff --git a/docs/bn-BD/faq/README.md b/docs/bn-BD/faq/README.md new file mode 100644 index 000000000..1f8484406 --- /dev/null +++ b/docs/bn-BD/faq/README.md @@ -0,0 +1,130 @@ +# Frequently Asked Questions + +## What is the configuration used in the demo GIF? + +- **Terminal Emulator**: [iTerm2](https://iterm2.com/) + - **Theme**: Minimal + - **Color Scheme**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy) + - **Font**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads) +- **Shell**: [Fish Shell](https://fishshell.com/) + - **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish) + - **Prompt**: [Starship](https://starship.rs/) + +## How do I get command completion as shown in the demo GIF? + +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). + +## Do top level `format` and `.disabled` do the same thing? + +Yes, they can both be used to disable modules in the prompt. If all you plan to do is disable modules, `.disabled` is the preferred way to do so for these reasons: + +- Disabling modules is more explicit than omitting them from the top level `format` +- Newly created modules will be added to the prompt as Starship is updated + +## The docs say Starship is cross-shell. Why isn't my preferred shell supported? + +The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used. + +Here's a small example getting Starship working with bash: + +```sh +# Get the status code from the last command executed +STATUS=$? + +# Get the number of jobs running. +NUM_JOBS=$(jobs -p | wc -l) + +# Set the prompt to the output of `starship prompt` +PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)" +``` + +The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations. + +For a list of all flags accepted by `starship prompt`, use the following command: + +```sh +starship prompt --help +``` + +The prompt will use as much context as is provided, but no flags are "required". + +## How do I run Starship on Linux distributions with older versions of glibc? + +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`: + +```sh +curl -sS https://starship.rs/install.sh | sh -s -- --platform unknown-linux-musl +``` + +## Why do I see `Executing command "..." timed out.` warnings? + +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? + +If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. + +## 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. + +```sh +env STARSHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARSHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a GitHub issue. + +```sh +starship bug-report +``` + +## Why don't I see a glyph symbol in my prompt? + +The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that: + +- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/). +- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice. +- You are using a [Nerd Font](https://www.nerdfonts.com/). + +To test your system, run the following commands in a terminal: + +```sh +echo -e "\xf0\x9f\x90\x8d" +echo -e "\xee\x82\xa0" +``` + +The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs). + +If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose) + +## How do I uninstall Starship? + +Starship is just as easy to uninstall as it is to install in the first place. + +1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship. +1. Delete the Starship binary. + +If Starship was installed using a package manager, please refer to their docs for uninstallation instructions. + +If Starship was installed using the install script, the following command will delete the binary: + +```sh +# Locate and delete the starship binary +sh -c 'rm "$(command -v 'starship')"' +``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/bn-BD/guide/README.md b/docs/bn-BD/guide/README.md new file mode 100644 index 000000000..09df21119 --- /dev/null +++ b/docs/bn-BD/guide/README.md @@ -0,0 +1,445 @@ +

+ Starship – Cross-shell prompt +

+ +

+ GitHub Actions workflow status + Crates.io version + Packaging status
+ Chat on Discord + Follow @StarshipPrompt on Twitter + Stand With Ukraine +

+ +

+ ওয়েবসাইট + · +ইন্সটল + · + কনফিগ +

+ +

+ English +   + Deutsch +   + Español +   + Français +   + Bahasa Indonesia +   + Italiano +   + 日本語 +   + Português do Brasil +   + Русский +   + Українська +   + Tiếng Việt +   + 简体中文 +   + 繁體中文 +

+ +

+ +Starship with iTerm2 and the Snazzy theme + +**আপনার টার্মিনাল এর জন্য একটি সহজ, প্রচণ্ড দ্রুত এবং অশেষভাবে কাস্টমাইজ করার মতো সুবিধাসম্পন্ন একটি প্রম্প্ট!** + +- **দ্রুত:** দ্রুত - সত্যি সত্যিই _অনেক_ দ্রুত! 🚀 +- **কাস্টমাইজ করার সুবিধা:** প্রম্পটের প্রতিটি দিক কনফিগ করুন মন মত । +- **ব্যতিক্রমহীন:** যেকোনো অপারেটিং সিস্টেম ও শেলে কাজ করে । +- **চালাক:** এক নজরে দরকারি সকল তথ্য দেখা যায় । +- **ফিচার সমৃদ্ধ:** আপনার প্রিয় সকল টুল ব্যবহার করতে পারবেন । +- **সহজ:** অনায়াসে ইন্সটল করুন – মিনিটের মধ্যে ব্যবহার শুরু করে দিন । + +

+Starship এর ডকুমেন্টেশন ঘুরে দেখুন  ▶ +

+ + + +## 🚀 ইন্সটল + +### পূর্বশর্ত + +- আপনার থেকে টার্মিনালে একটি [Nerd Font](https://www.nerdfonts.com/) ব্যবহার করতে হবে (উদাহরণস্বরূপ আপনি [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads) টি ব্যবহার করতে পারেন) । + +### ধাপ ১. Starship ইন্সটল করুন + +ইনস্টলেশন নির্দেশিকা দেখতে নিচের তালিকা থেকে আপনার অপারেটিং সিস্টেম বাছাই করুন: + +
+অ্যান্ড্রয়েড + +নিম্নলিখিত প্যাকেজ ম্যানেজার গুলোর মধ্যে থেকে যেকোনো একটি ব্যবহার করে Starship ইন্সটল করুন: + +| রিপোজিটরি | নির্দেশাবলী | +| --------------------------------------------------------------------------------- | ---------------------- | +| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | + +
+ +
+বিএসডি + +নিম্নলিখিত প্যাকেজ ম্যানেজার গুলোর মধ্যে থেকে যেকোনো একটি ব্যবহার করে Starship ইন্সটল করুন: + +| ডিস্ট্রিবিউশন | রিপোজিটরি | নির্দেশাবলী | +| ------------- | -------------------------------------------------------- | --------------------------------- | +| **_যেকোনো_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | + +
+ +
+লিনাক্স + +আপনার সিস্টেম এর জন্য লেটেস্ট সংস্করণটি ইন্সটল করুন: + +```sh +curl -sS https://starship.rs/install.sh | sh +``` + +অথবা, নিম্নলিখিত প্যাকেজ ম্যানেজার গুলোর মধ্যে থেকে যেকোনো একটি ব্যবহার করে Starship ইন্সটল করুন: + +| ডিস্ট্রিবিউশন | রিপোজিটরি | নির্দেশাবলী | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_যেকোনো_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _যেকোনো_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _যেকোনো_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Extra](https://archlinux.org/packages/extra/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| openSUSE | [OSS](https://software.opensuse.org/package/starship) | `zypper in starship` | +| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | + +
+ +
+ম্যাক ওএস + +আপনার সিস্টেম এর জন্য লেটেস্ট সংস্করণটি ইন্সটল করুন: + +```sh +curl -sS https://starship.rs/install.sh | sh +``` + +অথবা, নিম্নলিখিত প্যাকেজ ম্যানেজার গুলোর মধ্যে থেকে যেকোনো একটি ব্যবহার করে Starship ইন্সটল করুন: + +| রিপোজিটরি | নির্দেশাবলী | +| -------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` | + +
+ +
+উইন্ডোজ + +আপনার সিস্টেম এর জন্য লেটেস্ট সংস্করণটি [রিলিজ সেকশনে](https://github.com/starship/starship/releases/latest) থাকা MSI-ইন্সটলার ব্যবহার করে ইন্সটল করুন । + +নিম্নলিখিত প্যাকেজ ম্যানেজার গুলোর মধ্যে থেকে যেকোনো একটি ব্যবহার করে Starship ইন্সটল করুন: + +| রিপোজিটরি | নির্দেশাবলী | +| -------------------------------------------------------------------------------------------- | --------------------------------------- | +| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | +| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` | +| [winget](https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/Starship/Starship) | `winget install --id Starship.Starship` | + +
+ +### ধাপ ২. Starship ব্যবহার করার জন্য আপনার শেল প্রস্তুত করুন + +Starship চালু করতে আপনার শেল কে ঠিক মতো কনফিগার করুন । নিম্নলিখিত তালিকা থেকে আপনার শেল বাছাই করুন: + +
+Bash + +`~/.bashrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন: + +```sh +eval "$(starship init bash)" +``` + +
+ +
+Cmd + +আপনাকে Cmd এর সাথে [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) ব্যবহার করতে হবে । `%LocalAppData%\clink\starship.lua` ফাইল টি তৈরি করে তার মধ্যে নিম্নলিখিত লাইন টি যোগ করুন: + +```lua +load(io.popen('starship init cmd'):read("*a"))() +``` + +
+ +
+Elvish + +`~/.elvish/rc.elv` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন: + +```sh +eval (starship init elvish) +``` + +বিঃদ্রঃ শুধুমাত্র Elvish v0.18+ কাজ করবে । + +
+ +
+Fish + +`~/.config/fish/config.fish` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন: + +```fish +starship init fish | source +``` + +
+ +
+Ion + +`~/.config/ion/initrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন: + +```sh +eval $(starship init ion) +``` + +
+ +
+Nushell + +আপনার Nushell env ফাইলের (Nushell এ `$nu.env-path` কমান্ডটি রান করে ফাইলটি খুঁজে বের করুন) শেষে নিম্নলিখিত লাইনগুলি যোগ করুন: + +```sh +mkdir ~/.cache/starship +starship init nu | save -f ~/.cache/starship/init.nu +``` + +এরপর আপনার Nushell কনফিগের (Nushell এ `$nu.config-path` কমান্ডটি রান করে ফাইলটি খুঁজে বের করুন) শেষে নিম্নলিখিত লাইনটি যোগ করুন: + +```sh +use ~/.cache/starship/init.nu +``` + +বিঃদ্রঃ শুধুমাত্র Nushell v0.78+ কাজ করবে । + +
+ +
+PowerShell + +আপনার PowerShell কনফিগের (PowerShell এ `$PROFILE` কমান্ডটি রান করে ফাইলটি খুঁজে বের করুন) শেষে নিম্নলিখিত লাইনটি যোগ করুন: + +```powershell +Invoke-Expression (&starship init powershell) +``` + +
+ +
+Tcsh + +`~/.tcshrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন: + +```sh +eval `starship init tcsh` +``` + +
+ +
+Xonsh + +`~/.xonshrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন: + +```python +execx($(starship init xonsh)) +``` + +
+ +
+Zsh + +`~/.zshrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন: + +```sh +eval "$(starship init zsh)" +``` + +
+ +### ধাপ ৩. Starship কনফিগার করুন + +নতুন একটি শেল চালু করুন, এরপর আপনি আপনার সুন্দর নতুন শেল প্রম্প্ট দেখতে পাবেন । পূর্ব নির্ধারিত কনফিগ যদি ভালো লেগে থাকে, তাহলে উপভোগ করুন! + +আপনি যদি Starship কে নিজের মতো করে কাস্টমাইজ করতে চান: + +- **[কনফিগারেশন](https://starship.rs/config/)** – আপনার নিজের ইচ্ছা মতো নিজের প্রম্প্টকে পরিবর্তন করতে শিখুন + +- **[অন্যদের তৈরি কনফিগ](https://starship.rs/presets/)** – অন্যদের তৈরি করা সুন্দর কনফিগ দেখে অনুপ্রাণিত হন + +## 🤝 নিজে অবদান রাখুন + +আমরা সবসময় **সকল দক্ষতা স্তরের** অবদানকারীদের খুঁজছি! আপনি যদি সহজ ভাবে এই প্রোজেক্টে অবদান রাখতে চান তাইলে ["good first issue"](https://github.com/starship/starship/labels/🌱%20good%20first%20issue) গুলির সমাধান করার চেষ্টা করতে পারেন । + +আপনি যদি ইংরেজি ছাড়া অন্য কোন ভাষায় সাবলীল হন, তাহলে আপনি আমাদের ডকুমেন্টেশন অনুবাদে এবং আপ-টু-ডেট রাখতে সহায়তা করতে পারেন, আমরা খুবই কৃতজ্ঞ হব । যদি এক্ষেত্রে সাহায্য করতে চান, তাহলে [Starship Crowdin](https://translate.starship.rs/) পেইজ এ গিয়ে আপনার অনুবাদ গুলি যোগ করতে পারবেন । + +আপনি যদি Starship এ অবদান রাখতে আগ্রহী হন, অনুগ্রহ করে আমাদের অবদান রাখার [নির্দেশিকা ও নিয়মকানুন](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) দেখে নিবেন । এছাড়াও, নির্দ্বিধায় আমাদের [Discord](https://discord.gg/8Jzqu3T) সার্ভারে এসে হাই বলে যান । 👋 + +## 💭 অনুপ্রেরণা + +অনুগ্রহ করে Starship এর পূর্ববর্তী এইসব প্রোজেক্ট থেকে ঘুরে আসুন, যারা Starship তৈরিতে অনেক অনুপ্রেরণা দিয়েছে । 🙏 + +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. + +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. + +- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. + +## ❤️ স্পনসর + +[একজন স্পনসর হয়ে](https://github.com/sponsors/starship) এই প্রোজেক্টটিকে আর্থিক ভাবে সহায়তা করুন । আপনার নাম অথবা লোগো নিম্নে দেখা যাবে আপনার ওয়েবসাইট এর লিঙ্ক সহ । + +**সমর্থক স্তর** + +- [Appwrite](https://appwrite.io/) + +

+
+ Starship rocket icon +

+ +## 📝 লাইসেন্স + +Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
এই প্রোজেক্টটি [ISC](https://github.com/starship/starship/blob/master/LICENSE) লাইসেন্সের অধিনে রয়েছে । diff --git a/docs/bn-BD/installing/README.md b/docs/bn-BD/installing/README.md new file mode 100644 index 000000000..a52c2e708 --- /dev/null +++ b/docs/bn-BD/installing/README.md @@ -0,0 +1,93 @@ +# Advanced Installation + +To install starship, you need to do two things: + +1. Get the **starship** binary onto your computer +1. Tell your shell to use the starship binary as its prompt by modifying its init scripts + +For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed. + +There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out! + +## [Chocolatey](https://chocolatey.org) + +### পূর্বশর্ত + +Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey. + +### ইন্সটল + +```powershell +choco install starship +``` + +## [termux](https://termux.com) + +### পূর্বশর্ত + +```sh +pkg install getconf +``` + +### ইন্সটল + +```sh +curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /data/data/com.termux/files/usr/bin +``` + +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### ইন্সটল + +On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: + +```sh +emerge app-shells/starship +``` + +## [Nix](https://nixos.wiki/wiki/Nix) + +### Getting the Binary + +#### Imperatively + +```sh +nix-env -iA nixos.starship +``` + +#### Declarative, single user, via [home-manager](https://github.com/nix-community/home-manager) + +Enable the `programs.starship` module in your `home.nix` file, and add your settings + +```nix +{ + programs.starship = { + enable = true; + # Configuration written to ~/.config/starship.toml + settings = { + # add_newline = false; + + # character = { + # success_symbol = "[➜](bold green)"; + # error_symbol = "[➜](bold red)"; + # }; + + # package.disabled = true; + }; + }; +} +``` + +then run + +```sh +home-manager switch +``` + +#### Declarative, system-wide, with NixOS + +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run + +```sh +sudo nixos-rebuild switch +``` diff --git a/docs/bn-BD/migrating-to-0.45.0/README.md b/docs/bn-BD/migrating-to-0.45.0/README.md new file mode 100644 index 000000000..18661c3ba --- /dev/null +++ b/docs/bn-BD/migrating-to-0.45.0/README.md @@ -0,0 +1,267 @@ +# Migrating to v0.45.0 + +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. + +This guide is intended to walk you through the breaking changes. + +## `prompt_order` has been replaced by a root-level `format` + +Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship. + +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** + +```toml +prompt_order = [ + "username", + "hostname", + "directory", + "git_branch", + "git_commit", + "git_state", + "git_status", + "cmd_duration", + "custom", + "line_break", + "jobs", + "battery", + "time", + "character", +] +``` + +**Example v0.45.0 configuration** + +```toml +format = """\ + $username\ + $hostname\ + $directory\ + $git_branch\ + $git_commit\ + $git_state\ + $git_status\ + $cmd_duration\ + $custom\ + $line_break\ + $jobs\ + $battery\ + $time\ + $character\ + """ +``` + +## Module `prefix` and `suffix` have been replaced by `format` + +Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered. + +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** + +```toml +[cmd_duration] +prefix = "took " +``` + +**Example v0.45.0 configuration** + +```toml +[cmd_duration] +# $duration – The command duration (e.g. "15s") +# $style – The default style of the module (e.g. "bold yellow") +format = "took [$duration]($style) " +``` + +### Affected Modules + +#### Character + +| Removed Property | Replacement | +| ----------------------- | ---------------- | +| `symbol` | `success_symbol` | +| `use_symbol_for_status` | `error_symbol` | +| `style_success` | `success_symbol` | +| `style_failure` | `error_symbol` | + +**Changes to the Default Configuration** + +```diff +[character] +-- symbol = "❯" +-- error_symbol = "✖" +-- use_symbol_for_status = true +-- vicmd_symbol = "❮" +++ success_symbol = "[❯](bold green)" +++ error_symbol = "[❯](bold red)" +++ vicmd_symbol = "[❮](bold green)" +``` + +Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code. + +With the release of v0.45.0, we now always use `error_symbol` after non-zero status codes, unifying `use_symbol_for_status` and `error_symbol` properties. + +To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file: + +```toml +[character] +error_symbol = "[✖](bold red)" +``` + +_Note:_ The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples. + +#### Command Duration + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[cmd_duration] +-- prefix = "took " +++ format = "took [$duration]($style) " +``` + +#### Directory + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[directory] +-- prefix = "in " +++ format = "[$path]($style)[$read_only]($read_only_style) " +``` + +#### Environment Variable + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[env_var] +-- prefix = "" +-- suffix = "" +++ format = "with [$env_value]($style) " +``` + +#### Git Commit + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_commit] +-- prefix = "(" +-- suffix = ")" +++ format = '[\($hash\)]($style) ' +``` + +#### Git Status + +| Removed Property | Replacement | +| ----------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | +| `show_sync_count` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_status] +-- prefix = "[" +-- suffix = "]" +-- show_sync_count = false +++ format = '([\[$all_status$ahead_behind\]]($style) )' +``` + +Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch. + +With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`. + +To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file: + +```toml +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +#### Hostname + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[hostname] +-- prefix = "" +-- suffix = "" +++ format = "[$hostname]($style) in " +``` + +#### Singularity + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `label` | `format` | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[singularity] +-- prefix = "" +-- suffix = "" +++ format = '[$symbol\[$env\]]($style) ' +``` + +#### Time + +| Removed Property | Replacement | +| ---------------- | ------------- | +| `format` | `time_format` | + +**Changes to the Default Configuration** + +```diff +[time] +-- format = "🕙[ %T ]" +++ time_format = "%T" +++ format = "at 🕙[$time]($style) " +``` + +#### Custom Commands + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[custom.example] +-- prefix = "" +-- suffix = "" +++ format = "[$symbol$output]($style) " +``` diff --git a/docs/bn-BD/presets/README.md b/docs/bn-BD/presets/README.md new file mode 100644 index 000000000..2e332ad14 --- /dev/null +++ b/docs/bn-BD/presets/README.md @@ -0,0 +1,71 @@ +# Presets + +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! 😊 + +To get details on how to use a preset, simply click on the image. + +## [Nerd Font Symbols](./nerd-font.md) + +This preset changes the symbols for each module to use Nerd Font symbols. + +[![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) + +## [No 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. + +::: 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) + +## [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.). + +[![Screenshot of Bracketed Segments preset](/presets/img/bracketed-segments.png "Click to view Bracketed Segments preset")](./bracketed-segments) + +## [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. + +[![Screenshot of Plain Text Symbols preset](/presets/img/plain-text-symbols.png "Click to view Plain Text Symbols preset")](./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! + +[![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes) + +## [No Empty Icons](./no-empty-icons.md) + +This preset does not show icons if the toolset is not found. + +[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md) + +## [Pure Prompt](./pure-preset.md) + +This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). + +[![Screenshot of Pure preset](/presets/img/pure-preset.png "Click to view Pure Prompt preset")](./pure-preset) + +## [Pastel 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. + +[![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline) + +## [Tokyo Night](./tokyo-night.md) + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) diff --git a/docs/bn-BD/presets/bracketed-segments.md b/docs/bn-BD/presets/bracketed-segments.md new file mode 100644 index 000000000..982afb20e --- /dev/null +++ b/docs/bn-BD/presets/bracketed-segments.md @@ -0,0 +1,17 @@ +[Return to Presets](./README.md#bracketed-segments) + +# Bracketed Segments Preset + +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.). + +![Screenshot of Bracketed Segments preset](/presets/img/bracketed-segments.png) + +### Configuration + +```sh +starship preset bracketed-segments -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/bracketed-segments.toml) + +<<< @/.vuepress/public/presets/toml/bracketed-segments.toml diff --git a/docs/bn-BD/presets/gruvbox-rainbow.md b/docs/bn-BD/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..49847d614 --- /dev/null +++ b/docs/bn-BD/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#gruvbox-rainbow) + +# Gruvbox Rainbow Preset + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png) + +### পূর্বশর্ত + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal + +### Configuration + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/bn-BD/presets/jetpack.md b/docs/bn-BD/presets/jetpack.md new file mode 100644 index 000000000..0f52a9a9e --- /dev/null +++ b/docs/bn-BD/presets/jetpack.md @@ -0,0 +1,24 @@ +[Return to Presets](./README.md#jetpack) + +# Jetpack Preset + +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 uses the terminal's color theme. + +![Screenshot of Jetpack preset](/presets/img/jetpack.png) + +### Prerequisite + +- 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. + +### Configuration + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/bn-BD/presets/nerd-font.md b/docs/bn-BD/presets/nerd-font.md new file mode 100644 index 000000000..2f81f2f1c --- /dev/null +++ b/docs/bn-BD/presets/nerd-font.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#nerd-font-symbols) + +# Nerd Font Symbols Preset + +This preset changes the symbols for each module to use Nerd Font symbols. + +![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png) + +### পূর্বশর্ত + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font) + +### Configuration + +```sh +starship preset nerd-font-symbols -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/nerd-font-symbols.toml) + +<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml diff --git a/docs/bn-BD/presets/no-empty-icons.md b/docs/bn-BD/presets/no-empty-icons.md new file mode 100644 index 000000000..aa4a211fd --- /dev/null +++ b/docs/bn-BD/presets/no-empty-icons.md @@ -0,0 +1,17 @@ +[Return to Presets](./README.md#no-empty-icons) + +# No Empty Icons Preset + +If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. + +![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) + +### Configuration + +```sh +starship preset no-empty-icons -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-empty-icons.toml) + +<<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/bn-BD/presets/no-nerd-font.md b/docs/bn-BD/presets/no-nerd-font.md new file mode 100644 index 000000000..a70e85e76 --- /dev/null +++ b/docs/bn-BD/presets/no-nerd-font.md @@ -0,0 +1,19 @@ +[Return to Presets](./README.md#no-nerd-fonts) + +# No Nerd Fonts Preset + +This preset restricts the use of symbols to those from emoji and powerline sets. + +This means that even without a Nerd Font installed, you should be able to view all module symbols. + +This preset will become the default preset in a future release of starship. + +### Configuration + +```sh +starship preset no-nerd-font -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-nerd-font.toml) + +<<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/bn-BD/presets/no-runtimes.md b/docs/bn-BD/presets/no-runtimes.md new file mode 100644 index 000000000..c0805d111 --- /dev/null +++ b/docs/bn-BD/presets/no-runtimes.md @@ -0,0 +1,17 @@ +[Return to Presets](./README.md#no-runtime-versions) + +# No Runtime Versions Preset + +This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you! + +![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png) + +### Configuration + +```sh +starship preset no-runtime-versions -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/no-runtime-versions.toml) + +<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml diff --git a/docs/bn-BD/presets/pastel-powerline.md b/docs/bn-BD/presets/pastel-powerline.md new file mode 100644 index 000000000..3a2ec86be --- /dev/null +++ b/docs/bn-BD/presets/pastel-powerline.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#pastel-powerline) + +# Pastel Powerline Preset + +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. + +![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png) + +### পূর্বশর্ত + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Caskaydia Cove Nerd Font) + +### Configuration + +```sh +starship preset pastel-powerline -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/pastel-powerline.toml) + +<<< @/.vuepress/public/presets/toml/pastel-powerline.toml diff --git a/docs/bn-BD/presets/plain-text.md b/docs/bn-BD/presets/plain-text.md new file mode 100644 index 000000000..1e17b4bc0 --- /dev/null +++ b/docs/bn-BD/presets/plain-text.md @@ -0,0 +1,17 @@ +[Return to Presets](./README.md#plain-text-symbols) + +## Plain Text Symbols Preset + +This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode. + +![Screenshot of Plain Text Symbols preset](/presets/img/plain-text-symbols.png) + +### Configuration + +```sh +starship preset plain-text-symbols -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/plain-text-symbols.toml) + +<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml diff --git a/docs/bn-BD/presets/pure-preset.md b/docs/bn-BD/presets/pure-preset.md new file mode 100644 index 000000000..b75a00565 --- /dev/null +++ b/docs/bn-BD/presets/pure-preset.md @@ -0,0 +1,17 @@ +[Return to Presets](./README.md#pure) + +# Pure Preset + +This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). + +![Screenshot of Pure preset](/presets/img/pure-preset.png) + +### Configuration + +```sh +starship preset pure-preset -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/pure-preset.toml) + +<<< @/.vuepress/public/presets/toml/pure-preset.toml diff --git a/docs/bn-BD/presets/tokyo-night.md b/docs/bn-BD/presets/tokyo-night.md new file mode 100644 index 000000000..538fe7ba4 --- /dev/null +++ b/docs/bn-BD/presets/tokyo-night.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#pastel-powerline) + +# Tokyo Night Preset + +This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). + +![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) + +### পূর্বশর্ত + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal + +### Configuration + +```sh +starship preset tokyo-night -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/tokyo-night.toml) + +<<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/ckb-IR/config/README.md b/docs/ckb-IR/config/README.md index bd803efa9..7bc81eea7 100644 --- a/docs/ckb-IR/config/README.md +++ b/docs/ckb-IR/config/README.md @@ -206,6 +206,13 @@ This is the list of prompt-wide configuration options. | `add_newline` | `true` | Inserts blank line between shell prompts. | | `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: ### نموونە @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### Options | Option | Default | Description | @@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. | | `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | | `style` | `'bold yellow'` | The style for the module. | -| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | +| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu ### Options -| Option | Default | Description | -| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'C '` | The symbol used before displaying the compiler details | -| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | -| `style` | `'bold 149'` | The style for the module. | -| `disabled` | `false` | Disables the `c` module. | +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | +| `style` | `'bold 149'` | The style for the module. | +| `disabled` | `false` | Disables the `c` module. | ### Variables @@ -671,7 +683,7 @@ The character will tell you whether the last command was successful or not. It c By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). -::: warning +::: ئاگادارکردنەوە `vimcmd_symbol` is only supported in cmd, fish and zsh. `vimcmd_replace_one_symbol`, `vimcmd_replace_symbol`, and `vimcmd_visual_symbol` are only supported in fish due to [upstream issues with mode detection in zsh](https://github.com/starship/starship/issues/625#issuecomment-732454148). @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | The style for the module. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['.envrc']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Variables + +| گۆڕاو | نموونە | Description | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbol | | Mirrors the value of option `symbol`. | +| style\* | `red bold` | Mirrors the value of option `style`. | + +*: This variable can only be used as a part of a style string + +### نموونە + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Docker Context The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). @@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `style` | `'bold green'` | The style for the module. | -| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. | +| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | | `disabled` | `false` | Disables the `fennel` module. | @@ -1524,11 +1577,46 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------------ | ------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | +| `added_style` | `'bold green'` | The style for the added count. | +| `deleted_style` | `'bold red'` | The style for the deleted count. | +| `only_nonzero_diffs` | `true` | Render status only for changed items. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### Variables + +| گۆڕاو | نموونە | Description | +| ----------------- | ------ | ------------------------------------------- | +| added | `1` | The current number of added lines | +| deleted | `2` | The current number of deleted lines | +| added_style\* | | Mirrors the value of option `added_style` | +| deleted_style\* | | Mirrors the value of option `deleted_style` | + +*: This variable can only be used as a part of a style string + +### نموونە + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. -When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set. +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. ### Options @@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | Option | Default | Description | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol]($style) '` | The format for the module. | -| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `style` | `"yellow bold"` | The style for the module. | +| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | The style for the module. | | `disabled` | `false` | Disables the `guix_shell` module. | ### Variables @@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `["gradle"]` | Which folders should trigger this module. | -| `style` | `"bold bright-cyan"` | The style for the module. | +| `detect_folders` | `['gradle']` | Which folders should trigger this module. | +| `style` | `'bold bright-cyan'` | The style for the module. | | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | Option | Default | Description | | ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. | -| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. | -| `style` | `"bold fg:202"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. | +| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. | +| `style` | `'bold fg:202'` | The style for the module. | | `disabled` | `false` | Disables the `haxe` module. | ### Variables @@ -2107,14 +2195,15 @@ The `hostname` module shows the system hostname. ### Options -| Option | Default | Description | -| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | -| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | -| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation | -| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | -| `style` | `'bold dimmed green'` | The style for the module. | -| `disabled` | `false` | Disables the `hostname` module. | +| Option | Default | Description | +| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | +| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | +| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation. | +| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | +| `style` | `'bold dimmed green'` | The style for the module. | +| `disabled` | `false` | Disables the `hostname` module. | ### Variables @@ -2126,7 +2215,9 @@ The `hostname` module shows the system hostname. *: This variable can only be used as a part of a style string -### نموونە +### Examples + +#### Always show the hostname ```toml # ~/.config/starship.toml @@ -2138,6 +2229,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Hide the hostname in remote tmux sessions + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met: @@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc' ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. ::: tip @@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten ### Options +::: ئاگادارکردنەوە + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + | Option | Default | Description | | ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | | `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | | `style` | `'cyan bold'` | The style for the module. | -| `context_aliases` | `{}` | Table of context aliases to display. | -| `user_aliases` | `{}` | Table of user aliases to display. | +| `context_aliases`* | `{}` | Table of context aliases to display. | +| `user_aliases`* | `{}` | Table of user aliases to display. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | +| `contexts` | `[]` | Customized styles and symbols for specific contexts. | | `disabled` | `true` | Disables the `kubernetes` module. | +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| گۆڕاو | Description | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `style` | The style for the module when using this context. If not set, will use module's style. | +| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + ### Variables | گۆڕاو | نموونە | Description | @@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Regex Matching +#### Kubernetes Context specific config -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. - -Long and automatically generated cluster names can be identified and shortened using regular expressions: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Line Break @@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_folders` | `['node_modules']` | Which folders should trigger this module. | | `style` | `'bold green'` | The style for the module. | | `disabled` | `false` | Disables the `nodejs` module. | -| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | +| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables @@ -2890,8 +3021,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | The format for the module. | -| `style` | `"bold white"` | The style for the module. | +| `format` | `'[$symbol]($style)'` | The format for the module. | +| `style` | `'bold white'` | The style for the module. | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met: | `symbol` | `'🐍 '` | A format string representing the symbol of Python | | `style` | `'yellow bold'` | The style for the module. | | `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `['py']` | Which extensions should trigger this module | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | @@ -3562,22 +3693,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `'bsh'` | A format string used to represent bash. | -| `fish_indicator` | `'fsh'` | A format string used to represent fish. | -| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | -| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | -| `ion_indicator` | `'ion'` | A format string used to represent ion. | -| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | -| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | -| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | -| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | -| `nu_indicator` | `'nu'` | A format string used to represent nu. | -| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | -| `format` | `'[$indicator]($style) '` | The format for the module. | -| `style` | `'white bold'` | The style for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | Default | Description | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | The style for the module. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https: | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables this module. | ### Variables @@ -4009,6 +4141,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +By default, the module will be shown if any of the following conditions are met: + +- The current directory contains a `template.typ` file +- The current directory contains any `*.typ` file + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | The style for the module. | +| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. | +| `detect_files` | `['template.typ']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `disabled` | `false` | Disables the `daml` module. | + +### Variables + +| گۆڕاو | نموونە | Description | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + ## Username The `username` module shows active user's username. The module will be shown if any of the following conditions are met: diff --git a/docs/ckb-IR/faq/README.md b/docs/ckb-IR/faq/README.md index b86e8a5f1..34bac692b 100644 --- a/docs/ckb-IR/faq/README.md +++ b/docs/ckb-IR/faq/README.md @@ -120,3 +120,11 @@ If Starship was installed using the install script, the following command will d # Locate and delete the starship binary sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/ckb-IR/guide/README.md b/docs/ckb-IR/guide/README.md index f4f5d6dd7..00d92ba41 100644 --- a/docs/ckb-IR/guide/README.md +++ b/docs/ckb-IR/guide/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="شوێن @StarshipPrompt بکەوە لەسەر تویتەر" /> + Stand With Ukraine

@@ -143,8 +148,6 @@ />

-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

diff --git a/docs/ckb-IR/presets/README.md b/docs/ckb-IR/presets/README.md index 58dece9f9..0e31d4555 100644 --- a/docs/ckb-IR/presets/README.md +++ b/docs/ckb-IR/presets/README.md @@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). [![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) diff --git a/docs/ckb-IR/presets/gruvbox-rainbow.md b/docs/ckb-IR/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..83bc24e14 --- /dev/null +++ b/docs/ckb-IR/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#gruvbox-rainbow) + +# Gruvbox Rainbow Preset + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png) + +### پێشمەرجەکان + +- [فۆنتێکی Nerd](https://www.nerdfonts.com/) دامەزراوە و چالاککراوە لە تێرمیناڵەکەتا + +### ڕێکخستن + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/ckb-IR/presets/jetpack.md b/docs/ckb-IR/presets/jetpack.md new file mode 100644 index 000000000..d959acf4d --- /dev/null +++ b/docs/ckb-IR/presets/jetpack.md @@ -0,0 +1,24 @@ +[Return to Presets](./README.md#jetpack) + +# Jetpack Preset + +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 uses the terminal's color theme. + +![Screenshot of Jetpack preset](/presets/img/jetpack.png) + +### Prerequisite + +- 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. + +### ڕێکخستن + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/config/README.md b/docs/config/README.md index ac116b9d6..42e79ca21 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -219,6 +219,14 @@ This is the list of prompt-wide configuration options. | `add_newline` | `true` | Inserts blank line between shell prompts. | | `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting +`follow_symlinks` to `false`. + +::: ### Example @@ -315,6 +323,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -328,6 +337,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -374,6 +384,9 @@ date is read from the `AWSUME_EXPIRATION` env var. When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile +is read from the `AWS_SSO_PROFILE` env var. + ### Options | Option | Default | Description | @@ -383,7 +396,7 @@ falls back to the `x_security_token_expires` key. | `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. | | `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | | `style` | `'bold yellow'` | The style for the module. | -| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | +| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -556,7 +569,7 @@ style = 'bold red' [[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = 'bold yellow' -discharging_symbol = '💦' +discharging_symbol = '💦 ' # when capacity is over 30%, the battery indicator will not be displayed ``` @@ -648,17 +661,17 @@ file. ### Options -| Option | Default | Description | -| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'C '` | The symbol used before displaying the compiler details | -| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | -| `style` | `'bold 149'` | The style for the module. | -| `disabled` | `false` | Disables the `c` module. | +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | +| `style` | `'bold 149'` | The style for the module. | +| `disabled` | `false` | Disables the `c` module. | ### Variables @@ -1196,6 +1209,48 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | The style for the module. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['.envrc']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Variables + +| Variable | Example | Description | +| -------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbol | | Mirrors the value of option `symbol`. | +| style\* | `red bold` | Mirrors the value of option `style`. | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Docker Context The `docker_context` module shows the currently active @@ -1514,7 +1569,7 @@ By default the module will be shown if any of the following conditions are met: | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `style` | `'bold green'` | The style for the module. | -| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. | +| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | | `disabled` | `false` | Disables the `fennel` module. | @@ -1646,7 +1701,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. When the module is enabled it will always be active, unless `detect_env_vars` has -been set in which case the module will only be active be active when one of the +been set in which case the module will only be active when one of the environment variables has been set. ### Options @@ -2059,8 +2114,8 @@ The module will be shown when inside a guix-shell environment. | Option | Default | Description | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol]($style) '` | The format for the module. | -| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `style` | `"yellow bold"` | The style for the module. | +| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | The style for the module. | | `disabled` | `false` | Disables the `guix_shell` module. | ### Variables @@ -2098,13 +2153,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `["gradle"]` | Which folders should trigger this module. | -| `style` | `"bold bright-cyan"` | The style for the module. | +| `detect_folders` | `['gradle']` | Which folders should trigger this module. | +| `style` | `'bold bright-cyan'` | The style for the module. | | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2164,13 +2219,13 @@ By default the module will be shown if any of the following conditions are met: | Option | Default | Description | | ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. | -| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. | -| `style` | `"bold fg:202"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. | +| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. | +| `style` | `'bold fg:202'` | The style for the module. | | `disabled` | `false` | Disables the `haxe` module. | ### Variables @@ -2937,7 +2992,7 @@ By default the module will be shown if any of the following conditions are met: | `detect_folders` | `['node_modules']` | Which folders should trigger this module. | | `style` | `'bold green'` | The style for the module. | | `disabled` | `false` | Disables the `nodejs` module. | -| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | +| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables @@ -3104,8 +3159,8 @@ To enable it, set `disabled` to `false` in your configuration file. | Option | Default | Description | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | The format for the module. | -| `style` | `"bold white"` | The style for the module. | +| `format` | `'[$symbol]($style)'` | The format for the module. | +| `style` | `'bold white'` | The style for the module. | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -3474,7 +3529,7 @@ By default the module will be shown if any of the following conditions are met: | `symbol` | `'🐍 '` | A format string representing the symbol of Python | | `style` | `'yellow bold'` | The style for the module. | | `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `['py']` | Which extensions should trigger this module | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | @@ -3808,22 +3863,23 @@ To enable it, set `disabled` to `false` in your configuration file. ### Options -| Option | Default | Description | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `'bsh'` | A format string used to represent bash. | -| `fish_indicator` | `'fsh'` | A format string used to represent fish. | -| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | -| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | -| `ion_indicator` | `'ion'` | A format string used to represent ion. | -| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | -| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | -| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | -| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | -| `nu_indicator` | `'nu'` | A format string used to represent nu. | -| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | -| `format` | `'[$indicator]($style) '` | The format for the module. | -| `style` | `'white bold'` | The style for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | Default | Description | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | The style for the module. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3945,14 +4001,14 @@ The module will be shown if any of the following conditions are met: | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables this module. | ### Variables @@ -4270,6 +4326,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +By default, the module will be shown if any of the following conditions are met: + +- The current directory contains a `template.typ` file +- The current directory contains any `*.typ` file + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | The style for the module. | +| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. | +| `detect_files` | `['template.typ']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `disabled` | `false` | Disables the `daml` module. | + +### Variables + +| Variable | Example | Description | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + ## Username The `username` module shows active user's username. diff --git a/docs/de-DE/config/README.md b/docs/de-DE/config/README.md index d5d65f99e..96b5ba07e 100644 --- a/docs/de-DE/config/README.md +++ b/docs/de-DE/config/README.md @@ -206,6 +206,13 @@ Dies ist eine Liste mit Prompt-weiten Konfigurationsoptionen. | `add_newline` | `true` | Fügt leere Zeilen zwischen Shell Prompts ein. | | `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: ### Beispiel @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### Optionen | Option | Standardwert | Beschreibung | @@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `region_aliases` | `{}` | Tabelle der Regionaliasen, die zusätzlich zum AWS-Namen angezeigt werden sollen. | | `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | | `style` | `'bold yellow'` | Stil für dieses Modul. | -| `expiration_symbol` | `X` | Das Symbol, das angezeigt wird, wenn die temporären Anmeldeinformationen abgelaufen sind. | +| `expiration_symbol` | `'X'` | Das Symbol, das angezeigt wird, wenn die temporären Anmeldeinformationen abgelaufen sind. | | `disabled` | `false` | Deaktiviert das `aws`-Modul. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu ### Optionen -| Option | Standardwert | Beschreibung | -| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'C '` | The symbol used before displaying the compiler details | -| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | -| `style` | `'bold 149'` | Stil für dieses Modul. | -| `disabled` | `false` | Disables the `c` module. | +| Option | Standardwert | Beschreibung | +| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | +| `style` | `'bold 149'` | Stil für dieses Modul. | +| `disabled` | `false` | Disables the `c` module. | ### Variables @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### Optionen + +| Option | Standartwert | Beschreibung | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | Das Format für das Modul. | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | Stil für dieses Modul. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['.envrc']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Variables + +| Variable | Beispiel | Beschreibung | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbol | | Spiegelt den Wert der Option `symbol`. | +| style\* | `red bold` | Spiegelt den Wert der Option `style`. | + +*: This variable can only be used as a part of a style string + +### Beispiel + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Docker Context The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). @@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `style` | `'bold green'` | Stil für dieses Modul. | -| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. | +| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | | `disabled` | `false` | Disables the `fennel` module. | @@ -1524,11 +1577,46 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### Optionen + +| Option | Standartwert | Beschreibung | +| -------------------- | ------------------------------------------------------------ | ------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Das Format für das Modul. | +| `added_style` | `'bold green'` | The style for the added count. | +| `deleted_style` | `'bold red'` | The style for the deleted count. | +| `only_nonzero_diffs` | `true` | Render status only for changed items. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### Variables + +| Variable | Beispiel | Beschreibung | +| ----------------- | -------- | ------------------------------------------- | +| added | `1` | The current number of added lines | +| deleted | `2` | The current number of deleted lines | +| added_style\* | | Mirrors the value of option `added_style` | +| deleted_style\* | | Mirrors the value of option `deleted_style` | + +*: This variable can only be used as a part of a style string + +### Beispiel + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. -When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set. +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. ### Optionen @@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | Option | Standartwert | Beschreibung | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol]($style) '` | Das Format für das Modul. | -| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `style` | `"yellow bold"` | Stil für dieses Modul. | +| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `guix_shell` module. | ### Variables @@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | Option | Standartwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `["gradle"]` | Which folders should trigger this module. | -| `style` | `"bold bright-cyan"` | Stil für dieses Modul. | +| `detect_folders` | `['gradle']` | Which folders should trigger this module. | +| `style` | `'bold bright-cyan'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | Option | Standartwert | Beschreibung | | ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. | -| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. | -| `style` | `"bold fg:202"` | Stil für dieses Modul. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. | +| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. | +| `style` | `'bold fg:202'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `haxe` module. | ### Variables @@ -2107,14 +2195,15 @@ Das `hostname`-Modul zeigt den Hostnamen des Systems an. ### Optionen -| Option | Standartwert | Beschreibung | -| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `ssh_only` | `true` | Zeigt den Hostnamen nur, wenn via SSH-Sitzung verbunden. | -| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | -| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation | -| `format` | `'[$ssh_symbol$hostname]($style) in '` | Das Format für das Modul. | -| `style` | `'bold dimmed green'` | Stil für dieses Modul. | -| `disabled` | `false` | Deaktiviert das `hostname`-Modul. | +| Option | Standartwert | Beschreibung | +| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | Zeigt den Hostnamen nur, wenn via SSH-Sitzung verbunden. | +| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | +| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation. | +| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | Das Format für das Modul. | +| `style` | `'bold dimmed green'` | Stil für dieses Modul. | +| `disabled` | `false` | Deaktiviert das `hostname`-Modul. | ### Variables @@ -2126,7 +2215,9 @@ Das `hostname`-Modul zeigt den Hostnamen des Systems an. *: This variable can only be used as a part of a style string -### Beispiel +### Beispiele + +#### Always show the hostname ```toml # ~/.config/starship.toml @@ -2138,6 +2229,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Hide the hostname in remote tmux sessions + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met: @@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc' ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. ::: tip @@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten ### Optionen +::: warning + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + | Option | Standartwert | Beschreibung | | ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | | `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | Das Format für das Modul. | | `style` | `'cyan bold'` | Stil für dieses Modul. | -| `context_aliases` | `{}` | Table of context aliases to display. | -| `user_aliases` | `{}` | Table of user aliases to display. | +| `context_aliases`* | `{}` | Table of context aliases to display. | +| `user_aliases`* | `{}` | Table of user aliases to display. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | +| `contexts` | `[]` | Customized styles and symbols for specific contexts. | | `disabled` | `true` | Deaktiviert das `kubernetes`-Modul. | +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| Variable | Beschreibung | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `style` | The style for the module when using this context. If not set, will use module's style. | +| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + ### Variables | Variable | Beispiel | Beschreibung | @@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Regex Matching +#### Kubernetes Context specific config -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. - -Long and automatically generated cluster names can be identified and shortened using regular expressions: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Zeilenumbruch @@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_folders` | `['node_modules']` | Which folders should trigger this module. | | `style` | `'bold green'` | Stil für dieses Modul. | | `disabled` | `false` | Deaktiviert das `nodejs`-Modul. | -| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | +| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables @@ -2890,8 +3021,8 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis | Option | Standartwert | Beschreibung | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | Das Format für das Modul. | -| `style` | `"bold white"` | Stil für dieses Modul. | +| `format` | `'[$symbol]($style)'` | Das Format für das Modul. | +| `style` | `'bold white'` | Stil für dieses Modul. | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met: | `symbol` | `'🐍 '` | A format string representing the symbol of Python | | `style` | `'yellow bold'` | Stil für dieses Modul. | | `pyenv_version_name` | `false` | Verwende `pyenv` um die Python-Versionzu beziehen. | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `['py']` | Which extensions should trigger this module | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | @@ -3562,22 +3693,23 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis ### Optionen -| Option | Standartwert | Beschreibung | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `'bsh'` | A format string used to represent bash. | -| `fish_indicator` | `'fsh'` | A format string used to represent fish. | -| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | -| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | -| `ion_indicator` | `'ion'` | A format string used to represent ion. | -| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | -| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | -| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | -| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | -| `nu_indicator` | `'nu'` | A format string used to represent nu. | -| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | -| `format` | `'[$indicator]($style) '` | Das Format für das Modul. | -| `style` | `'white bold'` | Stil für dieses Modul. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | Standartwert | Beschreibung | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | Das Format für das Modul. | +| `style` | `'white bold'` | Stil für dieses Modul. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https: | Option | Standartwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | -| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | Stil für dieses Modul. | +| `style` | `'bold blue'` | Stil für dieses Modul. | | `disabled` | `false` | Disables this module. | ### Variables @@ -4009,6 +4141,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +By default, the module will be shown if any of the following conditions are met: + +- Das aktuelle Verzeichnis enthält eine `template.typ`-Datei +- The current directory contains any `*.typ` file + +### Optionen + +| Option | Standartwert | Beschreibung | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | Stil für dieses Modul. | +| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. | +| `detect_files` | `['template.typ']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `disabled` | `false` | Disables the `daml` module. | + +### Variables + +| Variable | Beispiel | Beschreibung | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| symbol | | Spiegelt den Wert der Option `symbol` | +| style\* | | Spiegelt den Wert der Option `style` | + +*: This variable can only be used as a part of a style string + ## Username Das `username` Modul zeigt den Namen des aktiven Benutzers. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: diff --git a/docs/de-DE/faq/README.md b/docs/de-DE/faq/README.md index ce856da8f..49cb16931 100644 --- a/docs/de-DE/faq/README.md +++ b/docs/de-DE/faq/README.md @@ -120,3 +120,11 @@ Wenn Starship mit Hilfe des Installationsscripts installiert wurde, entfernt der # Locate and delete the starship binary sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/de-DE/guide/README.md b/docs/de-DE/guide/README.md index ef1bfa88e..c2744e21f 100644 --- a/docs/de-DE/guide/README.md +++ b/docs/de-DE/guide/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="Folge @StarshipPrompt auf Twitter" /> + Stand With Ukraine

@@ -147,8 +152,6 @@ />

-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

-**Der minimalistische, super schnelle und unendlich anpassbare Prompt für jede Shell!** +**Minimale, super schnelle und unendlich anpassbare Prompt für jede Shell!** - **Schnell:** sie ist schnell – _sehr, sehr_ schnell! 🚀 - **Konfigurierbar:** konfiguriere jedes Detail der Prompt. @@ -229,6 +232,7 @@ Alternatively, install Starship using any of the following package managers: | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| openSUSE | [OSS](https://software.opensuse.org/package/starship) | `zypper in starship` | | Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
diff --git a/docs/de-DE/presets/README.md b/docs/de-DE/presets/README.md index bf65e7782..3d975aee5 100644 --- a/docs/de-DE/presets/README.md +++ b/docs/de-DE/presets/README.md @@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). [![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) diff --git a/docs/de-DE/presets/gruvbox-rainbow.md b/docs/de-DE/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..2d0ffec69 --- /dev/null +++ b/docs/de-DE/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[Zurück zu den Voreinstellungen](./README.md#gruvbox-rainbow) + +# Gruvbox Rainbow Preset + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png) + +### Voraussetzungen + +- Eine [Nerd Font](https://www.nerdfonts.com/) installiert und aktiviert in deinem Terminal + +### Konfiguration + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[Zum Herunterladen der TOML Datei klicken](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/de-DE/presets/jetpack.md b/docs/de-DE/presets/jetpack.md new file mode 100644 index 000000000..c7fa0e9cf --- /dev/null +++ b/docs/de-DE/presets/jetpack.md @@ -0,0 +1,24 @@ +[Zurück zu den Voreinstellungen](./README.md#jetpack) + +# Jetpack Preset + +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 uses the terminal's color theme. + +![Screenshot of Jetpack preset](/presets/img/jetpack.png) + +### Prerequisite + +- 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. + +### Konfiguration + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[Zum Herunterladen der TOML Datei klicken](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/es-ES/config/README.md b/docs/es-ES/config/README.md index 2735df220..5439fec79 100644 --- a/docs/es-ES/config/README.md +++ b/docs/es-ES/config/README.md @@ -78,7 +78,7 @@ In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared wit The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. -| Symbol | Tipo | Notas | +| Simbol | Tipo | Notas | | ------ | ------------------------- | ------------------------------------------------------ | | `'` | literal string | less escaping | | `"` | string | more escaping | @@ -152,15 +152,15 @@ En la segunda parte, que está encerrada entre `()`, es una [cadena de estilo](# Por ejemplo: -- `'[on](red bold)'` will print a string `on` with bold text colored red. -- `'[⌘ $version](bold green)'` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green. -- `'[a [b](red) c](green)'` will print `a b c` with `b` red, and `a` and `c` green. +- `'[on](red bold)'` imprimirá el texto `on` con color rojo y en negrita. +- `'[⌘ $version](bold green)'` imprimirá el símbolo `⌘` seguido por el contenido de la variable `version` con color verde en negrita. +- `'[a [b](red) c](green)'` imprimirá `a b c` donde `b` es rojo, pero `a` y `c` son verde. #### Cadenas de Estilo La mayoría de los módulos de starship permiten configurar sus estilos de visualización. Esto se consigue con una entrada (normalmente llamada `style`) que no es más que un texto donde se especifica la configuración. A continuación mostramos algunos ejemplos de cadenas de estilo junto con su funcionalidad. Para más detalles sobre la sintaxis completa, consultar [la guía de configuración avanzada](/advanced-config/). -- `'fg:green bg:blue'` sets green text on a blue background +- `'fg:green bg:blue'` define el texto con color verde y el color de fondo azul - `'bg:blue fg:bright-green'` sets bright green text on a blue background - `'bold fg:27'` sets bold text with [ANSI color](https://i.stack.imgur.com/KTSQa.png) 27 - `'underline bg:#bf5700'` sets underlined text on a burnt orange background @@ -206,6 +206,13 @@ Esta es la lista de opciones de configuración del prompt. | `add_newline` | `true` | Inserta un línea en blanco entre las instrucciones del intérprete de comandos. | | `paleta` | `''` | Establece la paleta de color de `paletas` a utilizar. | | `paletas` | `{}` | Colección de paletas de colores que asignan [colores](/advanced-config/#style-strings) a nombres definidos por el usuario. Tenga en cuenta que las paletas de colores no pueden hacer referencia a sus propias definiciones de color. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: ### Ejemplo @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -345,12 +355,14 @@ The module will display a profile only if its credentials are present in `~/.aws Cuando se utiliza [aws-vault](https://github.com/99designs/aws-vault), el perfil se obtiene de la variable de entorno `AWS_VAULT` y la fecha de expiración de credenciales se obtiene de la variable de entorno `AWS_SESSION_EXPIRATION`. -Cuando se utiliza [awsu](https://github.com/kreuzwerker/awsu) el perfil se lee de la variable de entorno `AWSU_PROFILE`. +Cuando uses [awsu](https://github.com/kreuzwerker/awsu) el perfil se obtiene de la variable de entorno `AWSU_PROFILE`. Cuando se utiliza [AWSume](https://awsu.me), el perfil se obtiene de la variable de entorno `AWSUME_PROFILE` y la fecha de expiración de credenciales se obtiene de la variable de entorno `AWSUME_EXPIRATION`. When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### Opciones | Opción | Predeterminado | Descripción | @@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `region_aliases` | `{}` | Tabla de alias de región para mostrar además del nombre AWS. | | `profile_aliases` | `{}` | Tabla de alias de región para mostrar además del nombre AWS. | | `style` | `'bold yellow'` | El estilo del módulo. | -| `expiration_symbol` | `X` | El símbolo mostrado cuando las credenciales temporales han caducado. | +| `expiration_symbol` | `'X'` | El símbolo mostrado cuando las credenciales temporales han caducado. | | `disabled` | `false` | Desactiva el módulo AWS. | | `force_display` | `false` | Si `true` muestra información incluso si `credentials`, `credential_process` o `sso_start_url` no han sido configuradas. | @@ -472,7 +484,7 @@ very-long-subscription-name = 'vlsn' ## Battery -El módulo `battery` muestra la cantidad de batería y si se está cargando o no. El módulo solamente es visible cuando la batería del dispositivo está por debajo del 10%. +El módulo `battery` muestra qué tan cargada está la batería del dispositivo y su estado de carga actual. El módulo solamente es visible cuando la batería del dispositivo está por debajo del 10%. ### Opciones @@ -620,17 +632,17 @@ El módulo `c` muestra información sobre su compilador de C. Por defecto el mó ### Opciones -| Opción | Predeterminado | Descripción | -| ------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | La cadena de formato para el módulo. | -| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'C '` | El símbolo usado antes de mostrar los detalles del compilador | -| `detect_extensions` | `['c', 'h']` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | Cómo detectar cuál compilador es | -| `style` | `'bold 149'` | El estilo del módulo. | -| `disabled` | `false` | Deshabilita el módulo `c`. | +| Opción | Predeterminado | Descripción | +| ------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | La cadena de formato para el módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | El símbolo usado antes de mostrar los detalles del compilador | +| `detect_extensions` | `['c', 'h']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | +| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | Cómo detectar cuál compilador es | +| `style` | `'bold 149'` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `c`. | ### Variables @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### Opciones + +| Opción | Predeterminado | Descripción | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | El formato del módulo. | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | El estilo del módulo. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['.envrc']` | Qué nombres de archivo deberían activar este módulo. | +| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Variables + +| Variable | Ejemplo | Descripción | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbol | | Refleja el valor de la opción `symbol`. | +| style\* | `red bold` | Refleja el valor de la opción `style`. | + +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo + +### Ejemplo + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Contexto de Docker El módulo `docker_context` muestra el [contexto de Docker](https://docs.docker.com/engine/context/working-with-contexts/) actualmente activo si no está definido en `default` o si las variables de entorno `DOCKER_MACHINE_NAME`, `DOCKER_HOST` o `DOCKER_CONTEXT` están definidas (como se entiende para sobrescribir el contexto en uso). @@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `style` | `'bold green'` | El estilo del módulo. | -| `detect_extensions` | `[fnl]` | Qué extensiones deberían activar este módulo. | +| `detect_extensions` | `['fnl']` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | | `disabled` | `false` | Disables the `fennel` module. | @@ -1524,11 +1577,46 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### Opciones + +| Opción | Predeterminado | Descripción | +| -------------------- | ------------------------------------------------------------ | -------------------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | El formato del módulo. | +| `added_style` | `'bold green'` | El estilo para el recuento añadido. | +| `deleted_style` | `'bold red'` | El estilo para el recuento eliminado. | +| `only_nonzero_diffs` | `true` | Mostrar sólo el estado de los elementos cambiados. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### Variables + +| Variable | Ejemplo | Descripción | +| ----------------- | ------- | --------------------------------------------- | +| añadido | `1` | El número actual de líneas añadidas | +| eliminado | `2` | El número actual de líneas eliminadas | +| added_style\* | | Refleja el valor de la opción `added_style` | +| deleted_style\* | | Refleja el valor de la opción `deleted_style` | + +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo + +### Ejemplo + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) El módulo `gcloud` muestra la configuración actual para el CLI de [`gcloud`](https://cloud.google.com/sdk/gcloud). Esto se basa en el archivo `~/.config/gcloud/active_config`, el archivo `~/.config/gcloud/configurations/config_{CONFIG NAME}` y la variable de entorno `CLOUDSDK_CONFIG`. -When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set. +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. ### Opciones @@ -1548,7 +1636,7 @@ When the module is enabled it will always be active, unless `detect_env_vars` ha | --------- | ------------- | ----------------------------------------------------------------------------- | | region | `us-central1` | La actual región GCP | | cuenta | `foo` | El perfil actual de GCP | -| dominio | `ejemplo.com` | El dominio actual del perfil GCP | +| dominio | `example.com` | El dominio actual del perfil GCP | | proyecto | | El proyecto GCP actual | | activo | `default` | El nombre de configuración activo escrito en `~/.config/gcloud/active_config` | | symbol | | Refleja el valor de la opción `symbol` | @@ -1745,7 +1833,7 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable | Variable | Ejemplo | Descripción | | ----------------- | ------- | --------------------------------------------- | | añadido | `1` | El número actual de líneas añadidas | -| borrado | `2` | El número actual de líneas eliminadas | +| eliminado | `2` | El número actual de líneas eliminadas | | added_style\* | | Refleja el valor de la opción `added_style` | | deleted_style\* | | Refleja el valor de la opción `deleted_style` | @@ -1786,7 +1874,7 @@ El módulo Git Status es muy lento en los directorios de Windows (por ejemplo ba | `modificado` | `'!'` | El formato de `modified` | | `staged` | `'+'` | El formato de `staged` | | `renamed` | `'»'` | El formato de `renamed` | -| `borrado` | `'✘'` | El formato de `deleted` | +| `eliminado` | `'✘'` | El formato de `deleted` | | `typechanged` | `""` | The format of `typechange` | | `style` | `'bold red'` | El estilo del módulo. | | `ignore_submodules` | `false` | Ignorar cambios a los submódulos. | @@ -1807,7 +1895,7 @@ Las siguientes variables se pueden utilizar en `format`: | `modificado` | Muestra `modified` cuando hay modificaciones de archivo en el directorio de trabajo. | | `staged` | Muestra `staged` cuando se ha añadido un nuevo archivo al área de preparación. | | `renamed` | Muestra `renamed` cuando un archivo renombrado ha sido añadido al área de preparación. | -| `borrado` | Muestra `deleted` cuando un archivo ha sido añadido al área de preparación. | +| `eliminado` | Muestra `deleted` cuando un archivo ha sido añadido al área de preparación. | | `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | Refleja el valor de la opción `style` | @@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | Opción | Predeterminado | Descripción | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'vía [$symbol]($style) '` | El formato del módulo. | -| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `style` | `"yellow bold"` | El estilo del módulo. | +| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | El estilo del módulo. | | `disabled` | `false` | Disables the `guix_shell` module. | ### Variables @@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | Opción | Predeterminado | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | Qué extensiones deberían activar este módulo. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `["gradle"]` | Qué carpetas deberían activar este módulo. | -| `style` | `"bold bright-cyan"` | El estilo del módulo. | +| `detect_folders` | `['gradle']` | Qué carpetas deberían activar este módulo. | +| `style` | `'bold bright-cyan'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `gradle`. | | `recursivo` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | Opción | Predeterminado | Descripción | | ------------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["hx", "hxml"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Qué carpetas deberían activar estos módulos. | -| `symbol` | `"⌘ "` | Una cadena de formato que representa el símbolo de Helm. | -| `style` | `"bold fg:202"` | El estilo del módulo. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Qué nombres de archivo deberían activar este módulo. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Qué carpetas deberían activar estos módulos. | +| `symbol` | `'⌘ '` | Una cadena de formato que representa el símbolo de Helm. | +| `style` | `'bold fg:202'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `haxe`. | ### Variables @@ -2107,26 +2195,41 @@ El módulo `hostname` muestra el nombre de host del sistema. ### Opciones -| Opción | Predeterminado | Descripción | -| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ssh_only` | `true` | Mostrar sólo el nombre de host cuando esté conectado a una sesión SSH. | -| `ssh_symbol` | `'🌐 '` | Una cadena de formato que representa el símbolo cuando se conecta a la sesión SSH. | -| `trim_at` | `'.'` | Cadena en la que el nombre del host se corta, después de la primera coincidencia. `'.'` will stop after the first dot. `''` will disable any truncation | -| `format` | `'[$ssh_symbol$hostname]($style) in '` | El formato del módulo. | -| `style` | `'negrita oscurecida verde'` | El estilo del módulo. | -| `disabled` | `false` | Deshabilita el módulo `hostname`. | +| Opción | Predeterminado | Descripción | +| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `ssh_only` | `true` | Mostrar sólo el nombre de host cuando esté conectado a una sesión SSH. | +| `ssh_symbol` | `'🌐 '` | Una cadena de formato que representa el símbolo cuando se conecta a la sesión SSH. | +| `trim_at` | `'.'` | Cadena en la que el nombre del host se corta, después de la primera coincidencia. `'.'` will stop after the first dot. `''` deshabilitará cualquier truncamiento. | +| `detect_env_vars` | `[]` | Qué variable(s) de entorno deben activar este módulo. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | El formato del módulo. | +| `style` | `'negrita oscurecida verde'` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `hostname<0>. + + + -### Variables +

Variables

-| Variable | Ejemplo | Descripción | -| --------------- | ------------- | -------------------------------------------------------------- | -| nombre del host | `computadora` | El nombre de host de la computadora | -| style\* | | Refleja el valor de la opción `style` | -| ssh_symbol | `'🌏 '` | El símbolo a representar cuando está conectado a la sesión SSH | + + + + + + + + + + + +
VariableEjemploDescripción
nombre del hostcomputadora` | El nombre de host de la computadora | +| style\* | | Refleja el valor de la opción `style` | +| ssh_symbol | `'🌏 '` | El símbolo a representar cuando está conectado a la sesión SSH | *: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo -### Ejemplo +### Ejemplos + +#### Mostrar siempre el nombre del host ```toml # ~/.config/starship.toml @@ -2138,6 +2241,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Ocultar el nombre de host en sesiones remotas de tmux + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java El módulo `java` muestra la versión instalada de [Java](https://www.oracle.com/java/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: @@ -2317,13 +2431,13 @@ symbol = '🅺 ' # ~/.config/starship.toml [kotlin] -# Uses the Kotlin Compiler binary to get the installed version +# Utiliza el compilador binario Kotlink para obtener la versión instalada kotlin_binary = 'kotlinc' ``` ## Kubernetes -Muestra el nombre actual del [contexto de Kubernetes](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) y, si se establece, el espacio de nombres, el usuario y el clúster del archivo kubeconfig. El espacio de nombres necesita establecerse en el archivo kubeconfig, esto puede hacerse mediante `kubectl config set-context starship-context --namespace astronaut`. Del mismo modo, el usuario y clúster pueden establecerse con `kubectl config set-context starship-context --user starship-user` y `kubectl config set-context starship-context --cluster starship-cluster`. Si se establece la variable de entorno `$KUBECONFIG`, el módulo usará eso si no usará el `~/.kube/config`. +Muestra el nombre actual del [contexto de Kubernetes](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) y, si se establece, el espacio de nombres, el usuario y el clúster del archivo kubeconfig. El espacio de nombres necesita establecerse en el archivo kubeconfig, esto puede hacerse mediante `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. Si se establece la variable de entorno `$KUBECONFIG`, el módulo usará eso si no usará el `~/.kube/config`. ::: tip @@ -2335,18 +2449,40 @@ When the module is enabled it will always be active, unless any of `detect_exten ### Opciones +::: warning + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + | Opción | Predeterminado | Descripción | | ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------------- | | `symbol` | `'☸ '` | Una cadena de formato que representa el símbolo mostrado antes del Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | El formato del módulo. | | `style` | `'cyan bold'` | El estilo del módulo. | -| `context_aliases` | `{}` | Tabla de alias de contexto a mostrar. | -| `user_aliases` | `{}` | Table of user aliases to display. | +| `context_aliases`* | `{}` | Tabla de alias de contexto a mostrar. | +| `user_aliases`* | `{}` | Table of user aliases to display. | | `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | +| `contextos` | `[]` | Customized styles and symbols for specific contexts. | | `disabled` | `true` | Desactiva el módulo `kubernetes`. | +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| Variable | Descripción | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `style` | The style for the module when using this context. If not set, will use module's style. | +| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + ### Variables | Variable | Ejemplo | Descripción | @@ -2368,13 +2504,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2519,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Busqueda por Regex +#### Configuración específica del Contexto de Kubernetes -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -La expresión regular debe coincidir en todo el contexto de kube. los grupos de captura pueden ser referenciados usando `$name` y `$N` en el reemplazo. Esto está más explicado en la documentación del [crate regex](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace). - -Los nombres de cluster generados de forma larga y automática pueden ser identificados y abreviados usando expresiones regulares: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Salto de línea @@ -2730,7 +2873,7 @@ El módulo `nodejs` muestra la versión instalada de [Node.js](https://nodejs.or | `detect_folders` | `['node_modules']` | Qué carpetas deberían activar este módulo. | | `style` | `'bold green'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `nodejs`. | -| `not_capable_style` | `bold red` | El estilo para el módulo cuando una propiedad de motores en package.json no coincide con la versión de Node.js. | +| `not_capable_style` | `'bold red'` | El estilo para el módulo cuando una propiedad de motores en package.json no coincide con la versión de Node.js. | ### Variables @@ -2890,8 +3033,8 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable | Opción | Predeterminado | Descripción | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | El formato del módulo. | -| `style` | `"bold white"` | El estilo del módulo. | +| `format` | `'[$symbol]($style)'` | El formato del módulo. | +| `style` | `'bold white'` | El estilo del módulo. | | `disabled` | `true` | Deshabilita el módulo `os`. | | `símbolos` | | A table that maps each operating system to its symbol. | @@ -2969,7 +3112,7 @@ disabled = false [os.symbols] Windows = " " -Arch = "Arch is the best! " +Arch = "Arch es lo mejor! " ``` ## Package Version @@ -2998,14 +3141,14 @@ El módulo `package` se muestra cuando el directorio actual es el repositorio de ### Opciones -| Opción | Predeterminado | Descripción | -| ----------------- | --------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `'is [$symbol$version]($style) '` | El formato del módulo. | -| `symbol` | `'📦 '` | El símbolo usado antes de mostrar la versión del paquete. | -| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `style` | `'bold 208'` | El estilo del módulo. | -| `display_private` | `false` | Activar la visualización de la versión para los paquetes marcados como privados. | -| `disabled` | `false` | Desactiva el módulo `package`. | +| Opción | Predeterminado | Descripción | +| ---------------- | --------------------------------- | --------------------------------------------------------------------------------------- | +| `format` | `'is [$symbol$version]($style) '` | El formato del módulo. | +| `symbol` | `'📦 '` | El símbolo usado antes de mostrar la versión del paquete. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold 208'` | El estilo del módulo. | +| `'📦 '` | `false` | Activar la visualización de la versión para los paquetes marcados como privados. | +| `disabled` | `false` | Desactiva el módulo `package`. | ### Variables @@ -3023,7 +3166,7 @@ El módulo `package` se muestra cuando el directorio actual es el repositorio de # ~/.config/starship.toml [package] -format = 'via [🎁 $version](208 bold) ' +format = 'vía [🎁 $version](208 bold) ' ``` ## Perl @@ -3149,13 +3292,13 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes ### Variables -| Variable | Ejemplo | Descripción | -| --------- | ---------- | -------------------------------------- | -| version | `v0.12.24` | La versión de `pulumi` | -| stack | `dev` | La pila actual de Pulumi | -| username | `alice` | El usuario actual de Pulumi | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| ----------------- | ---------- | -------------------------------------- | +| version | `v0.12.24` | La versión de `pulumi` | +| stack | `dev` | La pila actual de Pulumi | +| nombre de usuario | `alice` | El usuario actual de Pulumi | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | *: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo @@ -3245,7 +3388,7 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes | `symbol` | `'🐍 '` | Una cadena de formato que representa el símbolo de Python | | `style` | `'yellow bold'` | El estilo del módulo. | | `pyenv_version_name` | `false` | Usar pyenv para obtener la versión de Python | -| `pyenv_prefix` | `pyenv` | Prefijo antes de mostrar la versión de pyenv sólo se utiliza si se utiliza pyenv | +| `pyenv_prefix` | `'pyenv'` | Prefijo antes de mostrar la versión de pyenv sólo se utiliza si se utiliza pyenv | | `python_binary` | `['python', 'python3', 'python2']` | Configura los binarios de python que Starship debería ejecutar al obtener la versión. | | `detect_extensions` | `['py']` | Qué extensiones deben activar este módulo | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Qué nombres de archivo deben activar este módulo | @@ -3300,7 +3443,7 @@ detect_extensions = [] # ~/.config/starship.toml [python] -# Muestra la versión de python desde dentro de un entorno virtual local. +# Muestra la versión de python dentro de un entorno virtual local. # # Ten en cuenta que esto solo funcionará cuando el venv esté dentro del proyecto y sólo # funcionará en el directorio que contiene el directorio venv dir pero ¿tal vez esté bien? @@ -3562,22 +3705,23 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable ### Opciones -| Opción | Predeterminado | Descripción | -| ---------------------- | ------------------------- | ----------------------------------------------------------------------- | -| `bash_indicator` | `'bsh'` | Una cadena de formato usada para representar bash. | -| `fish_indicator` | `'fsh'` | Una cadena de formato usada para representar fish. | -| `zsh_indicator` | `'zsh'` | Una cadena de formato usada para representar zsh. | -| `powershell_indicator` | `'psh'` | Una cadena de formato usada para representar powershell. | -| `ion_indicator` | `'ion'` | Una cadena de formato usada para representar ion. | -| `elvish_indicator` | `'esh'` | Una cadena de formato usada para representar elvish. | -| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | -| `xonsh_indicator` | `'xsh'` | Una cadena de formato usada para representar xonsh. | -| `cmd_indicator` | `'cmd'` | Una cadena de formato usada para representar cmd. | -| `nu_indicator` | `'nu'` | Una cadena de formato usada para representar nu. | -| `unknown_indicator` | `''` | El valor por defecto que se mostrará cuando se desconoce el intérprete. | -| `format` | `'[$indicator]($style) '` | El formato del módulo. | -| `style` | `'white bold'` | El estilo del módulo. | -| `disabled` | `true` | Deshabilita el módulo `shell`. | +| Opción | Predeterminado | Descripción | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | Una cadena de formato usada para representar bash. | +| `fish_indicator` | `'fsh'` | Una cadena de formato usada para representar fish. | +| `zsh_indicator` | `'zsh'` | Una cadena de formato usada para representar zsh. | +| `powershell_indicator` | `'psh'` | Una cadena de formato usada para representar powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | Una cadena de formato usada para representar ion. | +| `elvish_indicator` | `'esh'` | Una cadena de formato usada para representar elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | Una cadena de formato usada para representar xonsh. | +| `cmd_indicator` | `'cmd'` | Una cadena de formato usada para representar cmd. | +| `nu_indicator` | `'nu'` | Una cadena de formato usada para representar nu. | +| `unknown_indicator` | `''` | El valor por defecto que se mostrará cuando se desconoce el intérprete. | +| `format` | `'[$indicator]($style) '` | El formato del módulo. | +| `style` | `'white bold'` | El estilo del módulo. | +| `disabled` | `true` | Deshabilita el módulo `shell`. | ### Variables @@ -3694,14 +3838,14 @@ The `solidity` module shows the currently installed version of [Solidity](https: | Opción | Predeterminado | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${major}.${minor}.${patch}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | Qué extensiones deberían activar este módulo. | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${major}.${minor}.${patch}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `style` | `"bold blue"` | El estilo del módulo. | +| `style` | `'bold blue'` | El estilo del módulo. | | `disabled` | `false` | Disables this module. | ### Variables @@ -3857,7 +4001,7 @@ disabled = false ``` ```toml -# En Windows +# On windows # $HOME\.starship\config.toml [sudo] @@ -3901,7 +4045,7 @@ Por defecto, el módulo `swift` muestra la versión instalada de [Swift](https:/ # ~/.config/starship.toml [swift] -format = 'via [🏎 $version](red bold)' +format = 'vía [🏎 $version](red bold)' ``` ## Terraform @@ -3945,7 +4089,7 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes ### Ejemplo -#### Con la versión de Terraform +#### Con Terraform Version ```toml # ~/.config/starship.toml @@ -3954,7 +4098,7 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes format = '[🏎💨 $version$workspace]($style) ' ``` -#### Sin la versión de Terraform +#### Sin Terraform Version ```toml # ~/.config/starship.toml @@ -4009,6 +4153,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: + +- El directorio actual contiene un archivo `template.typ` +- The current directory contains any `*.typ` file + +### Opciones + +| Opción | Predeterminado | Descripción | +| ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | El estilo del módulo. | +| `detect_extensions` | `['.typ']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['template.typ']` | Qué nombres de archivo deberían activar este módulo. | +| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | +| `disabled` | `false` | Deshabilita el módulo `daml`. | + +### Variables + +| Variable | Ejemplo | Descripción | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | + +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo + ## Username El módulo `username` muestra el nombre de usuario activo. El módulo se mostrará si se cumplen alguna de las siguientes condiciones: @@ -4283,7 +4460,7 @@ Si no se da el `shell` o solo contiene un elemento y Starship detecta PowerShell shell = ['pwsh', '-Command', '-'] ``` -::: warning Asegúrate de que tu configuración personalizada de shell salga con éxito +::: warning Asegúrate de que tu configuración personalizada del intérprete de comandos salga con éxito Si estableces un comando personalizado, asegúrate de que el intérprete de comandos por defecto usado por Starship ejecutará correctamente el comando con una salida elegante (a través de la opción `shell`). diff --git a/docs/es-ES/faq/README.md b/docs/es-ES/faq/README.md index e536bfb06..01c3d0369 100644 --- a/docs/es-ES/faq/README.md +++ b/docs/es-ES/faq/README.md @@ -120,3 +120,11 @@ Si Starship fue instalado usando el guión de instalación, el siguiente comando # Localiza y elimina el binario de starship sh -c 'rm "$(comando -v 'starship')"' ``` + +## ¿Cómo instalo Starship sin `sudo`? + +El script de instalación del shell (`https://starship.rs/install.sh`) solo intenta usar `sudo` si el directorio de instalación no es escribible para el usuario actual. El directorio de instalación por defecto es el valor de la variable de entorno `$BIN_DIR` o `/usr/local/bin` si `$BIN_DIR` no está establecido. Si en su lugar establece el directorio de instalación a uno que tenga permisos de escritura para su usuario, deberías ser capaz de instalar starship sin `sudo`. Por ejemplo, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` usa la opción de línea de comando `b` del script de instalación para establecer el directorio de instalación a `~/.local/bin`. + +Para una instalación no interactiva de Starship, no te olvides de añadir la opción `y` para omitir la confirmación. Consulte la fuente del script de instalación para ver una lista de todas las opciones de instalación soportadas. + +Al usar el gestor de paquetes, vea la documentación de su gestor de paquetes acerca de instalación con o sin `sudo`. diff --git a/docs/es-ES/guide/README.md b/docs/es-ES/guide/README.md index 64c516b1d..055832e20 100644 --- a/docs/es-ES/guide/README.md +++ b/docs/es-ES/guide/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="Sigue a @StarshipPrompt en Twitter" /> + Stand With Ukraine

@@ -147,8 +152,6 @@ />

-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

diff --git a/docs/es-ES/presets/README.md b/docs/es-ES/presets/README.md index ad7a0c0ce..3a6e96f1b 100644 --- a/docs/es-ES/presets/README.md +++ b/docs/es-ES/presets/README.md @@ -60,6 +60,12 @@ Este preajuste está inspirado en [M365Princess](https://github.com/JanDeDobbele ## [Tokyo Night](./tokyo-night.md) -This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). +Este preset está inspirado en [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). -[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) +[![Captura del preset de Tokyo Night](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +Este preajuste está muy inspirado en [Pastel Powerline](./pastel-powerline.md) y [Tokyo Night](./tokyo-night.md). + +[![Captura de pantalla de el preajuste Gruvbox Rainbow](/presets/img/gruvbox-rainbow.png "Clic para ver el preajuste Gruvbox Rainbow")](./gruvbox-rainbow) diff --git a/docs/es-ES/presets/gruvbox-rainbow.md b/docs/es-ES/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..9999e353b --- /dev/null +++ b/docs/es-ES/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[Volver a Preajustes](./README.md#gruvbox-rainbow) + +# Preselección Gruvbox Rainbow + +Este preajuste está muy inspirado en [Pastel Powerline](./pastel-powerline.md) y [Tokyo Night](./tokyo-night.md). + +![Captura de pantalla del preajuste Gruvbox Rainbow](/presets/img/gruvbox-rainbow.png) + +### Prerequisitos + +- Una [Nerd Font](https://www.nerdfonts.com/) instalada y habilitada en tu terminal + +### Configuración + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[Clic para descargar TOML](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/es-ES/presets/jetpack.md b/docs/es-ES/presets/jetpack.md new file mode 100644 index 000000000..00381b80d --- /dev/null +++ b/docs/es-ES/presets/jetpack.md @@ -0,0 +1,24 @@ +[Volver a Preajustes](./README.md#jetpack) + +# Preajust Jetpack + +Este es un preajuste pseudominimalista inspirado en las indicaciones [geometría](https://github.com/geometry-zsh/geometry) y [nave espacial](https://github.com/spaceship-prompt/spaceship-prompt). + +> Jetpack utiliza los colores temáticos de la terminal. + +![Captura de pantalla del preajuste Jetpack](/presets/img/jetpack.png) + +### Prerrequisito + +- Requiere un comando con [`la indicación correcta`](https://starship.rs/advanced-config/#enable-right-prompt). +- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) es recomendado. + +### Configuración + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[Clic para descargar TOML](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/es-ES/presets/no-empty-icons.md b/docs/es-ES/presets/no-empty-icons.md index b1af843f3..d6521cd46 100644 --- a/docs/es-ES/presets/no-empty-icons.md +++ b/docs/es-ES/presets/no-empty-icons.md @@ -1,8 +1,8 @@ -[Volver a Preajustes](./README.md#no-empty-icons) +[Volver a las preselecciones](./README.md#no-empty-icons) -# No Empty Icons Preset +# Preselección de iconos no vacíos -If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. +Si se identifican archivos del conjunto de herramientas, entonces se mostrara el ícono del conjunto de herramientas. If the toolset is not found to determine its version number, it is not displayed. La forma en la que se muestra el ícono depende de si la información del conjunto de herramientas puede ser determinada. ![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) diff --git a/docs/es-ES/presets/no-nerd-font.md b/docs/es-ES/presets/no-nerd-font.md index f06a5d85a..4de7d4d2d 100644 --- a/docs/es-ES/presets/no-nerd-font.md +++ b/docs/es-ES/presets/no-nerd-font.md @@ -6,7 +6,7 @@ This preset restricts the use of symbols to those from emoji and powerline sets. Esto significa que incluso sin una fuente Nerd instalada, debería ser capaz de ver todos los símbolos del módulo. -This preset will become the default preset in a future release of starship. +Este preset será el predeterminado en una futura versión de starship. ### Configuración diff --git a/docs/es-ES/presets/tokyo-night.md b/docs/es-ES/presets/tokyo-night.md index 95af84eaa..6218d6b06 100644 --- a/docs/es-ES/presets/tokyo-night.md +++ b/docs/es-ES/presets/tokyo-night.md @@ -2,11 +2,11 @@ # Tokyo Night Preset -This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). +Este preset está inspirado en [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). -![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) +![Captura del preset de Tokyo Night](/presets/img/tokyo-night.png) -### Prerequisitos +### Prerrequisitos - Una [Nerd Font](https://www.nerdfonts.com/) instalada y habilitada en tu terminal diff --git a/docs/faq/README.md b/docs/faq/README.md index 98ceb0ba6..977c7ae6c 100644 --- a/docs/faq/README.md +++ b/docs/faq/README.md @@ -144,3 +144,11 @@ If Starship was installed using the install script, the following command will d # Locate and delete the starship binary sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/fr-FR/advanced-config/README.md b/docs/fr-FR/advanced-config/README.md index bb090d084..28cfcfd91 100644 --- a/docs/fr-FR/advanced-config/README.md +++ b/docs/fr-FR/advanced-config/README.md @@ -205,7 +205,7 @@ Certains shells peuvent gérer une invite de commande à droite, sur la même li Note: l’invite à droite est une seule ligne, sur la même ligne que l’entrée. Pour aligner à droite les modules au-dessus de la ligne d’entrée d’une invite multiligne, voir le [module `fill`](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` est actuellement supporté pour les shells suivants : elvish, fish, zsh, xonsh, cmd, nushell. ### Exemple diff --git a/docs/fr-FR/config/README.md b/docs/fr-FR/config/README.md index 8ea280925..b31a0ed1d 100644 --- a/docs/fr-FR/config/README.md +++ b/docs/fr-FR/config/README.md @@ -206,6 +206,13 @@ Voici la liste des options de configuration globales de l'invite de commandes. | `add_newline` | `true` | Insère une ligne vide entre les invites du shell. | | `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: ### Exemple @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,6 +361,8 @@ Lorsque vous utilisez [AWSume](https://awsu.me) le profil est lu à partir de la When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### Options | Option | Défaut | Description | @@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `region_aliases` | `{}` | Tableau des alias de région à afficher en plus du nom AWS. | | `profile_aliases` | `{}` | Tableau des alias de profil à afficher en plus du nom AWS. | | `style` | `'bold yellow'` | Le style pour le module. | -| `expiration_symbol` | `X` | Le symbole est affiché lorsque les identifiants temporaires ont expiré. | +| `expiration_symbol` | `'X'` | Le symbole est affiché lorsque les identifiants temporaires ont expiré. | | `disabled` | `false` | Désactive le module `AWS`. | | `force_display` | `false` | Si `true`, affiche les informations même si `credentials`, `credential_process` ou `sso_start_url` n'ont pas été configurées. | @@ -620,17 +632,17 @@ Le module `c` affiche des informations à propos de votre compilateur C. Par dé ### Options -| Option | Défaut | Description | -| ------------------------------------ | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | La chaîne de format pour le module. | -| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbole` | `'C '` | Le symbole utilisé avant d’afficher les détails du compilateur | -| `detect_extensionsdetect_extensions` | `['c', 'h']` | Les extensions qui déclenchent ce module. | -| `detect_files` | `[]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | Comment détecter quel est le compilateur | -| `style` | `'bold 149'` | Le style pour le module. | -| `disabled` | `false` | Désactive le module `c`. | +| Option | Défaut | Description | +| ------------------------------------ | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | La chaîne de format pour le module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbole` | `'C '` | Le symbole utilisé avant d’afficher les détails du compilateur | +| `detect_extensionsdetect_extensions` | `['c', 'h']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `[]` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | Comment détecter quel est le compilateur | +| `style` | `'bold 149'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `c`. | ### Variables @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### Options + +| Option | Défaut | Description | +| ------------------------------------ | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | Format du module. | +| `symbole` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | Le style pour le module. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensionsdetect_extensions` | `[]` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['.envrc']` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Variables + +| Variable | Exemple | Description | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbole | | Reflète la valeur de l'option `symbol`. | +| style\* | `red bold` | Reflète la valeur de l'option `style`. | + +*: Cette variable peut uniquement être utilisée dans une chaine de style + +### Exemple + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Contexte Docker Le module `docker_context` affiche le [context Docker](https://docs.docker.com/engine/context/working-with-contexts/) actif, si sa valeur est différente de `default` ou si les variables d’environnement `DOCKER_MACHINE_NAME`, `DOCKER_HOST` ou `DOCKER_CONTEXT` sont définies (puisqu’elles sont utilisées pour changer le contexte utilisé). @@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | | `symbole` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `style` | `'bold green'` | Le style pour le module. | -| `detect_extensionsdetect_extensions` | `[fnl]` | Les extensions qui déclenchent ce module. | +| `detect_extensionsdetect_extensions` | `['fnl']` | Les extensions qui déclenchent ce module. | | `detect_files` | `[]` | Les fichiers qui activent ce module. | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | | `disabled` | `false` | Disables the `fennel` module. | @@ -1524,11 +1577,46 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### Options + +| Option | Défaut | Description | +| -------------------- | ------------------------------------------------------------ | ----------------------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Format du module. | +| `added_style` | `'bold green'` | Le style pour le compte des ajouts. | +| `deleted_style` | `'bold red'` | Le style pour le compte des suppressions. | +| `only_nonzero_diffs` | `true` | Afficher le statut seulement pour les items modifiés. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### Variables + +| Variable | Exemple | Description | +| ----------------- | ------- | --------------------------------------------- | +| added | `1` | Le nombre de lignes ajoutées | +| deleted | `2` | Le nombre de lignes supprimées | +| added_style\* | | Possède la valeur de l’option `added_style` | +| deleted_style\* | | Possède la valeur de l’option `deleted_style` | + +*: Cette variable peut uniquement être utilisée dans une chaine de style + +### Exemple + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) Le module `gcloud` affiche la version de la commande [`gcloud`](https://cloud.google.com/sdk/gcloud) installée. Ceci est basé sur les fichiers `~/.config/gcloud/active_config` et `~/.config/gcloud/configurations/config_{CONFIG NAME}` et la variable d'environnement `CLOUDSDK_CONFIG`. -When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set. +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. ### Options @@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | Option | Défaut | Description | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol]($style) '` | Format du module. | -| `symbole` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `style` | `"yellow bold"` | Le style pour le module. | +| `symbole` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | Le style pour le module. | | `disabled` | `false` | Disables the `guix_shell` module. | ### Variables @@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | Option | Défaut | Description | | ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbole` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensionsdetect_extensions` | `["gradle", "gradle.kts"]` | Les extensions qui déclenchent ce module. | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbole` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensionsdetect_extensions` | `['gradle', 'gradle.kts']` | Les extensions qui déclenchent ce module. | | `detect_files` | `[]` | Les fichiers qui activent ce module. | -| `detect_folders` | `["gradle"]` | Les dossiers qui activent ce module. | -| `style` | `"bold bright-cyan"` | Le style pour le module. | +| `detect_folders` | `['gradle']` | Les dossiers qui activent ce module. | +| `style` | `'bold bright-cyan'` | Le style pour le module. | | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | Option | Défaut | Description | | ------------------------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `detect_extensionsdetect_extensions` | `["hx", "hxml"]` | Les extensions qui déclenchent ce module. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Les fichiers qui activent ce module. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Quels dossiers devraient activer ce module. | -| `symbole` | `"⌘ "` | Une chaîne de format représentant le symbole de Helm. | -| `style` | `"bold fg:202"` | Le style pour le module. | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `detect_extensionsdetect_extensions` | `['hx', 'hxml']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Les fichiers qui activent ce module. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Quels dossiers devraient activer ce module. | +| `symbole` | `'⌘ '` | Une chaîne de format représentant le symbole de Helm. | +| `style` | `'bold fg:202'` | Le style pour le module. | | `disabled` | `false` | Disables the `haxe` module. | ### Variables @@ -2107,14 +2195,15 @@ Le module `hostname` affiche le nom d’hôte du système system. ### Options -| Option | Défaut | Description | -| ------------ | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ssh_only` | `true` | Afficher uniquement le nom d'hôte lorsque vous êtes connecté à une session SSH. | -| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | -| `trim_at` | `'.'` | Chaîne à laquelle le nom d'hôte est coupé, après la première correspondance. `'.'` will stop after the first dot. `''` will disable any truncation | -| `format` | `'[$ssh_symbol$hostname]($style) in '` | Format du module. | -| `style` | `'bold dimmed green'` | Le style pour le module. | -| `disabled` | `false` | Désactive le module `hostname`. | +| Option | Défaut | Description | +| ----------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | Afficher uniquement le nom d'hôte lorsque vous êtes connecté à une session SSH. | +| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | +| `trim_at` | `'.'` | Chaîne à laquelle le nom d'hôte est coupé, après la première correspondance. `'.'` will stop after the first dot. `''` will disable any truncation. | +| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | Format du module. | +| `style` | `'bold dimmed green'` | Le style pour le module. | +| `disabled` | `false` | Désactive le module `hostname`. | ### Variables @@ -2126,7 +2215,9 @@ Le module `hostname` affiche le nom d’hôte du système system. *: Cette variable peut uniquement être utilisée dans une chaine de style -### Exemple +### Exemples + +#### Always show the hostname ```toml # ~/.config/starship.toml @@ -2138,6 +2229,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Hide the hostname in remote tmux sessions + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java Le module `java` affiche la version de [Java](https://www.oracle.com/java/) installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie: @@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc' ## Kubernetes -Afficher le nom du [contexte Kubernetes](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) courant, et, si défini, l’espace de nom, l’utilisateur, et le cluster depuis le fichier kubeconfig. L'espace de noms doit être défini dans le fichier kubeconfig, ce qui peut être fait via `kubectl config set-context starship-cluster --namespace astronaut`. De même, l'utilisateur et l'instance peuvent être définies avec `kubectl config set-context starship-context --user starship-user` et `kubectl config set-context starship-context --cluster starship-cluster`. Si la variable d'environnement `$KUBECONFIG` est définie, le module l'utilisera, sinon il utilisera le fichier `~/.kube/config`. +Afficher le nom du [contexte Kubernetes](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) courant, et, si défini, l’espace de nom, l’utilisateur, et le cluster depuis le fichier kubeconfig. L'espace de noms doit être défini dans le fichier kubeconfig, ce qui peut être fait via `kubectl config set-context starship-cluster --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. Si la variable d'environnement `$KUBECONFIG` est définie, le module l'utilisera, sinon il utilisera le fichier `~/.kube/config`. ::: tip @@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten ### Options +::: warning + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + | Option | Défaut | Description | | ------------------------------------ | ---------------------------------------------------- | ---------------------------------------------------------------------- | | `symbole` | `'☸ '` | Une chaîne de format représentant le symbole affiché avant le Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | Format du module. | | `style` | `'cyan bold'` | Le style pour le module. | -| `context_aliases` | `{}` | Tableau des alias de contexte à afficher. | -| `user_aliases` | `{}` | Table of user aliases to display. | +| `context_aliases`* | `{}` | Tableau des alias de contexte à afficher. | +| `user_aliases`* | `{}` | Table of user aliases to display. | | `detect_extensionsdetect_extensions` | `[]` | Les extensions qui déclenchent ce module. | | `detect_files` | `[]` | Les fichiers qui activent ce module. | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | +| `contexts` | `[]` | Customized styles and symbols for specific contexts. | | `disabled` | `true` | Désactiver le module `kubernetes`. | +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| Variable | Description | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `style` | The style for the module when using this context. If not set, will use module's style. | +| `symbole` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + ### Variables | Variable | Exemple | Description | @@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Filtrage par regex +#### Kubernetes Context specific config -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -L’expression rationnelle doit correspondre au contexte kube entier, et des groupes de capture peuvent être référencés en utilisant `$name` et `$N` dans la valeur de remplacement. Ceci est expliqué plus en détails dans la documentation de [la crate regex](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace). - -Les noms de cluster long ou générés automatiquement peuvent être identifiés et raccourcis en utilisant des expressions rationnelles: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Saut de ligne @@ -2730,7 +2861,7 @@ Le module `nodejs` affiche la version de [Node.js](https://nodejs.org/) install | `detect_folders` | `['node_modules']` | Les dossiers qui activent ce module. | | `style` | `'bold green'` | Le style pour le module. | | `disabled` | `false` | Désactive le module `nodejs`. | -| `not_capable_style` | `bold red` | Le style du module quand une propriété engines dans le package.json ne correspond pas à la version Node.js. | +| `not_capable_style` | `'bold red'` | Le style du module quand une propriété engines dans le package.json ne correspond pas à la version Node.js. | ### Variables @@ -2890,8 +3021,8 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur | Option | Défaut | Description | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | Format du module. | -| `style` | `"bold white"` | Le style pour le module. | +| `format` | `'[$symbol]($style)'` | Format du module. | +| `style` | `'bold white'` | Le style pour le module. | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -3245,7 +3376,7 @@ Par défaut, le module sera affiché si l’une de ces conditions est remplie: | `symbole` | `'🐍 '` | Une chaîne de caractères représentant le symbole de Python | | `style` | `'yellow bold'` | Le style pour le module. | | `pyenv_version_name` | `false` | Utiliser pyenv pour obtenir la version de Python | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensionsdetect_extensions` | `['py']` | Les extensions qui déclenchent ce module | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Quels fichiers devraient activer ce module | @@ -3563,22 +3694,23 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur ### Options -| Option | Défaut | Description | -| ---------------------- | ------------------------- | ----------------------------------------------------------- | -| `bash_indicator` | `'bsh'` | Chaine de formatage utilisée pour représenter bash. | -| `fish_indicator` | `'fsh'` | Chaine de formatage utilisée pour représenter fish. | -| `zsh_indicator` | `'zsh'` | Chaine de formatage utilisée pour représenter zsh. | -| `powershell_indicator` | `'psh'` | Chaine de formatage utilisée pour représenter powershell. | -| `ion_indicator` | `'ion'` | Chaine de formatage utilisée pour représenter ion. | -| `elvish_indicator` | `'esh'` | Chaine de formatage utilisée pour représenter elvish. | -| `tcsh_indicator` | `'tsh'` | Chaine de formatage utilisée pour représenter tcsh. | -| `xonsh_indicator` | `'xsh'` | Chaine de formatage utilisée pour représenter xonsh. | -| `cmd_indicator` | `'cmd'` | Chaine de formatage utilisée pour représenter cmd. | -| `nu_indicator` | `'nu'` | Chaine de formatage utilisée pour représenter nu. | -| `unknown_indicator` | `''` | La valeur par défaut à afficher quand le shell est inconnu. | -| `format` | `'[$indicator]($style) '` | Format du module. | -| `style` | `'white bold'` | Le style pour le module. | -| `disabled` | `true` | Désactive le module `shell`. | +| Option | Défaut | Description | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | Chaine de formatage utilisée pour représenter bash. | +| `fish_indicator` | `'fsh'` | Chaine de formatage utilisée pour représenter fish. | +| `zsh_indicator` | `'zsh'` | Chaine de formatage utilisée pour représenter zsh. | +| `powershell_indicator` | `'psh'` | Chaine de formatage utilisée pour représenter powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | Chaine de formatage utilisée pour représenter ion. | +| `elvish_indicator` | `'esh'` | Chaine de formatage utilisée pour représenter elvish. | +| `tcsh_indicator` | `'tsh'` | Chaine de formatage utilisée pour représenter tcsh. | +| `xonsh_indicator` | `'xsh'` | Chaine de formatage utilisée pour représenter xonsh. | +| `cmd_indicator` | `'cmd'` | Chaine de formatage utilisée pour représenter cmd. | +| `nu_indicator` | `'nu'` | Chaine de formatage utilisée pour représenter nu. | +| `unknown_indicator` | `''` | La valeur par défaut à afficher quand le shell est inconnu. | +| `format` | `'[$indicator]($style) '` | Format du module. | +| `style` | `'white bold'` | Le style pour le module. | +| `disabled` | `true` | Désactive le module `shell`. | ### Variables @@ -3695,14 +3827,14 @@ The `solidity` module shows the currently installed version of [Solidity](https: | Option | Défaut | Description | | ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module. | -| `version_format` | `"v${major}.${minor}.${patch}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbole` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensionsdetect_extensions` | `["sol"]` | Les extensions qui déclenchent ce module. | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${major}.${minor}.${patch}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbole` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensionsdetect_extensions` | `['sol']` | Les extensions qui déclenchent ce module. | | `detect_files` | `[]` | Les fichiers qui activent ce module. | | `detect_folders` | `[]` | Les dossiers qui activent ce module. | -| `style` | `"bold blue"` | Le style pour le module. | +| `style` | `'bold blue'` | Le style pour le module. | | `disabled` | `false` | Disables this module. | ### Variables @@ -4010,6 +4142,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +Par défaut, le module sera affiché si l’une de ces conditions est remplie: + +- Le dossier courant contient un fichier `template.typ` +- The current directory contains any `*.typ` file + +### Options + +| Option | Défaut | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | Format du module. | +| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbole` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | Le style pour le module. | +| `detect_extensionsdetect_extensions` | `['.typ']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['template.typ']` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `disabled` | `false` | Disables the `daml` module. | + +### Variables + +| Variable | Exemple | Description | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| symbole | | Reflète la valeur de l'option `symbol` | +| style\* | | Reflète la valeur de l'option `style` | + +*: Cette variable peut uniquement être utilisée dans une chaine de style + ## Nom d'utilisateur Le module `username` affiche le nom de l’utilisateur actif. Le module sera affiché si l'une de ces conditions est remplie: diff --git a/docs/fr-FR/faq/README.md b/docs/fr-FR/faq/README.md index 65066f8fa..c7b201be8 100644 --- a/docs/fr-FR/faq/README.md +++ b/docs/fr-FR/faq/README.md @@ -80,7 +80,7 @@ env STARSHIP_LOG=trace starship timings Cela affichera le journal de suivi et un détail de tous les modules qui ont soit pris plus d’1ms pour s’exécuter, soit affiché quelque chose. -Finally if you find a bug you can use the `bug-report` command to create a GitHub issue. +Enfin, si vous trouvez un bug, vous pouvez utiliser la commande `bug-report` pour créer un ticket sur GitHub. ```sh starship bug-report @@ -120,3 +120,11 @@ Si Starship a été installé en utilisant le script d'installation, la commande # Trouver et supprimer le binaire starship sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/fr-FR/guide/README.md b/docs/fr-FR/guide/README.md index 630645be0..810104794 100644 --- a/docs/fr-FR/guide/README.md +++ b/docs/fr-FR/guide/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="Suivez @StarshipPrompt sur Twitter" /> + Soutenez l'Ukraine

@@ -147,8 +152,6 @@ />

-[![Bannière StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

@@ -277,7 +281,7 @@ Configurez votre shell pour initialiser starship. Sélectionnez le vôtre dans l
Bash -Ajoutez ce qui suit à la fin de `~/.bashrc`: +Ajouter ce qui suit à la fin de `~/.bashrc`: ```sh eval "$(starship init bash)" @@ -312,7 +316,7 @@ Note: Seul Elvish v0.18+ est supporté
Fish -Ajoutez le code suivant à la fin de `~/.config/fish/config.fish`: +Ajoute ce qui suit à la fin de `~/.config/fish/config.fish`: ```fish starship init fish | source @@ -323,7 +327,7 @@ starship init fish | source
Ion -Ajoutez ce qui suit à la fin de `~/.config/ion/initrc`: +Ajouter ce qui suit à la fin de `~/.config/ion/initrc`: ```sh eval $(starship init ion) @@ -387,7 +391,7 @@ execx($(starship init xonsh))
Zsh -Ajoutez ce qui suit à la fin de `~/.zshrc`: +Ajouter ce qui suit à la fin de `~/.zshrc`: ```sh eval "$(starship init zsh)" diff --git a/docs/fr-FR/presets/README.md b/docs/fr-FR/presets/README.md index efcf80615..11b18e528 100644 --- a/docs/fr-FR/presets/README.md +++ b/docs/fr-FR/presets/README.md @@ -63,3 +63,9 @@ Ce préréglage s'inspire de [M365Princess](https://github.com/JanDeDobbeleer/oh This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). [![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) diff --git a/docs/fr-FR/presets/gruvbox-rainbow.md b/docs/fr-FR/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..1ea4af7f6 --- /dev/null +++ b/docs/fr-FR/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[Retourner aux préréglages](./README.md#gruvbox-rainbow) + +# Gruvbox Rainbow Preset + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png) + +### Pré-requis + +- Une [Nerd Font](https://www.nerdfonts.com/) est installée et activée dans votre terminal + +### Configuration + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[Cliquez pour télécharger le TOML](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/fr-FR/presets/jetpack.md b/docs/fr-FR/presets/jetpack.md new file mode 100644 index 000000000..930d974e6 --- /dev/null +++ b/docs/fr-FR/presets/jetpack.md @@ -0,0 +1,24 @@ +[Retourner aux préréglages](./README.md#jetpack) + +# Jetpack Preset + +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 uses the terminal's color theme. + +![Screenshot of Jetpack preset](/presets/img/jetpack.png) + +### Prerequisite + +- 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. + +### Configuration + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[Cliquez pour télécharger le TOML](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/id-ID/config/README.md b/docs/id-ID/config/README.md index ed2b8180a..7fa086e06 100644 --- a/docs/id-ID/config/README.md +++ b/docs/id-ID/config/README.md @@ -206,6 +206,13 @@ Berikut adalah opsi konfigurasi dari list yang bersifat prompt-wide. | `add_newline` | `true` | Memasukkan baris kosong antara prompt shell. | | `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: ### Contoh @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,6 +361,8 @@ Ketika menggunakan [AWSume](https://awsu.me) profil dibaca dari variabel environ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### Opsi | Opsi | Bawaan | Deskripsi | @@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `region_aliases` | `{}` | Tabel alias dari region yang ditampilan selain nama AWS. | | `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | | `style` | `'bold yellow'` | Gaya penataan untuk modul. | -| `expiration_symbol` | `X` | Simbol ditampilkan ketika temporer kredensial telah kedaluwarsa. | +| `expiration_symbol` | `'X'` | Simbol ditampilkan ketika temporer kredensial telah kedaluwarsa. | | `disabled` | `false` | Menonaktifkan modul `AWS`. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu ### Opsi -| Opsi | Bawaan | Deskripsi | -| ------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'C '` | The symbol used before displaying the compiler details | -| `detect_extensions` | `['c', 'h']` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. | -| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | -| `style` | `'bold 149'` | Gaya penataan untuk modul. | -| `disabled` | `false` | Disables the `c` module. | +| Opsi | Bawaan | Deskripsi | +| ------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. | +| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | +| `style` | `'bold 149'` | Gaya penataan untuk modul. | +| `disabled` | `false` | Disables the `c` module. | ### Variabel @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### Opsi + +| Opsi | Bawaan | Deskripsi | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | Format dari modul. | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | Gaya penataan untuk modul. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['.envrc']` | filenames mana yang sebaiknya memicu modul ini. | +| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Variabel + +| Variabel | Contoh | Deskripsi | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbol | | Menyalin nilai dari opsi `symbol`. | +| style\* | `red bold` | Menyalin nilai dari opsi `style`. | + +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string + +### Contoh + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Docker Context The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). @@ -1393,7 +1446,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https: | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | | `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | | `symbol` | `' '` | The symbol used before displaying the version of erlang. | | `style` | `'bold red'` | Gaya penataan untuk modul. | @@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `style` | `'bold green'` | Gaya penataan untuk modul. | -| `detect_extensions` | `[fnl]` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_extensions` | `['fnl']` | Ekstensi mana yang sebaiknya memicu modul ini. | | `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | | `disabled` | `false` | Disables the `fennel` module. | @@ -1524,11 +1577,46 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### Opsi + +| Opsi | Bawaan | Deskripsi | +| -------------------- | ------------------------------------------------------------ | ------------------------------------- | +| `fromat` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Format dari modul. | +| `added_style` | `'bold green'` | The style for the added count. | +| `deleted_style` | `'bold red'` | The style for the deleted count. | +| `only_nonzero_diffs` | `true` | Render status only for changed items. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### Variabel + +| Variabel | Contoh | Deskripsi | +| ----------------- | ------ | ------------------------------------------- | +| added | `1` | The current number of added lines | +| deleted | `2` | The current number of deleted lines | +| added_style\* | | Mirrors the value of option `added_style` | +| deleted_style\* | | Mirrors the value of option `deleted_style` | + +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string + +### Contoh + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. -When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set. +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. ### Opsi @@ -1775,7 +1863,7 @@ The Git Status module is very slow in Windows directories (for example under `/m | Opsi | Bawaan | Deskripsi | | ------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `fromat` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` | +| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` | | `conflicted` | `'='` | This branch has merge conflicts. | | `ahead` | `'⇡'` | The format of `ahead` | | `behind` | `'⇣'` | The format of `behind` | @@ -1930,9 +2018,9 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | Opsi | Bawaan | Deskripsi | | ---------- | -------------------------- | ------------------------------------------------------ | -| `format` | `'via [$symbol]($style) '` | Format dari modul. | -| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `style` | `"yellow bold"` | Gaya penataan untuk modul. | +| `fromat` | `'via [$symbol]($style) '` | Format dari modul. | +| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `guix_shell` module. | ### Variabel @@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Ekstensi mana yang sebaiknya memicu modul ini. | | `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. | -| `detect_folders` | `["gradle"]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"bold bright-cyan"` | Gaya penataan untuk modul. | +| `detect_folders` | `['gradle']` | Folder mana yang sebaiknya memicul modul ini. | +| `style` | `'bold bright-cyan'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | Opsi | Bawaan | Deskripsi | | ------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["hx", "hxml"]` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | filenames mana yang sebaiknya memicu modul ini. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Folder mana yang sebaiknya memicul modul ini. | -| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. | -| `style` | `"bold fg:202"` | Gaya penataan untuk modul. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | filenames mana yang sebaiknya memicu modul ini. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Folder mana yang sebaiknya memicul modul ini. | +| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. | +| `style` | `'bold fg:202'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `haxe` module. | ### Variabel @@ -2107,14 +2195,15 @@ The `hostname` module shows the system hostname. ### Opsi -| Opsi | Bawaan | Deskripsi | -| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | -| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | -| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation | -| `fromat` | `'[$ssh_symbol$hostname]($style) in '` | Format dari modul. | -| `style` | `'bold dimmed green'` | Gaya penataan untuk modul. | -| `disabled` | `false` | Disables the `hostname` module. | +| Opsi | Bawaan | Deskripsi | +| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | +| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | +| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation. | +| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. | +| `fromat` | `'[$ssh_symbol$hostname]($style) in '` | Format dari modul. | +| `style` | `'bold dimmed green'` | Gaya penataan untuk modul. | +| `disabled` | `false` | Disables the `hostname` module. | ### Variabel @@ -2128,6 +2217,8 @@ The `hostname` module shows the system hostname. ### Contoh +#### Always show the hostname + ```toml # ~/.config/starship.toml @@ -2138,6 +2229,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Hide the hostname in remote tmux sessions + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: @@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc' ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. ::: tip @@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten ### Opsi +::: warning + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + | Opsi | Bawaan | Deskripsi | | ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | | `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. | | `fromat` | `'[$symbol$context( \($namespace\))]($style) in '` | Format dari modul. | | `style` | `'cyan bold'` | Gaya penataan untuk modul. | -| `context_aliases` | `{}` | Table of context aliases to display. | -| `user_aliases` | `{}` | Table of user aliases to display. | +| `context_aliases`* | `{}` | Table of context aliases to display. | +| `user_aliases`* | `{}` | Table of user aliases to display. | | `detect_extensions` | `[]` | Ekstensi mana yang sebaiknya memicu modul ini. | | `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | +| `contexts` | `[]` | Customized styles and symbols for specific contexts. | | `disabled` | `true` | Disables the `kubernetes` module. | +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| Variabel | Deskripsi | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `style` | The style for the module when using this context. If not set, will use module's style. | +| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + ### Variabel | Variabel | Contoh | Deskripsi | @@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Regex Matching +#### Kubernetes Context specific config -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. - -Long and automatically generated cluster names can be identified and shortened using regular expressions: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Line Break @@ -2637,7 +2768,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | Format dari modul | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul | | `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | | `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | | `detect_extensions` | `['nim', 'nims', 'nimble']` | Ekstensi mana yang sebaiknya memicu modul ini. | @@ -2674,7 +2805,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | Opsi | Bawaan | Deskripsi | | ------------- | ---------------------------------------------- | --------------------------------------------------------------------- | -| `format` | `'via [$symbol$state( \($name\))]($style) '` | Format dari modul. | +| `fromat` | `'via [$symbol$state( \($name\))]($style) '` | Format dari modul. | | `symbol` | `'❄️ '` | A format string representing the symbol of nix-shell. | | `style` | `'bold blue'` | Gaya penataan untuk modul. | | `impure_msg` | `'impure'` | A format string shown when the shell is impure. | @@ -2722,7 +2853,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | | `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | | `symbol` | `' '` | A format string representing the symbol of Node.js. | | `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Ekstensi mana yang sebaiknya memicu modul ini. | @@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_folders` | `['node_modules']` | Folder mana yang sebaiknya memicul modul ini. | | `style` | `'bold green'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `nodejs` module. | -| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | +| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variabel @@ -2767,7 +2898,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | Opsi | Bawaan | Deskripsi | | ------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | +| `fromat` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | | `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | | `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | @@ -2807,7 +2938,7 @@ The `opa` module shows the currently installed version of the OPA tool. By defau | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | | `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | | `detect_extensions` | `['rego']` | Ekstensi mana yang sebaiknya memicu modul ini. | @@ -2843,7 +2974,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Opsi | Bawaan | Deskripsi | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | -| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | Format dari modul. | +| `fromat` | `'on [$symbol$cloud(\($project\))]($style) '` | Format dari modul. | | `symbol` | `'☁️ '` | The symbol used before displaying the current OpenStack cloud. | | `style` | `'bold yellow'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `openstack` module. | @@ -2890,8 +3021,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Opsi | Bawaan | Deskripsi | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | Format dari modul. | -| `style` | `"bold white"` | Gaya penataan untuk modul. | +| `fromat` | `'[$symbol]($style)'` | Format dari modul. | +| `style` | `'bold white'` | Gaya penataan untuk modul. | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -3000,7 +3131,7 @@ The `package` module is shown when the current directory is the repository for a | Opsi | Bawaan | Deskripsi | | ----------------- | --------------------------------- | ----------------------------------------------------------------------------------- | -| `format` | `'is [$symbol$version]($style) '` | Format dari modul. | +| `fromat` | `'is [$symbol$version]($style) '` | Format dari modul. | | `symbol` | `'📦 '` | The symbol used before displaying the version the package. | | `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | | `style` | `'bold 208'` | Gaya penataan untuk modul. | @@ -3040,7 +3171,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | Opsi | Bawaan | Deskripsi | | ------------------- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | +| `fromat` | `'via [$symbol($version )]($style)'` | The format string for the module. | | `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | | `detect_extensions` | `['pl', 'pm', 'pod']` | Ekstensi mana yang sebaiknya memicu modul ini. | @@ -3245,7 +3376,7 @@ Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: | `symbol` | `'🐍 '` | A format string representing the symbol of Python | | `style` | `'yellow bold'` | Gaya penataan untuk modul. | | `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `['py']` | Ekstensi mana yang sebaiknya memicu modul ini | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | filenames mana yang sebaiknya memicu modul ini | @@ -3562,22 +3693,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Opsi -| Opsi | Bawaan | Deskripsi | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `'bsh'` | A format string used to represent bash. | -| `fish_indicator` | `'fsh'` | A format string used to represent fish. | -| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | -| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | -| `ion_indicator` | `'ion'` | A format string used to represent ion. | -| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | -| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | -| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | -| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | -| `nu_indicator` | `'nu'` | A format string used to represent nu. | -| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | -| `fromat` | `'[$indicator]($style) '` | Format dari modul. | -| `style` | `'white bold'` | Gaya penataan untuk modul. | -| `disabled` | `true` | Disables the `shell` module. | +| Opsi | Bawaan | Deskripsi | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `fromat` | `'[$indicator]($style) '` | Format dari modul. | +| `style` | `'white bold'` | Gaya penataan untuk modul. | +| `disabled` | `true` | Disables the `shell` module. | ### Variabel @@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https: | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. | -| `version_format` | `"v${major}.${minor}.${patch}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${major}.${minor}.${patch}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Ekstensi mana yang sebaiknya memicu modul ini. | | `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `"bold blue"` | Gaya penataan untuk modul. | +| `style` | `'bold blue'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables this module. | ### Variabel @@ -4009,6 +4141,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +By default, the module will be shown if any of the following conditions are met: + +- Direktori ini memiliki berkas `template.typ` +- The current directory contains any `*.typ` file + +### Opsi + +| Opsi | Bawaan | Deskripsi | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. | +| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | Gaya penataan untuk modul. | +| `detect_extensions` | `['.typ']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['template.typ']` | filenames mana yang sebaiknya memicu modul ini. | +| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | +| `disabled` | `false` | Disables the `daml` module. | + +### Variabel + +| Variabel | Contoh | Deskripsi | +| ------------- | -------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `bawaan` | The current Typst version | +| symbol | | Menyalin nilai dari opsi `symbol` | +| style\* | | Menyalin nilai dari opsi `style` | + +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string + ## Username The `username` module shows active user's username. The module will be shown if any of the following conditions are met: diff --git a/docs/id-ID/faq/README.md b/docs/id-ID/faq/README.md index 41bb2d391..1f8484406 100644 --- a/docs/id-ID/faq/README.md +++ b/docs/id-ID/faq/README.md @@ -120,3 +120,11 @@ If Starship was installed using the install script, the following command will d # Locate and delete the starship binary sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/id-ID/guide/README.md b/docs/id-ID/guide/README.md index 48cfe8696..287766080 100644 --- a/docs/id-ID/guide/README.md +++ b/docs/id-ID/guide/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="Ikuti @StarshipPrompt di Twitter" /> + Stand With Ukraine

@@ -147,8 +152,6 @@ />

-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

diff --git a/docs/id-ID/presets/README.md b/docs/id-ID/presets/README.md index ac15b0b08..29c180d1c 100644 --- a/docs/id-ID/presets/README.md +++ b/docs/id-ID/presets/README.md @@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). [![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) diff --git a/docs/id-ID/presets/gruvbox-rainbow.md b/docs/id-ID/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..9208142e3 --- /dev/null +++ b/docs/id-ID/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#gruvbox-rainbow) + +# Gruvbox Rainbow Preset + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png) + +### Prasyarat + +- [Nerd Font](https://www.nerdfonts.com/) yang sudah terpasang dan berjalan di dalam terminalmu + +### Konfigurasi + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/id-ID/presets/jetpack.md b/docs/id-ID/presets/jetpack.md new file mode 100644 index 000000000..58dde840f --- /dev/null +++ b/docs/id-ID/presets/jetpack.md @@ -0,0 +1,24 @@ +[Return to Presets](./README.md#jetpack) + +# Jetpack Preset + +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 uses the terminal's color theme. + +![Screenshot of Jetpack preset](/presets/img/jetpack.png) + +### Prerequisite + +- 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. + +### Konfigurasi + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/it-IT/config/README.md b/docs/it-IT/config/README.md index 1b7ff22d3..420fedd50 100644 --- a/docs/it-IT/config/README.md +++ b/docs/it-IT/config/README.md @@ -206,6 +206,13 @@ This is the list of prompt-wide configuration options. | `add_newline` | `true` | Inserisce una riga vuota tra i prompt della shell. | | `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: ### Esempio @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### Opzioni | Opzione | Default | Descrizione | @@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. | | `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | | `style` | `'bold yellow'` | Lo stile per il modulo. | -| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | +| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'C '` | The symbol used before displaying the compiler details | -| `detect_extensions` | `['c', 'h']` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | -| `style` | `'bold 149'` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `c` module. | +| Opzione | Default | Descrizione | +| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | +| `style` | `'bold 149'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `c` module. | ### Variables @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### Opzioni + +| Opzione | Default | Descrizione | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | Lo stile per il modulo. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['.envrc']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Variables + +| Variable | Esempio | Descrizione | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbol | | Mirrors the value of option `symbol`. | +| style\* | `red bold` | Mirrors the value of option `style`. | + +*: This variable can only be used as a part of a style string + +### Esempio + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Docker Context The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). @@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `style` | `'bold green'` | Lo stile per il modulo. | -| `detect_extensions` | `[fnl]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_extensions` | `['fnl']` | Quali estensioni dovrebbero attivare questo modulo. | | `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | | `detect_folders` | `[]` | Which folders should trigger this modules. | | `disabled` | `false` | Disables the `fennel` module. | @@ -1524,11 +1577,46 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### Opzioni + +| Opzione | Default | Descrizione | +| -------------------- | ------------------------------------------------------------ | ------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | +| `added_style` | `'bold green'` | The style for the added count. | +| `deleted_style` | `'bold red'` | The style for the deleted count. | +| `only_nonzero_diffs` | `true` | Render status only for changed items. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### Variables + +| Variable | Esempio | Descrizione | +| ----------------- | ------- | ------------------------------------------- | +| added | `1` | The current number of added lines | +| deleted | `2` | The current number of deleted lines | +| added_style\* | | Mirrors the value of option `added_style` | +| deleted_style\* | | Mirrors the value of option `deleted_style` | + +*: This variable can only be used as a part of a style string + +### Esempio + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. -When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set. +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. ### Opzioni @@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | Opzione | Default | Descrizione | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol]($style) '` | The format for the module. | -| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `style` | `"yellow bold"` | Lo stile per il modulo. | +| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | Lo stile per il modulo. | | `disabled` | `false` | Disables the `guix_shell` module. | ### Variables @@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | Opzione | Default | Descrizione | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | Quali estensioni dovrebbero attivare questo modulo. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Quali estensioni dovrebbero attivare questo modulo. | | `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `["gradle"]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"bold bright-cyan"` | Lo stile per il modulo. | +| `detect_folders` | `['gradle']` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'bold bright-cyan'` | Lo stile per il modulo. | | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | Opzione | Default | Descrizione | | ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["hx", "hxml"]` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. | -| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. | -| `style` | `"bold fg:202"` | Lo stile per il modulo. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. | +| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. | +| `style` | `'bold fg:202'` | Lo stile per il modulo. | | `disabled` | `false` | Disables the `haxe` module. | ### Variables @@ -2107,14 +2195,15 @@ The `hostname` module shows the system hostname. ### Opzioni -| Opzione | Default | Descrizione | -| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | -| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | -| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation | -| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | -| `style` | `'bold dimmed green'` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `hostname` module. | +| Opzione | Default | Descrizione | +| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | +| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | +| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation. | +| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | +| `style` | `'bold dimmed green'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `hostname` module. | ### Variables @@ -2126,7 +2215,9 @@ The `hostname` module shows the system hostname. *: This variable can only be used as a part of a style string -### Esempio +### Examples + +#### Always show the hostname ```toml # ~/.config/starship.toml @@ -2138,6 +2229,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Hide the hostname in remote tmux sessions + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met: @@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc' ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. ::: tip @@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten ### Opzioni +::: warning + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + | Opzione | Default | Descrizione | | ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | | `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | | `style` | `'cyan bold'` | Lo stile per il modulo. | -| `context_aliases` | `{}` | Table of context aliases to display. | -| `user_aliases` | `{}` | Table of user aliases to display. | +| `context_aliases`* | `{}` | Table of context aliases to display. | +| `user_aliases`* | `{}` | Table of user aliases to display. | | `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. | | `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | | `detect_folders` | `[]` | Which folders should trigger this modules. | +| `contexts` | `[]` | Customized styles and symbols for specific contexts. | | `disabled` | `true` | Disables the `kubernetes` module. | +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| Variable | Descrizione | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `style` | The style for the module when using this context. If not set, will use module's style. | +| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + ### Variables | Variable | Esempio | Descrizione | @@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Regex Matching +#### Kubernetes Context specific config -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. - -Long and automatically generated cluster names can be identified and shortened using regular expressions: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Line Break @@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_folders` | `['node_modules']` | Quali cartelle dovrebbero attivare questo modulo. | | `style` | `'bold green'` | Lo stile per il modulo. | | `disabled` | `false` | Disables the `nodejs` module. | -| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | +| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables @@ -2890,8 +3021,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Opzione | Default | Descrizione | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | The format for the module. | -| `style` | `"bold white"` | Lo stile per il modulo. | +| `format` | `'[$symbol]($style)'` | The format for the module. | +| `style` | `'bold white'` | Lo stile per il modulo. | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -3038,16 +3169,16 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | -| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `['pl', 'pm', 'pod']` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `'bold 149'` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `perl` module. | +| Opzione | Default | Descrizione | +| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `['pl', 'pm', 'pod']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'bold 149'` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `perl` module. | ### Variables @@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met: | `symbol` | `'🐍 '` | A format string representing the symbol of Python | | `style` | `'yellow bold'` | Lo stile per il modulo. | | `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `['py']` | Quali estensioni dovrebbero attivare questo modulo | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Quali nomi di file dovrebbero attivare questo modulo | @@ -3562,22 +3693,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Opzioni -| Opzione | Default | Descrizione | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `'bsh'` | A format string used to represent bash. | -| `fish_indicator` | `'fsh'` | A format string used to represent fish. | -| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | -| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | -| `ion_indicator` | `'ion'` | A format string used to represent ion. | -| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | -| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | -| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | -| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | -| `nu_indicator` | `'nu'` | A format string used to represent nu. | -| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | -| `format` | `'[$indicator]($style) '` | The format for the module. | -| `style` | `'white bold'` | Lo stile per il modulo. | -| `disabled` | `true` | Disables the `shell` module. | +| Opzione | Default | Descrizione | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | Lo stile per il modulo. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https: | Opzione | Default | Descrizione | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${major}.${minor}.${patch}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | Quali estensioni dovrebbero attivare questo modulo. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${major}.${minor}.${patch}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Quali estensioni dovrebbero attivare questo modulo. | | `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | | `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `"bold blue"` | Lo stile per il modulo. | +| `style` | `'bold blue'` | Lo stile per il modulo. | | `disabled` | `false` | Disables this module. | ### Variables @@ -4009,6 +4141,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +By default, the module will be shown if any of the following conditions are met: + +- The current directory contains a `template.typ` file +- The current directory contains any `*.typ` file + +### Opzioni + +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | Lo stile per il modulo. | +| `detect_extensions` | `['.typ']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['template.typ']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `disabled` | `false` | Disables the `daml` module. | + +### Variables + +| Variable | Esempio | Descrizione | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + ## Username The `username` module shows active user's username. The module will be shown if any of the following conditions are met: diff --git a/docs/it-IT/faq/README.md b/docs/it-IT/faq/README.md index 24c8cb702..00dc751ea 100644 --- a/docs/it-IT/faq/README.md +++ b/docs/it-IT/faq/README.md @@ -120,3 +120,11 @@ Se Starship è stato installato utilizzando lo script di installazione, il segue # Locate and delete the starship binary sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/it-IT/guide/README.md b/docs/it-IT/guide/README.md index 90774728c..f718014a9 100644 --- a/docs/it-IT/guide/README.md +++ b/docs/it-IT/guide/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="Segui @StarshipPrompt su Twitter" /> + Stand With Ukraine

@@ -147,8 +152,6 @@ />

-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

diff --git a/docs/it-IT/presets/README.md b/docs/it-IT/presets/README.md index 532d5c7d5..b5e07764d 100644 --- a/docs/it-IT/presets/README.md +++ b/docs/it-IT/presets/README.md @@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). [![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) diff --git a/docs/it-IT/presets/gruvbox-rainbow.md b/docs/it-IT/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..300d2ad48 --- /dev/null +++ b/docs/it-IT/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#gruvbox-rainbow) + +# Gruvbox Rainbow Preset + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png) + +### Prerequisiti + +- Un [ Nerd Font ](https://www.nerdfonts.com/) installato e abilitato nel tuo terminale + +### Configurazione + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/it-IT/presets/jetpack.md b/docs/it-IT/presets/jetpack.md new file mode 100644 index 000000000..902128745 --- /dev/null +++ b/docs/it-IT/presets/jetpack.md @@ -0,0 +1,24 @@ +[Return to Presets](./README.md#jetpack) + +# Jetpack Preset + +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 uses the terminal's color theme. + +![Screenshot of Jetpack preset](/presets/img/jetpack.png) + +### Prerequisite + +- 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. + +### Configurazione + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/ja-JP/README.md b/docs/ja-JP/README.md index 48786a3d2..2d5e81c26 100644 --- a/docs/ja-JP/README.md +++ b/docs/ja-JP/README.md @@ -50,12 +50,12 @@ description: Starship はミニマルで、非常に高速で、カスタマイ #### パッケージマネージャー経由でインストール - [ Homebrew ](https://brew.sh/)の場合: + [ Homebrew](https://brew.sh/)を使用する ```sh brew install starship ``` - With [Winget](https://github.com/microsoft/winget-cli): + [Winget](https://github.com/microsoft/winget-cli)を使用する ```powershell winget install starship @@ -153,7 +153,7 @@ description: Starship はミニマルで、非常に高速で、カスタマイ ::: - Nushellの環境ファイルの最後に以下を追記してください ( `$nu.env-path` を実行してください): + そして、Nushellの設定ファイルの最後に以下を追加してください( `$nu.config-path` を実行してください): ```sh mkdir ~/.cache/starship starship init nu | save -f ~/.cache/starship/init.nu diff --git a/docs/ja-JP/config/README.md b/docs/ja-JP/config/README.md index b66bfe9ff..915a02ed1 100644 --- a/docs/ja-JP/config/README.md +++ b/docs/ja-JP/config/README.md @@ -206,6 +206,13 @@ detect_extensions = ['ts', '!video.ts', '!audio.ts'] | `add_newline` | `true` | シェルプロンプトの間に空行を挿入します。 | | `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: ### 設定例 @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,6 +361,8 @@ The module will display a profile only if its credentials are present in `~/.aws When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### オプション | オプション | デフォルト | 説明 | @@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `region_aliases` | `{}` | AWS名に加えて表示するリージョンのエイリアスです。 | | `profile_aliases` | `{}` | AWS名に加えて表示するプロファイルのエイリアスです。 | | `style` | `'bold yellow'` | モジュールのスタイルです。 | -| `expiration_symbol` | `X` | この記号は一時的な資格情報が有効期限切れの場合に表示されます。 | +| `expiration_symbol` | `'X'` | この記号は一時的な資格情報が有効期限切れの場合に表示されます。 | | `disabled` | `false` | `aws`モジュールを無効にします。 | | `force_display` | `false` | `true`の場合、`credentials`、`credential_process`または`sso_start_url`が設定されていない場合でも情報を表示します。 | @@ -620,17 +632,17 @@ format = 'via [🍔 $version](bold green) ' ### オプション -| オプション | デフォルト | 説明 | -| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------ | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | モジュールのフォーマット文字列。 | -| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `'C '` | コンパイラの詳細を表示する前に使用される記号です。 | -| `detect_extensions` | `['c', 'h']` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | コンパイラを検出する方法 | -| `style` | `'bold 149'` | モジュールのスタイルです。 | -| `disabled` | `false` | `c`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------ | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | モジュールのフォーマット文字列。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'C '` | コンパイラの詳細を表示する前に使用される記号です。 | +| `detect_extensions` | `['c', 'h']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | コンパイラを検出する方法 | +| `style` | `'bold 149'` | モジュールのスタイルです。 | +| `disabled` | `false` | `c`モジュールを無効にします。 | ### 変数 @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### オプション + +| オプション | デフォルト | 説明 | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | module のフォーマットです。 | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | モジュールのスタイルです。 | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['.envrc']` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### 変数 + +| 変数 | 設定例 | 説明 | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbol | | オプション `symbol` の値をミラーする. | +| style\* | `red bold` | オプション `style` の値をミラーする. | + +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 + +### 設定例 + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Docker Context `docker_context`モジュールは、`default`に設定されていない場合、または環境変数`DOCKER_MACHINE_NAME`、`DOCKER_HOST`または`DOCKER_CONTEXT`が設定されている場合 (使用中のコンテキストを上書きするため)、現在アクティブな[Docker context](https://docs.docker.com/engine/context/working-with-contexts/)を表示します。 @@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | | `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `style` | `'bold green'` | モジュールのスタイルです。 | -| `detect_extensions` | `[fnl]` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_extensions` | `['fnl']` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | | `disabled` | `false` | Disables the `fennel` module. | @@ -1524,11 +1577,46 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### オプション + +| オプション | デフォルト | 説明 | +| -------------------- | ------------------------------------------------------------ | ------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | module のフォーマットです。 | +| `added_style` | `'bold green'` | The style for the added count. | +| `deleted_style` | `'bold red'` | The style for the deleted count. | +| `only_nonzero_diffs` | `true` | Render status only for changed items. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### 変数 + +| 変数 | 設定例 | 説明 | +| ----------------- | --- | ------------------------------------------- | +| added | `1` | The current number of added lines | +| deleted | `2` | The current number of deleted lines | +| added_style\* | | Mirrors the value of option `added_style` | +| deleted_style\* | | Mirrors the value of option `deleted_style` | + +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 + +### 設定例 + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) `gcloud` モジュールは、 [`gcloud`](https://cloud.google.com/sdk/gcloud) CLIの現在の設定が表示されます。 これは `~/.config/gcloud/active_config` ファイルと `~/.config/gcloud/configurations/config_{CONFIG NAME}` ファイルと `CLOUDSDK_CONFIG` 環境変数に基づきます。 -When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set. +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. ### オプション @@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | オプション | デフォルト | 説明 | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol]($style) '` | module のフォーマットです。 | -| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `style` | `"yellow bold"` | モジュールのスタイルです。 | +| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `guix_shell` module. | ### 変数 @@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | どの拡張子がこのモジュールをアクティブにするか | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `["gradle"]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold bright-cyan"` | モジュールのスタイルです。 | +| `detect_folders` | `['gradle']` | どのフォルダーがこのモジュールをアクティブにするか | +| `style` | `'bold bright-cyan'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | オプション | デフォルト | 説明 | | ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `detect_extensions` | `["hx", "hxml"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | どのフォルダーがこのモジュールをアクティブにするか | -| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. | -| `style` | `"bold fg:202"` | モジュールのスタイルです。 | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `detect_extensions` | `['hx', 'hxml']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | どのフォルダーがこのモジュールをアクティブにするか | +| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. | +| `style` | `'bold fg:202'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `haxe` module. | ### 変数 @@ -2107,14 +2195,15 @@ format = 'via [⎈ $version](bold white) ' ### オプション -| オプション | デフォルト | 説明 | -| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `ssh_only` | `true` | SSHセッションに接続されている場合にのみホスト名を表示します。 | -| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | -| `trim_at` | `'.'` | この文字が最初にマッチするまでをホスト名と認識します。 `'.'` will stop after the first dot. `''` will disable any truncation | -| `format` | `'[$ssh_symbol$hostname]($style) in '` | module のフォーマットです。 | -| `style` | `'bold dimmed green'` | モジュールのスタイルです。 | -| `disabled` | `false` | `hostname`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ----------------- | -------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | SSHセッションに接続されている場合にのみホスト名を表示します。 | +| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | +| `trim_at` | `'.'` | この文字が最初にマッチするまでをホスト名と認識します。 `'.'` will stop after the first dot. `''` will disable any truncation. | +| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | module のフォーマットです。 | +| `style` | `'bold dimmed green'` | モジュールのスタイルです。 | +| `disabled` | `false` | `hostname`モジュールを無効にします。 | ### 変数 @@ -2128,6 +2217,8 @@ format = 'via [⎈ $version](bold white) ' ### 設定例 +#### Always show the hostname + ```toml # ~/.config/starship.toml @@ -2138,6 +2229,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Hide the hostname in remote tmux sessions + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java `Java`モジュールは、現在インストールされている[Java](https://www.oracle.com/java/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 @@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc' ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. 環境変数`$KUBECONFIG`が設定されている場合、このモジュールはそれを利用し、`~/.kube/config`を利用しません。 +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. 環境変数`$KUBECONFIG`が設定されている場合、このモジュールはそれを利用し、`~/.kube/config`を利用しません。 ::: tip @@ -2335,17 +2437,39 @@ When the module is enabled it will always be active, unless any of `detect_exten ### オプション -| オプション | デフォルト | 説明 | -| ------------------- | ---------------------------------------------------- | --------------------------------- | -| `symbol` | `'☸ '` | クラスター名の前に表示されるシンボルを表すフォーマット文字列。 | -| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | module のフォーマットです。 | -| `style` | `'cyan bold'` | モジュールのスタイルです。 | -| `context_aliases` | `{}` | コンテキストの表示エイリアスを定義するテーブル。 | -| `user_aliases` | `{}` | Table of user aliases to display. | -| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `disabled` | `true` | `kubernetes` モジュールを無効にする。 | +::: warning + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + +| オプション | デフォルト | 説明 | +| ------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `symbol` | `'☸ '` | クラスター名の前に表示されるシンボルを表すフォーマット文字列。 | +| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | module のフォーマットです。 | +| `style` | `'cyan bold'` | モジュールのスタイルです。 | +| `context_aliases`* | `{}` | コンテキストの表示エイリアスを定義するテーブル。 | +| `user_aliases`* | `{}` | Table of user aliases to display. | +| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | +| `contexts` | `[]` | Customized styles and symbols for specific contexts. | +| `disabled` | `true` | `kubernetes` モジュールを無効にする。 | + +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| 変数 | 説明 | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `style` | The style for the module when using this context. If not set, will use module's style. | +| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). ### 変数 @@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Regex Matching +#### Kubernetes Context specific config -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. - -Long and automatically generated cluster names can be identified and shortened using regular expressions: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Line Break @@ -2730,7 +2861,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' | `detect_folders` | `['node_modules']` | どのフォルダーがこのモジュールをアクティブにするか | | `style` | `'bold green'` | モジュールのスタイルです。 | | `disabled` | `false` | `nodejs`モジュールを無効にします。 | -| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | +| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. | ### 変数 @@ -2890,8 +3021,8 @@ The [os_info](https://lib.rs/crates/os_info) crate used by this module is known | オプション | デフォルト | 説明 | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | module のフォーマットです。 | -| `style` | `"bold white"` | モジュールのスタイルです。 | +| `format` | `'[$symbol]($style)'` | module のフォーマットです。 | +| `style` | `'bold white'` | モジュールのスタイルです。 | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -3245,7 +3376,7 @@ The `python` module shows the currently installed version of [Python](https://ww | `symbol` | `'🐍 '` | A format string representing the symbol of Python | | `style` | `'yellow bold'` | モジュールのスタイルです。 | | `pyenv_version_name` | `false` | pyenvを使用してPythonバージョンを取得します | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `['py']` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | どのファイル名がこのモジュールをアクティブにするか | @@ -3562,22 +3693,23 @@ The `shell` module shows an indicator for currently used shell. ### オプション -| オプション | デフォルト | 説明 | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `'bsh'` | A format string used to represent bash. | -| `fish_indicator` | `'fsh'` | A format string used to represent fish. | -| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | -| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | -| `ion_indicator` | `'ion'` | A format string used to represent ion. | -| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | -| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | -| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | -| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | -| `nu_indicator` | `'nu'` | A format string used to represent nu. | -| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | -| `format` | `'[$indicator]($style) '` | module のフォーマットです。 | -| `style` | `'white bold'` | モジュールのスタイルです。 | -| `disabled` | `true` | Disables the `shell` module. | +| オプション | デフォルト | 説明 | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | module のフォーマットです。 | +| `style` | `'white bold'` | モジュールのスタイルです。 | +| `disabled` | `true` | Disables the `shell` module. | ### 変数 @@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https: | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | -| `version_format` | `"v${major}.${minor}.${patch}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | どの拡張子がこのモジュールをアクティブにするか | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${major}.${minor}.${patch}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold blue"` | モジュールのスタイルです。 | +| `style` | `'bold blue'` | モジュールのスタイルです。 | | `disabled` | `false` | Disables this module. | ### 変数 @@ -4009,6 +4141,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 + +- カレントディレクトリに`template.typ`ファイルが含まれている +- The current directory contains any `*.typ` file + +### オプション + +| オプション | デフォルト | 説明 | +| ------------------- | ------------------------------------ | ------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'t '` | Damlの記号を表すフォーマット文字列です。 | +| `style` | `'bold #0093A7'` | モジュールのスタイルです。 | +| `detect_extensions` | `['.typ']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['template.typ']` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | +| `disabled` | `false` | `daml`モジュールを無効にします。 | + +### 変数 + +| 変数 | 設定例 | 説明 | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | + +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 + ## ユーザー名 `username`モジュールはアクティブなユーザーのユーザー名を表示します。 次の条件のいずれかが満たされると、モジュールが表示されます: diff --git a/docs/ja-JP/faq/README.md b/docs/ja-JP/faq/README.md index 6a8bb91ee..7b3b84b1f 100644 --- a/docs/ja-JP/faq/README.md +++ b/docs/ja-JP/faq/README.md @@ -120,3 +120,11 @@ Starship をインストールスクリプトを使用してインストール # starshipのバイナリを見つけて削除 sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/ja-JP/guide/README.md b/docs/ja-JP/guide/README.md index 84677ee3c..1d0167b36 100644 --- a/docs/ja-JP/guide/README.md +++ b/docs/ja-JP/guide/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="Follow @StarshipPrompt on Twitter" /> + Stand With Ukraine

@@ -147,8 +152,6 @@ />

-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

@@ -270,7 +274,7 @@ curl -sS https://starship.rs/install.sh | sh
-### Step 2. Set up your shell to use Starship +### Step 2. Starshipをシェルにセットアップ Starshipを初期化するためのシェルの設定。 以下のリストからお使いのシェルを選択してください。 @@ -334,27 +338,27 @@ eval $(starship init ion)
Nushell -Nushellの環境ファイルの最後に以下を追記してください ( `$nu.env-path` を実行してください): +そして、Nushellの設定ファイルの最後に以下を追加してください( `$nu.config-path` を実行してください): ```sh mkdir ~/.cache/starship starship init nu | save -f ~/.cache/starship/init.nu ``` -そして、Nushellの設定ファイルの最後に以下を追加してください( `$nu.config-path` を実行してください)。 +そして、Nushellの設定ファイルの最後に以下を追記してください (`$nu.config-path` を実行してください): ```sh use ~/.cache/starship/init.nu ``` -注意: Elvish v0.78以降でサポートされています +注意: Nushell v0.78以降でサポートされています
PowerShell -PowerShellの設定ファイルの最後に以下を追記してください (`$PROFILE` を実行してください): +そして、Nushellの設定ファイルの最後に以下を追加してください( `$PROFILE.config-path` を実行してください): ```powershell Invoke-Expression (&starship init powershell) diff --git a/docs/ja-JP/presets/README.md b/docs/ja-JP/presets/README.md index cbfe7047a..0eebf1a3d 100644 --- a/docs/ja-JP/presets/README.md +++ b/docs/ja-JP/presets/README.md @@ -63,3 +63,9 @@ This preset does not show icons if the toolset is not found. このプリセットは[tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme)を参考にしています。 [![Tokyo Night プリセットのスクリーンショット](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) diff --git a/docs/ja-JP/presets/gruvbox-rainbow.md b/docs/ja-JP/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..badafdbdb --- /dev/null +++ b/docs/ja-JP/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[プリセット一覧に戻る](./README.md#gruvbox-rainbow) + +# Gruvbox Rainbow Preset + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png) + +### 必要なもの + +- [Nerd Font](https://www.nerdfonts.com/)のインストールとターミナルでの有効化 + +### 設定 + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[クリックしてTOMLをダウンロード](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/ja-JP/presets/jetpack.md b/docs/ja-JP/presets/jetpack.md new file mode 100644 index 000000000..59a44ce3f --- /dev/null +++ b/docs/ja-JP/presets/jetpack.md @@ -0,0 +1,24 @@ +[プリセット一覧に戻る](./README.md#jetpack) + +# Jetpack Preset + +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 uses the terminal's color theme. + +![Screenshot of Jetpack preset](/presets/img/jetpack.png) + +### Prerequisite + +- 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. + +### 設定 + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[クリックしてTOMLをダウンロード](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/ko-KR/README.md b/docs/ko-KR/README.md index c3d7bbbd5..1b95959bb 100644 --- a/docs/ko-KR/README.md +++ b/docs/ko-KR/README.md @@ -2,23 +2,23 @@ home: true heroImage: /logo.svg heroText: -tagline: 간결하고 화끈하게 빠르며 무제한으로 커스터마이징이 가능한 프롬프트. 어떤 쉘에서든 사용할 수 있습니다! -actionText: Get Started → +tagline: 아무 셸에나 적용할 수 있는 작고, 매우 빠르며, 무한히 커스텀 가능한 프롬프트입니다! +actionText: 시작하기 → actionLink: ./guide/ features: - - title: Compatibility First - details: Works on the most common shells on the most common operating systems. Use it everywhere! + title: 호환성 우선 + details: 거의 모든 운영 체제의 거의 모든 셸에서 동작합니다. 모든 곳에서 사용해 보세요! - - title: Rust-Powered - details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible. + title: Rust 기반 + details: Rust의 최고 수준의 속도와 안정성으로 프롬프트를 가능한 한 빠르고 안정적으로 만들어 보세요. - - title: Customizable - details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be. + title: 커스텀 가능 + details: 모든 사소한 디테일들을 마음대로 커스텀할 수 있어, 프롬프트를 원하는 만큼 간단하게 만들거나 기능이 풍부하게 만들 수 있습니다. footer: ISC Licensed | Copyright © 2019-present Starship Contributors #Used for the description meta tag, for SEO -metaTitle: "Starship: Cross-Shell Prompt" -description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell. +metaTitle: "Starship: 크로스-셸 프롬프트" +description: Starship은 아무 셸에나 적용할 수 있는 작고, 매우 빠르며, 무한히 커스텀 가능한 프롬프트입니다! 필요한 정보를 깔끔하고 간략하게 표시합니다. Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, 및 PowerShell에 빠르게 설치할 수 있습니다. ---
@@ -39,7 +39,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### 최근 버전 설치 - With Shell: + 셸로 설치: ```sh curl -sS https://starship.rs/install.sh | sh @@ -48,14 +48,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p Starship을 업데이트하고 싶은 경우에도 위의 스크립트를 실행시키면 됩니다. Starship의 설정은 변경되지 않고 버전만 최근 버전으로 대체될 것입니다. - #### 패키지 매니저를 이용한 설치 + #### 패키지 매니저로 설치하기 - [Homebrew](https://brew.sh/)를 통한 설치: + [Homebrew](https://brew.sh/)로 설치: ```sh brew install starship ``` - With [Winget](https://github.com/microsoft/winget-cli): + [Winget](https://github.com/microsoft/winget-cli)으로 설치: ```powershell winget install starship @@ -121,7 +121,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p ::: warning - Only elvish v0.18 or higher is supported. + elvish 버전 v0.18 이상에서만 지원됩니다. ::: @@ -149,17 +149,17 @@ description: Starship is the minimal, blazing fast, and extremely customizable p ::: warning - This will change in the future. Only Nushell v0.78+ is supported. + 추후에 변경될 예정입니다. Nushell v0.78 버전 이상에서만 지원됩니다. ::: - Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell): + 다음 내용을 Nushell env 파일 (찾으려면 Nushell에서 `$nu.env-path` 실행) 마지막 부분에 추가하세요: ```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`): + 다음 내용을 Nushell 설정 파일 (찾으려면 Nushell에서 `$nu.config-path` 실행) 마지막 부분에 추가하세요: ```sh use ~/.cache/starship/init.nu diff --git a/docs/ko-KR/advanced-config/README.md b/docs/ko-KR/advanced-config/README.md index 01374ceff..b18e3a05c 100644 --- a/docs/ko-KR/advanced-config/README.md +++ b/docs/ko-KR/advanced-config/README.md @@ -1,4 +1,4 @@ -# Advanced Configuration +# 고급 설정 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. @@ -199,27 +199,27 @@ function Invoke-Starship-PreCommand { Invoke-Expression (&starship init powershell) ``` -## Enable Right Prompt +## 오른쪽 프롬프트 활성화 -Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. +일부 셸은 입력과 같은 줄에 렌더링되는 오른쪽 프롬프트를 지원합니다. Starship에서는 `right_format` 옵션을 사용하여 오른쪽 프롬프트의 내용을 설정할 수 있습니다. `format`에서 사용할 수 있는 모든 모듈은 `right_format`에서도 지원됩니다. `$all` 변수는 `format` 또는 `right_format`에서 명시적으로 사용하지 않는 모듈만 포함합니다. -Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill). +알림: 오른쪽 프롬프트는 입력 위치에 따라 한 줄로 표시됩니다. 여러 줄 프롬프트에서 입력 선 위의 모듈을 오른쪽 정렬하려면, [`fill` 모듈](/config/#fill)을 참고하세요. -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format`은 현재 elvish, fish, zsh, xonsh, cmd, nushell에서 지원됩니다. -### Example +### 예시 ```toml # ~/.config/starship.toml -# A minimal left prompt +# 간결한 왼쪽 프롬프트 format = """$character""" -# move the rest of the prompt to the right +# 프롬프트의 나머지를 오른쪽으로 옮기기 right_format = """$all""" ``` -Produces a prompt like the following: +위 설정은 아래와 같은 프롬프트를 출력합니다: ``` ▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s @@ -239,7 +239,7 @@ Note: Continuation prompts are only available in the following shells: - `zsh` - `Powershell` -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -248,9 +248,9 @@ Note: Continuation prompts are only available in the following shells: continuation_prompt = '▶▶ ' ``` -## Style Strings +## 스타일 문자열 -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: +스타일 문자열은 공백으로 구분된 단어 목록입니다. 단어는 대소문자를 구분하지 않습니다 (즉, `bold`와 `BoLd`는 동일한 문자열로 간주됩니다). 각 단어는 다음 중 하나가 될 수 있습니다: - `bold` - `italic` @@ -265,15 +265,15 @@ Style strings are a list of words, separated by whitespace. The words are not ca - `` - `none` -where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. +`` 부분은 색상 지정자입니다 (아래에 후술). 현재, `fg:` 와 ``는 동일한 동작을 하지만 차후에 바뀔 수 있습니다. `inverted`는 배경 색과 전경 색을 서로 바꿉니다. 문자열의 단어 순서는 중요하지 않습니다. -The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. +The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. 향후 다른 토큰과 함께 `none`을 사용하는 것은 오류가 발생할 수 있습니다. -A color specifier can be one of the following: +색상 지정자는 다음 중 하나가 될 수 있습니다: -- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). -- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). -- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). +- 표준 터미널 색상: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. 앞에 `bright-`를 붙여 밝게 만들 수도 있습니다 (예시: `bright-white`). +- `#` 다음의 여섯 자리 16진수 숫자. 이는 [RGB 색상 16진수 코드](https://www.w3schools.com/colors/colors_hexadecimal.asp)입니다. +- 0~255 사이의 숫자. 이는 [8비트 ANSI 색상 코드](https://i.stack.imgur.com/KTSQa.png)입니다. If multiple colors are specified for foreground/background, the last one in the string will take priority. diff --git a/docs/ko-KR/config/README.md b/docs/ko-KR/config/README.md index 396fbb2c9..4875c0e82 100644 --- a/docs/ko-KR/config/README.md +++ b/docs/ko-KR/config/README.md @@ -1,30 +1,30 @@ -# Configuration +# 설정 -To get started configuring starship, create the following file: `~/.config/starship.toml`. +Starship을 설정하려면, `~/.config/starship.toml` 경로에 파일을 만드세요. ```sh mkdir -p ~/.config && touch ~/.config/starship.toml ``` -All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file: +Starship의 모든 설정은 이 [TOML](https://github.com/toml-lang/toml) 파일에서 할 수 있습니다. ```toml -# Get editor completions based on the config schema +# 설정 스키마에 따른 에디터 자동 완성 가져오기 "$schema" = 'https://starship.rs/config-schema.json' -# Inserts a blank line between shell prompts +# 셸 프롬프트 사이에 빈 줄 추가하기 add_newline = true -# Replace the '❯' symbol in the prompt with '➜' -[character] # The name of the module we are configuring is 'character' -success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green' +# 프롬프트의 '❯' 심볼을 '➜' 로 대체하기 +[character] # 설정할 모듈의 이름은 'character' +success_symbol = '[➜](bold green)' # 'success_symbol' 세그먼트를 'bold green' 색상의 '➜' 로 설정 -# Disable the package module, hiding it from the prompt completely +# package 모듈을 비활성화하고 프롬프트에서 완전히 숨겨버리기 [package] disabled = true ``` -### Config File Location +### 설정 파일 경로 You can change default configuration file location with `STARSHIP_CONFIG` environment variable: @@ -44,7 +44,7 @@ Or for Cmd (Windows) would be adding this line to your `starship.lua`: os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\starship.toml') ``` -### Logging +### 로그 By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to an instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable: @@ -64,28 +64,28 @@ Or for Cmd (Windows) would be adding this line to your `starship.lua`: os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') ``` -### Terminology +### 용어 -**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of Node.js that is currently installed on your computer, if your current directory is a Node.js project. +**모듈**: OS의 배경 정보를 기반으로 정보를 제공하는 프롬프트의 구성 요소입니다. 예를 들어, "nodejs" 모듈은 현재 디렉토리가 Node.js 프로젝트 디렉토리라면 컴퓨터에 현재 설치되어 있는 Node.js 버전을 보여줍니다. **Variable**: Smaller sub-components that contain information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of Node.js. By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. -### Strings +### 문자열 -In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. +TOML 문법에서는 [텍스트 값](https://toml.io/en/v1.0.0#string)을 `'`, `"`, `'''`, 그리고 `"""`으로 지정합니다. The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. -| Symbol | Type | Notes | -| ------ | ------------------------- | ------------------------------------------------------ | -| `'` | literal string | less escaping | -| `"` | string | more escaping | -| `'''` | multi-line literal string | less escaping | -| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | +| 기호 | 종류 | 비고 | +| ----- | ------------------------- | ------------------------------------------------------ | +| `'` | 리터럴 문자열 | less escaping | +| `"` | string | more escaping | +| `'''` | multi-line literal string | less escaping | +| `"""` | multi-line string | more escaping, newlines in declarations can be ignored | -For example: +예를 들어: ```toml # literal string @@ -136,7 +136,7 @@ Format strings are the format that a module prints all its variables with. Most A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`. -For example: +예를 들어: - `'$version'` is a format string with a variable named `version`. - `'$git_branch$git_commit'` is a format string with two variables named `git_branch` and `git_commit`. @@ -150,15 +150,15 @@ The first part, which is enclosed in a `[]`, is a [format string](#format-string In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part. -For example: +예를 들어: - `'[on](red bold)'` will print a string `on` with bold text colored red. - `'[⌘ $version](bold green)'` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green. - `'[a [b](red) c](green)'` will print `a b c` with `b` red, and `a` and `c` green. -#### Style Strings +#### 스타일 문자열 -Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). +Starship의 대부분의 모듈에 표시 스타일을 설정할 수 있습니다. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). - `'fg:green bg:blue'` sets green text on a blue background - `'bg:blue fg:bright-green'` sets bright green text on a blue background @@ -173,7 +173,7 @@ Note that what styling looks like will be controlled by your terminal emulator. A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. -For example: +예를 들어: - `'(@$region)'` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. - `'(some text)'` will always show nothing since there are no variables wrapped in the braces. @@ -206,8 +206,15 @@ This is the list of prompt-wide configuration options. | `add_newline` | `true` | Inserts blank line between shell prompts. | | `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | -### Example +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: + +### 예시 ```toml # ~/.config/starship.toml @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,32 +361,34 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### Options | Option | Default | Description | | ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | The format for the module. | -| `symbol` | `'☁️ '` | The symbol used before displaying the current AWS profile. | +| `기호` | `'☁️ '` | The symbol used before displaying the current AWS profile. | | `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. | | `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | | `style` | `'bold yellow'` | The style for the module. | -| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | +| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | ---------------- | ------------------------------------------- | | region | `ap-northeast-1` | The current AWS region | | profile | `astronauts` | The current AWS profile | | duration | `2h27m20s` | The temporary credentials validity duration | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Examples +### 예시 #### Display everything @@ -430,12 +442,12 @@ The `azure` module shows the current Azure Subscription. This is based on showin | Variable | Default | Description | | ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | -| `symbol` | `'󰠅 '` | The symbol used in the format. | +| `기호` | `'󰠅 '` | The symbol used in the format. | | `style` | `'blue bold'` | The style used in the format. | | `disabled` | `true` | Disables the `azure` module. | | `subscription_aliases` | `{}` | Table of subscription name aliases to display in addition to Azure subscription name. | -### Examples +### 예시 #### Display Subscription Name @@ -487,7 +499,7 @@ The `battery` module shows how charged the device's battery is and its current c | `display` | [link](#battery-display) | Display threshold and style for the module. | | `disabled` | `false` | Disables the `battery` module. | -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -521,7 +533,7 @@ The `display` option is an array of the following table. | `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. | | `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. | -#### Example +#### 예시 ```toml [[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% @@ -549,7 +561,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | | `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | | `version_format` | `'v${raw}'` | The version format. | -| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. | +| `기호` | `'🐃 '` | The symbol used before displaying the version of Buf. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | @@ -558,15 +570,15 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------- | ------------------------------------ | | `version` | `v1.0.0` | The version of `buf` | -| `symbol` | | Mirrors the value of option `symbol` | +| `기호` | | Mirrors the value of option `symbol` | | `style`* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -588,7 +600,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. | +| `기호` | `'🍞 '` | A format string representing the symbol of Bun. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `['bun.lockb', 'bunfig.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -597,15 +609,15 @@ The `bun` module shows the currently installed version of the [bun](https://bun. ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------- | ------------------------------------ | | version | `v0.1.4` | The version of `bun` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -620,26 +632,26 @@ The `c` module shows some information about your C compiler. By default the modu ### Options -| Option | Default | Description | -| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'C '` | The symbol used before displaying the compiler details | -| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | -| `style` | `'bold 149'` | The style for the module. | -| `disabled` | `false` | Disables the `c` module. | +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `기호` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | +| `style` | `'bold 149'` | The style for the module. | +| `disabled` | `false` | Disables the `c` module. | ### Variables -| Variable | Example | Description | -| -------- | ------- | ------------------------------------ | -| name | clang | The name of the compiler | -| version | 13.0.0 | The version of the compiler | -| symbol | | Mirrors the value of option `symbol` | -| style | | Mirrors the value of option `style` | +| Variable | 예시 | Description | +| -------- | ------ | ------------------------------------ | +| name | clang | The name of the compiler | +| version | 13.0.0 | The version of the compiler | +| 기호 | | Mirrors the value of option `symbol` | +| style | | Mirrors the value of option `style` | NB that `version` is not in the default format. @@ -651,7 +663,7 @@ Each command is represented as a list of the executable name, followed by its ar If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/). -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -692,11 +704,11 @@ By default it only changes color. If you also want to change its shape take a lo ### Variables -| Variable | Example | Description | -| -------- | ------- | -------------------------------------------------------------------------------------------------------- | -| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. | +| Variable | 예시 | Description | +| -------- | -- | -------------------------------------------------------------------------------------------------------- | +| 기호 | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. | -### Examples +### 예시 #### With custom error shape @@ -740,7 +752,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'△ '` | The symbol used before the version of cmake. | +| `기호` | `'△ '` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this module | | `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | @@ -749,10 +761,10 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | --------- | ------------------------------------ | | version | `v3.17.3` | The version of cmake | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -768,7 +780,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | +| `기호` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `style` | `'bold blue'` | The style for the module. | @@ -779,10 +791,10 @@ The `cobol` module shows the currently installed version of COBOL. By default, t ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | ---------- | ------------------------------------ | | version | `v3.1.2.0` | The version of `cobol` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -814,14 +826,14 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------- | --------------------------------------- | | duration | `16m40s` | The time it took to execute the command | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -846,7 +858,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | Option | Default | Description | | ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | -| `symbol` | `'🅒 '` | The symbol used before the environment name. | +| `기호` | `'🅒 '` | The symbol used before the environment name. | | `style` | `'bold green'` | The style for the module. | | `format` | `'via [$symbol$environment]($style) '` | The format for the module. | | `ignore_base` | `true` | Ignores `base` environment when activated. | @@ -854,15 +866,15 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | ----------- | ------------ | ------------------------------------ | | environment | `astronauts` | The current conda environment | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -879,22 +891,22 @@ The `container` module displays a symbol and container name, if inside a contain | Option | Default | Description | | ---------- | ---------------------------------- | ----------------------------------------- | -| `symbol` | `'⬢'` | The symbol shown, when inside a container | +| `기호` | `'⬢'` | The symbol shown, when inside a container | | `style` | `'bold red dimmed'` | The style for the module. | | `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `container` module. | ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | ------------------- | ------------------------------------ | | name | `fedora-toolbox:35` | The name of the container | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -914,7 +926,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `'🔮 '` | The symbol used before displaying the version of crystal. | +| `기호` | `'🔮 '` | The symbol used before displaying the version of crystal. | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `style` | `'bold red'` | The style for the module. | @@ -925,15 +937,15 @@ The `crystal` module shows the currently installed version of [Crystal](https:// ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | --------- | ------------------------------------ | | version | `v0.32.1` | The version of `crystal` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -954,7 +966,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'Λ '` | A format string representing the symbol of Daml | +| `기호` | `'Λ '` | A format string representing the symbol of Daml | | `style` | `'bold cyan'` | The style for the module. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `['daml.yaml']` | Which filenames should trigger this module. | @@ -963,15 +975,15 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------- | ------------------------------------ | | version | `v2.2.0` | The version of `daml` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -994,7 +1006,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'🎯 '` | A format string representing the symbol of Dart | +| `기호` | `'🎯 '` | A format string representing the symbol of Dart | | `detect_extensions` | `['dart']` | Which extensions should trigger this module. | | `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Which filenames should trigger this module. | | `detect_folders` | `['.dart_tool']` | Which folders should trigger this module. | @@ -1003,15 +1015,15 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------- | ------------------------------------ | | version | `v2.8.4` | The version of `dart` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -1032,7 +1044,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d | ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'🦕 '` | A format string representing the symbol of Deno | +| `기호` | `'🦕 '` | A format string representing the symbol of Deno | | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -1041,13 +1053,13 @@ The `deno` module shows you your currently installed version of [Deno](https://d ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------- | ------------------------------------ | | version | `v1.8.3` | The version of `deno` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -1105,7 +1117,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | --------------------- | ----------------------------------- | | path | `'D:/Projects'` | The current directory path | | style\* | `'black bold dimmed'` | Mirrors the value of option `style` | @@ -1117,7 +1129,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an Let us consider the path `/path/to/home/git_repo/src/lib` -| Variable | Example | Description | +| Variable | 예시 | Description | | ------------------ | --------------------- | --------------------------------------- | | before_root_path | `'/path/to/home/'` | The path before git root directory path | | repo_root | `'git_repo'` | The git root directory name | @@ -1127,7 +1139,7 @@ Let us consider the path `/path/to/home/git_repo/src/lib`
-### Example +### 예시 ```toml # ~/.config/starship.toml @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. | +| `기호` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | The style for the module. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['.envrc']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Variables + +| Variable | 예시 | Description | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| 기호 | | Mirrors the value of option `symbol`. | +| style\* | `red bold` | Mirrors the value of option `style`. | + +*: This variable can only be used as a part of a style string + +### 예시 + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Docker Context The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). @@ -1146,7 +1199,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | Option | Default | Description | | ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | | `format` | `'via [$symbol$context]($style) '` | The format for the module. | -| `symbol` | `'🐳 '` | The symbol used before displaying the Docker context. | +| `기호` | `'🐳 '` | The symbol used before displaying the Docker context. | | `only_with_files` | `true` | Only show when there's a match | | `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | | `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Which filenames should trigger this module (needs `only_with_files` to be true). | @@ -1156,15 +1209,15 @@ The `docker_context` module shows the currently active [Docker context](https:// ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------------- | ------------------------------------ | | context | `test_context` | The current docker context | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -1200,7 +1253,7 @@ The module will also show the Target Framework Moniker ($` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------------------- | ---------------------------------------- | | context | `starship-context` | The current kubernetes context name | | namespace | `starship-namespace` | If set, the current kubernetes namespace | | user | `starship-user` | If set, the current kubernetes user | | cluster | `starship-cluster` | If set, the current kubernetes cluster | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Regex Matching +#### Kubernetes Context specific config -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. - -Long and automatically generated cluster names can be identified and shortened using regular expressions: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Line Break @@ -2418,7 +2549,7 @@ The `line_break` module separates the prompt into two lines. | ---------- | ------- | ------------------------------------------------------------------ | | `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -2442,14 +2573,14 @@ The `localip` module shows the IPv4 address of the primary network interface. ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | ------------ | ----------------------------------- | | localipv4 | 192.168.1.13 | Contains the primary IPv4 address | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -2474,7 +2605,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | ------------------- | ------------------------------------ | -------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'🌙 '` | A format string representing the symbol of Lua. | +| `기호` | `'🌙 '` | A format string representing the symbol of Lua. | | `detect_extensions` | `['lua']` | Which extensions should trigger this module. | | `detect_files` | `['.lua-version']` | Which filenames should trigger this module. | | `detect_folders` | `['lua']` | Which folders should trigger this module. | @@ -2484,15 +2615,15 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------- | ------------------------------------ | | version | `v5.4.0` | The version of `lua` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -2519,24 +2650,24 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | ----------- | ----------------------------------------------- | -------------------------------------------------------- | | `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | | `format` | `'via $symbol [${ram}( \| ${swap})]($style) '` | The format for the module. | -| `symbol` | `'🐏'` | The symbol used before displaying the memory usage. | +| `기호` | `'🐏'` | The symbol used before displaying the memory usage. | | `style` | `'bold dimmed white'` | The style for the module. | | `disabled` | `true` | Disables the `memory_usage` module. | ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | ---------------- | ------------- | ------------------------------------------------------------------ | | ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. | | ram_pct | `48%` | The percentage of the current system memory. | | swap\*\* | `1GiB/4GiB` | The swap memory size of the current system swap memory file. | | swap_pct\*\* | `77%` | The swap memory percentage of the current system swap memory file. | -| symbol | `🐏` | Mirrors the value of option `symbol` | +| 기호 | `🐏` | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string *\*: The SWAP file information is only displayed if detected on the current system -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -2561,21 +2692,21 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. | `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | | `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | | `format` | `'via [$symbol$project]($style) '` | The format for the module. | -| `symbol` | `'⬢ '` | The symbol used before displaying the project name. | +| `기호` | `'⬢ '` | The symbol used before displaying the project name. | | `style` | `'blue bold'` | The style for the module. | | `disabled` | `false` | Disables the `meson` module. | ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | ---------- | ------------------------------------ | | project | `starship` | The current Meson project name | -| symbol | `🐏` | Mirrors the value of option `symbol` | +| 기호 | `🐏` | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -2595,7 +2726,7 @@ The `hg_branch` module shows the active branch and topic of the repo in your cur | Option | Default | Description | | ------------------- | ----------------------------------------- | -------------------------------------------------------------------------------------------- | -| `symbol` | `' '` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `기호` | `' '` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | | `style` | `'bold purple'` | The style for the module. | | `format` | `'on [$symbol$branch(:$topic)]($style) '` | The format for the module. | | `truncation_length` | `2^63 - 1` | Truncates the hg branch / topic name to `N` graphemes | @@ -2604,16 +2735,16 @@ The `hg_branch` module shows the active branch and topic of the repo in your cur ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | --------- | ------------------------------------ | | branch | `master` | The active mercurial branch | | topic | `feature` | The active mercurial topic | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -2639,7 +2770,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. | +| `기호` | `'👑 '` | The symbol used before displaying the version of Nim. | | `detect_extensions` | `['nim', 'nims', 'nimble']` | Which extensions should trigger this module. | | `detect_files` | `['nim.cfg']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -2648,15 +2779,15 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------- | ------------------------------------ | | version | `v1.2.0` | The version of `nimc` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -2675,7 +2806,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | Option | Default | Description | | ------------- | ---------------------------------------------- | --------------------------------------------------------------------- | | `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. | -| `symbol` | `'❄️ '` | A format string representing the symbol of nix-shell. | +| `기호` | `'❄️ '` | A format string representing the symbol of nix-shell. | | `style` | `'bold blue'` | The style for the module. | | `impure_msg` | `'impure'` | A format string shown when the shell is impure. | | `pure_msg` | `'pure'` | A format string shown when the shell is pure. | @@ -2685,16 +2816,16 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | ------- | ------------------------------------ | | state | `pure` | The state of the nix-shell | | name | `lorri` | The name of the nix-shell | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -2724,26 +2855,26 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `' '` | A format string representing the symbol of Node.js. | +| `기호` | `' '` | A format string representing the symbol of Node.js. | | `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Which extensions should trigger this module. | | `detect_files` | `['package.json', '.node-version']` | Which filenames should trigger this module. | | `detect_folders` | `['node_modules']` | Which folders should trigger this module. | | `style` | `'bold green'` | The style for the module. | | `disabled` | `false` | Disables the `nodejs` module. | -| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | +| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | | version | `v13.12.0` | The version of `node` | | engines_version | `>=12.0.0` | `node` version requirement as set in the engines property of `package.json`. Will only show if the version requirement does not match the `node` version. | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -2769,7 +2900,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. | +| `기호` | `'🐫 '` | The symbol used before displaying the version of OCaml. | | `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. | | `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. | | `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Which extensions should trigger this module. | @@ -2780,17 +2911,17 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | ---------------- | ------------ | ----------------------------------------------------------------- | | version | `v4.10.0` | The version of `ocaml` | | switch_name | `my-project` | The active OPAM switch | | switch_indicator | | Mirrors the value of `indicator` for currently active OPAM switch | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -2809,7 +2940,7 @@ The `opa` module shows the currently installed version of the OPA tool. By defau | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. | +| `기호` | `'🪖 '` | A format string representing the symbol of OPA. | | `detect_extensions` | `['rego']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -2818,15 +2949,15 @@ The `opa` module shows the currently installed version of the OPA tool. By defau ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | --------- | ------------------------------------ | | version | `v0.44.0` | The version of `opa` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -2844,22 +2975,22 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Option | Default | Description | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | | `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. | -| `symbol` | `'☁️ '` | The symbol used before displaying the current OpenStack cloud. | +| `기호` | `'☁️ '` | The symbol used before displaying the current OpenStack cloud. | | `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `openstack` module. | ### Variables -| Variable | Example | Description | -| --------- | ------- | ------------------------------------ | -| cloud | `corp` | The current OpenStack cloud | -| project | `dev` | The current OpenStack project | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | 예시 | Description | +| --------- | ------ | ------------------------------------ | +| cloud | `corp` | The current OpenStack cloud | +| project | `dev` | The current OpenStack project | +| 기호 | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -2890,8 +3021,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | The format for the module. | -| `style` | `"bold white"` | The style for the module. | +| `format` | `'[$symbol]($style)'` | The format for the module. | +| `style` | `'bold white'` | The style for the module. | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -2945,11 +3076,11 @@ Windows = "🪟 " ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | ------------ | ------------------------------------------------------------------ | -| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | +| 기호 | `🎗️` | The current operating system symbol from advanced option `symbols` | | name | `Arch Linux` | The current operating system name | -| type | `Arch` | The current operating system type | +| 종류 | `Arch` | The current operating system type | | codename | | The current operating system codename, if applicable | | edition | | The current operating system edition, if applicable | | version | | The current operating system version, if applicable | @@ -2957,7 +3088,7 @@ Windows = "🪟 " *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3001,7 +3132,7 @@ The `package` module is shown when the current directory is the repository for a | Option | Default | Description | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | | `format` | `'is [$symbol$version]($style) '` | The format for the module. | -| `symbol` | `'📦 '` | The symbol used before displaying the version the package. | +| `기호` | `'📦 '` | The symbol used before displaying the version the package. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `style` | `'bold 208'` | The style for the module. | | `display_private` | `false` | Enable displaying version for packages marked as private. | @@ -3009,15 +3140,15 @@ The `package` module is shown when the current directory is the repository for a ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------- | ------------------------------------ | | version | `v1.0.0` | The version of your package | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3042,7 +3173,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | +| `기호` | `'🐪 '` | The symbol used before displaying the version of Perl | | `detect_extensions` | `['pl', 'pm', 'pod']` | Which extensions should trigger this module. | | `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3051,13 +3182,13 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | --------- | ------------------------------------ | | version | `v5.26.1` | The version of `perl` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3080,7 +3211,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'🐘 '` | The symbol used before displaying the version of PHP. | +| `기호` | `'🐘 '` | The symbol used before displaying the version of PHP. | | `detect_extensions` | `['php']` | Which extensions should trigger this module. | | `detect_files` | `['composer.json', '.php-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3089,15 +3220,15 @@ The `php` module shows the currently installed version of [PHP](https://www.php. ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------- | ------------------------------------ | | version | `v7.3.8` | The version of `php` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3114,7 +3245,7 @@ The `pijul_channel` module shows the active channel of the repo in your current | Option | Default | Description | | ------------------- | --------------------------------- | ------------------------------------------------------------------------------------ | -| `symbol` | `' '` | The symbol used before the pijul channel name of the repo in your current directory. | +| `기호` | `' '` | The symbol used before the pijul channel name of the repo in your current directory. | | `style` | `'bold purple'` | The style for the module. | | `format` | `'on [$symbol$channel]($style) '` | The format for the module. | | `truncation_length` | `2^63 - 1` | Truncates the pijul channel name to `N` graphemes | @@ -3127,7 +3258,7 @@ The `pulumi` module shows the current username, selected [Pulumi Stack](https:// ::: tip -By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). 그래도 활성화하려면, [아래에 있는 예시를 따라 하세요](#with-pulumi-version). ::: @@ -3142,24 +3273,24 @@ By default the module will be shown if any of the following conditions are met: | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `' '` | A format string shown before the Pulumi stack. | +| `기호` | `' '` | A format string shown before the Pulumi stack. | | `style` | `'bold 5'` | The style for the module. | | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Disables the `pulumi` module. | ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | ---------- | ------------------------------------ | | version | `v0.12.24` | The version of `pulumi` | | stack | `dev` | The current Pulumi stack | | username | `alice` | The current Pulumi username | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 #### With Pulumi Version @@ -3192,7 +3323,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `기호` | `'<=> '` | The symbol used before displaying the version of PureScript. | | `detect_extensions` | `['purs']` | Which extensions should trigger this module. | | `detect_files` | `['spago.dhall']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3201,15 +3332,15 @@ The `purescript` module shows the currently installed version of [PureScript](ht ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------- | ------------------------------------ | | version | `0.13.5` | The version of `purescript` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3242,10 +3373,10 @@ By default the module will be shown if any of the following conditions are met: | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'🐍 '` | A format string representing the symbol of Python | +| `기호` | `'🐍 '` | A format string representing the symbol of Python | | `style` | `'yellow bold'` | The style for the module. | | `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `['py']` | Which extensions should trigger this module | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | @@ -3262,15 +3393,15 @@ The default values and order for `python_binary` was chosen to first identify th ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | ------------ | --------------- | ------------------------------------------ | | version | `'v3.8.1'` | The version of `python` | -| symbol | `'🐍 '` | Mirrors the value of option `symbol` | +| 기호 | `'🐍 '` | Mirrors the value of option `symbol` | | style | `'yellow bold'` | Mirrors the value of option `style` | | pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` | | virtualenv | `'venv'` | The current `virtualenv` name | -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3325,7 +3456,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'📐'` | A format string representing the symbol of R. | +| `기호` | `'📐'` | A format string representing the symbol of R. | | `style` | `'blue bold'` | The style for the module. | | `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Which extensions should trigger this module | | `detect_files` | `['.Rprofile']` | Which filenames should trigger this module | @@ -3334,13 +3465,13 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | -------- | ------------- | ------------------------------------ | | version | `v4.0.5` | The version of `R` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style | `'blue bold'` | Mirrors the value of option `style` | -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3362,7 +3493,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `기호` | `'🦋 '` | The symbol used before displaying the version of Raku | | `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Which extensions should trigger this module. | | `detect_files` | `['META6.json']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3371,14 +3502,14 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra ### Variables -| Variable | Example | Description | -| ---------- | ------- | ------------------------------------ | -| version | `v6.d` | The version of `raku` | -| vm_version | `moar` | The version of VM `raku` is built on | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | 예시 | Description | +| ---------- | ------ | ------------------------------------ | +| version | `v6.d` | The version of `raku` | +| vm_version | `moar` | The version of VM `raku` is built on | +| 기호 | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3399,7 +3530,7 @@ By default the `red` module shows the currently installed version of [Red](https | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'🔺 '` | A format string representing the symbol of Red. | +| `기호` | `'🔺 '` | A format string representing the symbol of Red. | | `detect_extensions` | `['red']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3408,15 +3539,15 @@ By default the `red` module shows the currently installed version of [Red](https ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------- | ------------------------------------ | | version | `v2.5.1` | The version of `red` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3442,7 +3573,7 @@ Starship gets the current Ruby version by running `ruby -v`. | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'💎 '` | A format string representing the symbol of Ruby. | +| `기호` | `'💎 '` | A format string representing the symbol of Ruby. | | `detect_extensions` | `['rb']` | Which extensions should trigger this module. | | `detect_files` | `['Gemfile', '.ruby-version']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3452,15 +3583,15 @@ Starship gets the current Ruby version by running `ruby -v`. ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------- | ------------------------------------ | | version | `v2.5.1` | The version of `ruby` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3482,7 +3613,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'🦀 '` | A format string representing the symbol of Rust | +| `기호` | `'🦀 '` | A format string representing the symbol of Rust | | `detect_extensions` | `['rs']` | Which extensions should trigger this module. | | `detect_files` | `['Cargo.toml']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3491,17 +3622,17 @@ By default the `rust` module shows the currently installed version of [Rust](htt ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | ----------------- | -------------------------------------------- | | version | `v1.43.0-nightly` | The version of `rustc` | | numver | `1.51.0` | The numeric component of the `rustc` version | | toolchain | `beta` | The toolchain version | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3527,21 +3658,21 @@ The `scala` module shows the currently installed version of [Scala](https://www. | `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. | | `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. | | `detect_folders` | `['.metals']` | Which folders should trigger this modules. | -| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. | +| `기호` | `'🆂 '` | A format string representing the symbol of Scala. | | `style` | `'red dimmed'` | The style for the module. | | `disabled` | `false` | Disables the `scala` module. | ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------- | ------------------------------------ | | version | `2.13.5` | The version of `scala` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3562,22 +3693,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `'bsh'` | A format string used to represent bash. | -| `fish_indicator` | `'fsh'` | A format string used to represent fish. | -| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | -| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | -| `ion_indicator` | `'ion'` | A format string used to represent ion. | -| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | -| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | -| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | -| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | -| `nu_indicator` | `'nu'` | A format string used to represent nu. | -| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | -| `format` | `'[$indicator]($style) '` | The format for the module. | -| `style` | `'white bold'` | The style for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | Default | Description | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | The style for the module. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3588,7 +3720,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y *: This variable can only be used as a part of a style string -### Examples +### 예시 ```toml # ~/.config/starship.toml @@ -3611,7 +3743,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | --------------- | ---------------------------- | ------------------------------------------------------------------- | | `threshold` | `2` | Display threshold. | | `format` | `'[$symbol$shlvl]($style) '` | The format for the module. | -| `symbol` | `'↕️ '` | The symbol used to represent the `SHLVL`. | +| `기호` | `'↕️ '` | The symbol used to represent the `SHLVL`. | | `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. | | `repeat_offset` | `0` | Decrements number of times `symbol` is repeated by the offset value | | `style` | `'bold yellow'` | The style for the module. | @@ -3619,15 +3751,15 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int ### Variables -| Variable | Example | Description | -| --------- | ------- | ------------------------------------ | -| shlvl | `3` | The current value of `SHLVL` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | 예시 | Description | +| --------- | --- | ------------------------------------ | +| shlvl | `3` | The current value of `SHLVL` | +| 기호 | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3661,21 +3793,21 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | Option | Default | Description | | ---------- | -------------------------------- | ------------------------------------------------ | | `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. | -| `symbol` | `''` | A format string displayed before the image name. | +| `기호` | `''` | A format string displayed before the image name. | | `style` | `'bold dimmed blue'` | The style for the module. | | `disabled` | `false` | Disables the `singularity` module. | ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | ------------ | ------------------------------------ | | env | `centos.img` | The current Singularity image | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3694,27 +3826,27 @@ The `solidity` module shows the currently installed version of [Solidity](https: | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `기호` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables this module. | ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------- | ------------------------------------ | | version | `v0.8.1` | The version of `solidity` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3731,22 +3863,22 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | Option | Default | Description | | ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0` means no truncation. Also see the [`directory`](#directory) module. | -| `symbol` | `'🅢 '` | The symbol used before the environment name. | +| `기호` | `'🅢 '` | The symbol used before the environment name. | | `style` | `'bold blue'` | The style for the module. | | `format` | `'via [$symbol$environment]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `spack` module. | ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | ----------- | ------------ | ------------------------------------ | | environment | `astronauts` | The current spack environment | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3770,7 +3902,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | | `format` | `'[$symbol$status]($style) '` | The format of the module | -| `symbol` | `'❌'` | The symbol displayed on program error | +| `기호` | `'❌'` | The symbol displayed on program error | | `success_symbol` | `''` | The symbol displayed on program success | | `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable | | `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found | @@ -3787,7 +3919,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | -------------- | ------- | ------------------------------------------------------------------------------------------ | | status | `127` | The exit code of the last command | | hex_status | `0x7F` | The exit code of the last command in hex | @@ -3797,12 +3929,12 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | | maybe_int | `7` | Contains the exit code number when no meaning has been found | | pipestatus | | Rendering of in pipeline programs' exit codes, this is only available in pipestatus_format | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3831,21 +3963,21 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | --------------- | ------------------------ | ------------------------------------------------------- | | `format` | `'[as $symbol]($style)'` | The format of the module | -| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | +| `기호` | `'🧙 '` | The symbol displayed when credentials are cached | | `style` | `'bold blue'` | The style for the module. | | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | ### Variables -| Variable | Example | Description | -| --------- | ------- | ------------------------------------ | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | 예시 | Description | +| --------- | -- | ------------------------------------ | +| 기호 | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3878,7 +4010,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'🐦 '` | A format string representing the symbol of Swift | +| `기호` | `'🐦 '` | A format string representing the symbol of Swift | | `detect_extensions` | `['swift']` | Which extensions should trigger this module. | | `detect_files` | `['Package.swift']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -3887,15 +4019,15 @@ By default the `swift` module shows the currently installed version of [Swift](h ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------- | ------------------------------------ | | version | `v5.2.4` | The version of `swift` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -3910,7 +4042,7 @@ The `terraform` module shows the currently selected [Terraform workspace](https: ::: tip -By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). +By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. 그래도 활성화하려면, [아래에 있는 예시를 따라 하세요](#with-terraform-version). ::: @@ -3925,7 +4057,7 @@ By default the module will be shown if any of the following conditions are met: | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `'via [$symbol$workspace]($style) '` | The format string for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'💠'` | A format string shown before the terraform workspace. | +| `기호` | `'💠'` | A format string shown before the terraform workspace. | | `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `['.terraform']` | Which folders should trigger this module. | @@ -3934,16 +4066,16 @@ By default the module will be shown if any of the following conditions are met: ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | ---------- | ------------------------------------ | | version | `v0.12.24` | The version of `terraform` | | workspace | `default` | The current Terraform workspace | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 #### With Terraform Version @@ -3989,14 +4121,14 @@ If `use_12hr` is `true`, then `time_format` defaults to `'%r'`. Otherwise, it de ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | ---------- | ----------------------------------- | | time | `13:08:10` | The current time. | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -4009,6 +4141,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +By default, the module will be shown if any of the following conditions are met: + +- The current directory contains a `template.typ` file +- The current directory contains any `*.typ` file + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `기호` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | The style for the module. | +| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. | +| `detect_files` | `['template.typ']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `disabled` | `false` | Disables the `daml` module. | + +### Variables + +| Variable | 예시 | Description | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| 기호 | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + ## Username The `username` module shows active user's username. The module will be shown if any of the following conditions are met: @@ -4036,12 +4201,12 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | -------- | ------------ | ------------------------------------------------------------------------------------------- | | `style` | `'red bold'` | Mirrors the value of option `style_root` when root is logged in and `style_user` otherwise. | | `user` | `'matchai'` | The currently logged-in user ID. | -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -4066,7 +4231,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. | +| `기호` | `'⍱ '` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `['Vagrantfile']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -4075,15 +4240,15 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | ---------------- | ------------------------------------ | | version | `Vagrant 2.2.10` | The version of `Vagrant` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -4105,7 +4270,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'V '` | A format string representing the symbol of V | +| `기호` | `'V '` | A format string representing the symbol of V | | `detect_extensions` | `['v']` | Which extensions should trigger this module. | | `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | @@ -4114,13 +4279,13 @@ The `vlang` module shows you your currently installed version of [V](https://vla ### Variables -| Variable | Example | Description | -| --------- | ------- | ------------------------------------ | -| version | `v0.2` | The version of `v` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | 예시 | Description | +| --------- | ------ | ------------------------------------ | +| version | `v0.2` | The version of `v` | +| 기호 | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -4136,22 +4301,22 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | Option | Default | Description | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | `''` | The symbol used before displaying the repository name. | +| `기호` | `''` | The symbol used before displaying the repository name. | | `style` | `'bold yellow'` | The style for the module. | | `format` | `'vcsh [$symbol$repo]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `vcsh` module. | ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | ------------------------------------------- | ------------------------------------ | | repo | `dotfiles` if in a VCSH repo named dotfiles | The active repository name | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | `black bold dimmed` | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -4172,7 +4337,7 @@ By default the `zig` module shows the currently installed version of [Zig](https | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `기호` | `'↯ '` | The symbol used before displaying the version of Zig. | | `style` | `'bold yellow'` | The style for the module. | | `disabled` | `false` | Disables the `zig` module. | | `detect_extensions` | `['zig']` | Which extensions should trigger this module. | @@ -4181,15 +4346,15 @@ By default the `zig` module shows the currently installed version of [Zig](https ### Variables -| Variable | Example | Description | +| Variable | 예시 | Description | | --------- | -------- | ------------------------------------ | | version | `v0.6.0` | The version of `zig` | -| symbol | | Mirrors the value of option `symbol` | +| 기호 | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string -### Example +### 예시 ```toml # ~/.config/starship.toml @@ -4248,7 +4413,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | `detect_files` | `[]` | The files that will be searched in the working directory for a match. | | `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. | | `detect_extensions` | `[]` | The extensions that will be searched in the working directory for a match. | -| `symbol` | `''` | The symbol used before displaying the command output. | +| `기호` | `''` | The symbol used before displaying the command output. | | `style` | `'bold green'` | The style for the module. | | `format` | `'[$symbol($output )]($style)'` | The format for the module. | | `disabled` | `false` | Disables this `custom` module. | @@ -4261,7 +4426,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | Variable | Description | | --------- | -------------------------------------- | | output | The output of shell command in `shell` | -| symbol | Mirrors the value of option `symbol` | +| 기호 | Mirrors the value of option `symbol` | | style\* | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -4295,7 +4460,7 @@ Automatic detection of shells and proper parameters addition are currently imple ::: -### Example +### 예시 ```toml # ~/.config/starship.toml diff --git a/docs/ko-KR/faq/README.md b/docs/ko-KR/faq/README.md index 41bb2d391..0e7a3de84 100644 --- a/docs/ko-KR/faq/README.md +++ b/docs/ko-KR/faq/README.md @@ -1,14 +1,14 @@ -# Frequently Asked Questions +# 자주 묻는 질문 -## What is the configuration used in the demo GIF? +## 데모 GIF에는 어떤 구성을 사용했나요? -- **Terminal Emulator**: [iTerm2](https://iterm2.com/) - - **Theme**: Minimal - - **Color Scheme**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy) - - **Font**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads) -- **Shell**: [Fish Shell](https://fishshell.com/) - - **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish) - - **Prompt**: [Starship](https://starship.rs/) +- **터미널 에뮬레이터**: [iTerm2](https://iterm2.com/) + - **테마**: Minimal + - **배색**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy) + - **폰트**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads) +- **셸**: [Fish Shell](https://fishshell.com/) + - **구성**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish) + - **프롬프트**: [Starship](https://starship.rs/) ## How do I get command completion as shown in the demo GIF? @@ -40,7 +40,7 @@ PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)" The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations. -For a list of all flags accepted by `starship prompt`, use the following command: +`starship 프롬프트`에서 지원하는 모든 플래그 값을 보려면 아래 명령어를 사용하세요: ```sh starship prompt --help @@ -48,19 +48,19 @@ starship prompt --help The prompt will use as much context as is provided, but no flags are "required". -## How do I run Starship on Linux distributions with older versions of glibc? +## 오래된 버전의 glibc가 있는 Linux 배포판에서 Starship을 어떻게 실행하나요? -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`: +미리 빌드된 바이너리를 실행할 때 (예를 들어 CentOS 6 혹은 7에서) "_version 'GLIBC_2.18' not found (required by starship)_" 같은 오류가 보인다면, `glibc` 대신 `musl`로 컴파일된 바이너리 파일을 사용하세요. ```sh curl -sS https://starship.rs/install.sh | sh -s -- --platform unknown-linux-musl ``` -## Why do I see `Executing command "..." timed out.` warnings? +## 왜 `Executing command "..." timed out.` 경고가 뜨나요? 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? +## 이해할 수 없거나 예상치 못한 기호가 보이는데 무슨 뜻인가요? If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. @@ -105,18 +105,26 @@ The first line should produce a [snake emoji](https://emojipedia.org/snake/), wh If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose) -## How do I uninstall Starship? +## Starship을 어떻게 삭제하나요? -Starship is just as easy to uninstall as it is to install in the first place. +Starship은 처음 설치하는 것만큼이나 쉽게 제거할 수 있습니다. -1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship. -1. Delete the Starship binary. +1. 셸 설정 파일 (예시: `~/.bashrc`) 에서 Starship 초기화에 사용되는 모든 줄을 제거하세요. +1. Starship 바이너리 파일을 제거하세요. -If Starship was installed using a package manager, please refer to their docs for uninstallation instructions. +Starship을 패키지 매니저로 설치하였다면 해당 패키지 매니저의 제거 지침 문서를 참조해 주세요. -If Starship was installed using the install script, the following command will delete the binary: +Starship을 설치 스크립트로 설치하였다면 바이너리 파일 제거를 위해 아래 명령어를 실행하세요: ```sh -# Locate and delete the starship binary +# starship 바이너리 파일을 찾고 제거합니다. sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/ko-KR/guide/README.md b/docs/ko-KR/guide/README.md index 4fa27edd9..374f9117d 100644 --- a/docs/ko-KR/guide/README.md +++ b/docs/ko-KR/guide/README.md @@ -2,7 +2,7 @@ Starship – Cross-shell prompt

@@ -30,7 +30,12 @@ 트위터에서 @StarshipPrompt를 팔로우 하세요 + Stand With Ukraine

@@ -147,25 +152,23 @@ />

-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

Starship with iTerm2 and the Snazzy theme -**간결하고 화끈하게 빠르며 무제한으로 커스터마이징이 가능한 프롬프트. 어떤 쉘에서든 사용할 수 있습니다!** +**아무 셸에나 적용할 수 있는 간결하고, 매우 빠르며, 무한히 커스텀 가능한 프롬프트입니다!** -- ** Fast:** 빨라요 – _엄청 엄청_ 빠릅니다! 🚀 -- ** Customizable:** 프롬프트의 모든 측면을 커스텀 가능합니다. -- **Universal:** 어떤 쉘 위에서도, 어떤 운영체제 위에서도 동작합니다. -- **Intelligent:** 관련 정보를 한눈에 보여줍니다. -- **Feature rich:** 원하는 모든 도구를 지원합니다. -- **Easy:** 빠른 설치 - 몇 분 안에 사용할 수 있습니다. +- ** 빠름:** 빠릅니다. – _정말_ 빠릅니다. 🚀 +- ** 커스텀 가능:** 프롬프트의 모든 부분을 커스텀 할 수 있습니다. +- **범용적:** 어떤 셸 위에서도, 어떤 운영체제 위에서도 동작합니다. +- **지능적:** 관련 정보를 한눈에 보여줍니다. +- **다기능:** 원하는 모든 도구를 지원합니다. +- **쉬움:** 빠른 설치 - 몇 분만 투자하면 바로 사용할 수 있습니다.

Starship 문서 보기  ▶ @@ -188,7 +191,7 @@ 다음 패키지 관리자 중 하나를 사용해 Starship 을 설치하세요: -| Repository | Instructions | +| 리포지토리 | 설명 | | --------------------------------------------------------------------------------- | ---------------------- | | [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | @@ -199,11 +202,11 @@ 다음 패키지 관리자 중 하나를 사용해 Starship 을 설치하세요: -| Distribution | Repository | Instructions | -| ------------ | -------------------------------------------------------- | --------------------------------- | -| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | -| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | -| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | +| 배포판 | 리포지토리 | 설명 | +| -------- | -------------------------------------------------------- | --------------------------------- | +| **_전체_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |

@@ -218,18 +221,19 @@ curl -sS https://starship.rs/install.sh | sh 다음의 패키지 관리자를 사용해서 Starship을 설치할 수도 있습니다. -| Distribution | Repository | Instructions | -| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | -| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | -| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | -| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | -| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | -| Arch Linux | [Arch Linux Extra](https://archlinux.org/packages/extra/x86_64/starship) | `pacman -S starship` | -| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | -| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | -| Manjaro | | `pacman -S starship` | -| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | -| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` | +| 배포판 | 리포지토리 | 설명 | +| ------------------ | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| **_전체_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _전체_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _전체_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| Alpine Linux 3.13+ | [Alpine Linux 패키지](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | +| Arch Linux | [Arch Linux Extra](https://archlinux.org/packages/extra/x86_64/starship) | `pacman -S starship` | +| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | +| Gentoo | [Gentoo 패키지](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | +| Manjaro | | `pacman -S starship` | +| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| openSUSE | [OSS](https://software.opensuse.org/package/starship) | `zypper in starship` | +| Void Linux | [Void Linux 패키지](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
@@ -244,7 +248,7 @@ curl -sS https://starship.rs/install.sh | sh 다음의 패키지 관리자를 사용해서 Starship을 설치할 수도 있습니다. -| Repository | Instructions | +| 리포지토리 | 설명 | | -------------------------------------------------------- | --------------------------------------- | | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | @@ -256,11 +260,11 @@ curl -sS https://starship.rs/install.sh | sh
Windows -Install the latest version for your system with the MSI-installers from the [releases section](https://github.com/starship/starship/releases/latest). +[releases 섹션](https://github.com/starship/starship/releases/latest)에서 MSI 인스톨러를 받아 실행하여 시스템에 맞는 최신 버전을 설치하세요. 다음 패키지 관리자 중 하나를 사용해 Starship 을 설치하세요: -| Repository | Instructions | +| 리포지토리 | 설명 | | -------------------------------------------------------------------------------------------- | --------------------------------------- | | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | | [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | @@ -270,9 +274,9 @@ Install the latest version for your system with the MSI-installers from the [rel
-### 2단계. Set up your shell to use Starship +### 2단계. 셸에 Starship 적용하기 -쉘에 Starship 초기 설정을 합니다. 아래의 리스트 중에 해당하는 것을 고르세요: +Starship 적용을 위해 셸을 구성해야 합니다. 아래의 리스트 중에 해당하는 것을 고르세요:
Bash @@ -288,7 +292,7 @@ eval "$(starship init bash)"
Cmd -Cmd를 이용하려면 [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) 를 사용해야 합니다. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: +Cmd를 이용하려면 [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) 를 사용해야 합니다. `%LocalAppData%\clink\starship.lua` 경로에 파일을 만들고 아래 내용으로 채우세요: ```lua load(io.popen('starship init cmd'):read("*a"))() @@ -305,7 +309,7 @@ load(io.popen('starship init cmd'):read("*a"))() eval (starship init elvish) ``` -Note: Only Elvish v0.18+ is supported +알림: Elvish v0.18 버전 이상에서만 지원됩니다.
@@ -334,20 +338,20 @@ eval $(starship init ion)
Nushell -Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell): +다음 내용을 Nushell env 파일 (찾으려면 Nushell에서 `$nu.env-path` 실행) 마지막 부분에 추가하세요: ```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`): +다음 내용을 Nushell 설정 파일 (찾으려면 Nushell에서 `$nu.config-path` 실행) 마지막 부분에 추가하세요: ```sh use ~/.cache/starship/init.nu ``` -Note: Only Nushell v0.78+ is supported +알림: Nushell v0.78 버전 이상에서만 지원됩니다.
@@ -409,25 +413,25 @@ Starship을 추가로 커스터마이징 하고싶다면: 우리는 언제나 **기술 수준에 관계없이** 기여자를 찾고 있습니다! 프로젝트에 참여하고자 한다면, [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue) 를 보내보세요. -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. 번역에 도움을 주고자 한다면, [Starship Crowdin](https://translate.starship.rs/) 에서 기여할 수 있습니다. +영어 이외의 언어에 유창하시다면, 저희 문서를 다른 언어로 최신화하는 데 도움을 주시면 대단히 감사하겠습니다. 번역에 도움을 주고자 한다면, [Starship Crowdin](https://translate.starship.rs/) 에서 기여할 수 있습니다. -Starship 에 기여하는데 관심이 있다면, [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) 를 한 번 살펴봐 주세요 그리고 부담갖지 말고 [Discord 서버](https://discord.gg/8Jzqu3T) 에 들러 인사 한 마디 남겨보세요 👋 +Starship에 기여하는데 관심이 있으시다면, [기여 가이드](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)를 읽어주세요. 그리고 부담갖지 말고 [Discord 서버](https://discord.gg/8Jzqu3T) 에 들러 인사 한 마디 남겨보세요 👋 -## 💭 Inspired By +## 💭 영감받은 곳 Starship 을 만드는 데에 영감이 되었던 이전 작업들도 살펴보세요. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – 우주 비행사를 위한 ZSH 프롬프트. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – JavaScript로 작성된 크로스-쉘 robbyrussell 테마. -- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. +- **[reujab/silver](https://github.com/reujab/silver)** – 아이콘이 있는 커스텀 가능한 powerline 계열 크로스-쉘 프롬프트. -## ❤️ Sponsors +## ❤️ 스폰서 -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. +이 [프로젝트를 후원](https://github.com/sponsors/starship)하여 프로젝트를 지원해 주세요. 여러분의 웹사이트로 이동하는 링크가 걸린 이름 혹은 로고가 여기에 걸립니다. -**Supporter Tier** +**후원자 티어** - [Appwrite](https://appwrite.io/) @@ -438,4 +442,4 @@ Support this project by [becoming a sponsor](https://github.com/sponsors/starshi ## 📝라이선스 -Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed. +Copyright © 2019-현재, [Starship 기여자](https://github.com/starship/starship/graphs/contributors).
이 프로젝트는 [ISC](https://github.com/starship/starship/blob/master/LICENSE) 라이선스입니다. diff --git a/docs/ko-KR/installing/README.md b/docs/ko-KR/installing/README.md index bf2e01baf..e25fffbd9 100644 --- a/docs/ko-KR/installing/README.md +++ b/docs/ko-KR/installing/README.md @@ -63,7 +63,7 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett { programs.starship = { enable = true; - # Configuration written to ~/.config/starship.toml + # ~/.config/starship.toml에 작성된 설정 settings = { # add_newline = false; diff --git a/docs/ko-KR/migrating-to-0.45.0/README.md b/docs/ko-KR/migrating-to-0.45.0/README.md index 18661c3ba..3886acc55 100644 --- a/docs/ko-KR/migrating-to-0.45.0/README.md +++ b/docs/ko-KR/migrating-to-0.45.0/README.md @@ -80,7 +80,7 @@ format = "took [$duration]($style) " | Removed Property | Replacement | | ----------------------- | ---------------- | -| `symbol` | `success_symbol` | +| `기호` | `success_symbol` | | `use_symbol_for_status` | `error_symbol` | | `style_success` | `success_symbol` | | `style_failure` | `error_symbol` | diff --git a/docs/ko-KR/presets/README.md b/docs/ko-KR/presets/README.md index 3903bc17a..7d41e37cb 100644 --- a/docs/ko-KR/presets/README.md +++ b/docs/ko-KR/presets/README.md @@ -1,14 +1,14 @@ -# Presets +# 프리셋 -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! 😊 +커뮤니티가 제공한 Starship 설정 프리셋의 모음집입니다. 공유할 프리셋이 있다면 이 파일을 [수정하는 PR을 제출](https://github.com/starship/starship/edit/master/docs/presets/README.md)해 주세요! 😊 -To get details on how to use a preset, simply click on the image. +프리셋 사용 방법에 대한 자세한 내용을 보려면 이미지를 클릭하기만 하면 됩니다. -## [Nerd Font Symbols](./nerd-font.md) +## [Nerd Font 기호](./nerd-font.md) -This preset changes the symbols for each module to use Nerd Font symbols. +이 프리셋은 각 모듈의 기호가 Nerd Font 기호를 사용하도록 변경합니다. -[![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) +[![Nerd Font 기호 프리셋 스크린샷](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) ## [No Nerd Fonts](./no-nerd-font.md) @@ -16,11 +16,11 @@ This preset changes the symbols for several modules so that no Nerd Font symbols ::: tip -This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). +이 프리셋은 [starship의 추후 배포](https://github.com/starship/starship/pull/3544)에서 기본 프리셋이 될 예정입니다. ::: -[Click to view No Nerd Font preset](./no-nerd-font) +[클릭하여 No Nerd Font 프리셋 보기](./no-nerd-font) ## [Bracketed Segments](./bracketed-segments.md) @@ -40,17 +40,17 @@ This preset hides the version of language runtimes. If you work in containers or [![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes) -## [No Empty Icons](./no-empty-icons.md) +## [빈 아이콘 제거](./no-empty-icons.md) -This preset does not show icons if the toolset is not found. +이 프리셋은 툴셋을 찾을 수 없을 때 아이콘을 표시하지 않습니다. [![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md) ## [Pure Prompt](./pure-preset.md) -This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). +이 프리셋은 [Pure](https://github.com/sindresorhus/pure)의 모습과 동작을 재현합니다. -[![Screenshot of Pure preset](/presets/img/pure-preset.png "Click to view Pure Prompt preset")](./pure-preset) +[![Pure 프리셋 스크린샷](/presets/img/pure-preset.png "Click to view Pure Prompt preset")](./pure-preset) ## [Pastel Powerline](./pastel-powerline.md) @@ -60,6 +60,12 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m ## [Tokyo Night](./tokyo-night.md) -This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). +이 프리셋은 [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme)에서 영감을 받았습니다. -[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) +[![Tokyo Night 프리셋 스크린샷](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +이 프리셋은 [Pastel Powerline](./pastel-powerline.md) 및 [Tokyo Night](./tokyo-night.md)에서 강하게 영감을 받았습니다. + +[![Gruvbox Rainbow 프리셋 스크린샷](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) diff --git a/docs/ko-KR/presets/bracketed-segments.md b/docs/ko-KR/presets/bracketed-segments.md index 982afb20e..8d6430df2 100644 --- a/docs/ko-KR/presets/bracketed-segments.md +++ b/docs/ko-KR/presets/bracketed-segments.md @@ -1,4 +1,4 @@ -[Return to Presets](./README.md#bracketed-segments) +[프리셋으로 돌아가기](./README.md#bracketed-segments) # Bracketed Segments Preset @@ -6,12 +6,12 @@ This preset changes the format of all the built-in modules to show their segment ![Screenshot of Bracketed Segments preset](/presets/img/bracketed-segments.png) -### Configuration +### 설정 ```sh starship preset bracketed-segments -o ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/bracketed-segments.toml) +[클릭하여 TOML 다운로드](/presets/toml/bracketed-segments.toml) <<< @/.vuepress/public/presets/toml/bracketed-segments.toml diff --git a/docs/ko-KR/presets/gruvbox-rainbow.md b/docs/ko-KR/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..e7b246a17 --- /dev/null +++ b/docs/ko-KR/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[프리셋으로 돌아가기](./README.md#gruvbox-rainbow) + +# Gruvbox Rainbow 프리셋 + +이 프리셋은 [Pastel Powerline](./pastel-powerline.md) 및 [Tokyo Night](./tokyo-night.md)에서 강하게 영감을 받았습니다. + +![Gruvbox Rainbow 프리셋 스크린샷](/presets/img/gruvbox-rainbow.png) + +### 준비 사항 + +- 터미널에 [Nerd Font](https://www.nerdfonts.com/) 설치 및 활성화 + +### 설정 + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[클릭하여 TOML 다운로드](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/ko-KR/presets/jetpack.md b/docs/ko-KR/presets/jetpack.md new file mode 100644 index 000000000..ada3e0952 --- /dev/null +++ b/docs/ko-KR/presets/jetpack.md @@ -0,0 +1,24 @@ +[프리셋으로 돌아가기](./README.md#jetpack) + +# Jetpack Preset + +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 uses the terminal's color theme. + +![Screenshot of Jetpack preset](/presets/img/jetpack.png) + +### Prerequisite + +- 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. + +### 설정 + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[클릭하여 TOML 다운로드](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/ko-KR/presets/nerd-font.md b/docs/ko-KR/presets/nerd-font.md index 6df403281..f4c6c6ea1 100644 --- a/docs/ko-KR/presets/nerd-font.md +++ b/docs/ko-KR/presets/nerd-font.md @@ -1,21 +1,21 @@ -[Return to Presets](./README.md#nerd-font-symbols) +[프리셋으로 돌아가기](./README.md#nerd-font-symbols) -# Nerd Font Symbols Preset +# Nerd Font 기호 프리셋 -This preset changes the symbols for each module to use Nerd Font symbols. +이 프리셋은 각 모듈의 기호가 Nerd Font 기호를 사용하도록 변경합니다. -![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png) +![Nerd Font 기호 프리셋 스크린샷](/presets/img/nerd-font-symbols.png) -### 준비 사항 +### 필요 사항 -- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font) +- 터미널에 [Nerd Font](https://www.nerdfonts.com/) 설치 및 활성화 (예시에서는 Fira Code Nerd Font를 사용합니다.) -### Configuration +### 설정 ```sh starship preset nerd-font-symbols -o ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/nerd-font-symbols.toml) +[클릭하여 TOML 다운로드](/presets/toml/nerd-font-symbols.toml) <<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml diff --git a/docs/ko-KR/presets/no-empty-icons.md b/docs/ko-KR/presets/no-empty-icons.md index aa4a211fd..c3f429735 100644 --- a/docs/ko-KR/presets/no-empty-icons.md +++ b/docs/ko-KR/presets/no-empty-icons.md @@ -1,4 +1,4 @@ -[Return to Presets](./README.md#no-empty-icons) +[프리셋으로 돌아가기](./README.md#no-empty-icons) # No Empty Icons Preset @@ -6,12 +6,12 @@ If toolset files are identified the toolset icon is displayed. If the toolset is ![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) -### Configuration +### 설정 ```sh starship preset no-empty-icons -o ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/no-empty-icons.toml) +[클릭하여 TOML 다운로드](/presets/toml/no-empty-icons.toml) <<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/ko-KR/presets/no-nerd-font.md b/docs/ko-KR/presets/no-nerd-font.md index a70e85e76..6f73477e4 100644 --- a/docs/ko-KR/presets/no-nerd-font.md +++ b/docs/ko-KR/presets/no-nerd-font.md @@ -1,4 +1,4 @@ -[Return to Presets](./README.md#no-nerd-fonts) +[프리셋으로 돌아가기](./README.md#no-nerd-fonts) # No Nerd Fonts Preset @@ -8,12 +8,12 @@ This means that even without a Nerd Font installed, you should be able to view a This preset will become the default preset in a future release of starship. -### Configuration +### 설정 ```sh starship preset no-nerd-font -o ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/no-nerd-font.toml) +[클릭하여 TOML 다운로드](/presets/toml/no-nerd-font.toml) <<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/ko-KR/presets/no-runtimes.md b/docs/ko-KR/presets/no-runtimes.md index c0805d111..767a45f04 100644 --- a/docs/ko-KR/presets/no-runtimes.md +++ b/docs/ko-KR/presets/no-runtimes.md @@ -1,4 +1,4 @@ -[Return to Presets](./README.md#no-runtime-versions) +[프리셋으로 돌아가기](./README.md#no-runtime-versions) # No Runtime Versions Preset @@ -6,12 +6,12 @@ This preset hides the version of language runtimes. If you work in containers or ![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png) -### Configuration +### 설정 ```sh starship preset no-runtime-versions -o ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/no-runtime-versions.toml) +[클릭하여 TOML 다운로드](/presets/toml/no-runtime-versions.toml) <<< @/.vuepress/public/presets/toml/no-runtime-versions.toml diff --git a/docs/ko-KR/presets/pastel-powerline.md b/docs/ko-KR/presets/pastel-powerline.md index 38f7438d3..477afea29 100644 --- a/docs/ko-KR/presets/pastel-powerline.md +++ b/docs/ko-KR/presets/pastel-powerline.md @@ -1,4 +1,4 @@ -[Return to Presets](./README.md#pastel-powerline) +[프리셋으로 돌아가기](./README.md#pastel-powerline) # Pastel Powerline Preset @@ -10,12 +10,12 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m - A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Caskaydia Cove Nerd Font) -### Configuration +### 설정 ```sh starship preset pastel-powerline -o ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/pastel-powerline.toml) +[클릭하여 TOML 다운로드](/presets/toml/pastel-powerline.toml) <<< @/.vuepress/public/presets/toml/pastel-powerline.toml diff --git a/docs/ko-KR/presets/plain-text.md b/docs/ko-KR/presets/plain-text.md index 1e17b4bc0..e2d1087f3 100644 --- a/docs/ko-KR/presets/plain-text.md +++ b/docs/ko-KR/presets/plain-text.md @@ -1,4 +1,4 @@ -[Return to Presets](./README.md#plain-text-symbols) +[프리셋으로 돌아가기](./README.md#plain-text-symbols) ## Plain Text Symbols Preset @@ -6,12 +6,12 @@ This preset changes the symbols for each module into plain text. Great if you do ![Screenshot of Plain Text Symbols preset](/presets/img/plain-text-symbols.png) -### Configuration +### 설정 ```sh starship preset plain-text-symbols -o ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/plain-text-symbols.toml) +[클릭하여 TOML 다운로드](/presets/toml/plain-text-symbols.toml) <<< @/.vuepress/public/presets/toml/plain-text-symbols.toml diff --git a/docs/ko-KR/presets/pure-preset.md b/docs/ko-KR/presets/pure-preset.md index b75a00565..fec4b5720 100644 --- a/docs/ko-KR/presets/pure-preset.md +++ b/docs/ko-KR/presets/pure-preset.md @@ -1,17 +1,17 @@ -[Return to Presets](./README.md#pure) +[프리셋으로 돌아가기](./README.md#pure) -# Pure Preset +# Pure 프리셋 -This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). +이 프리셋은 [Pure](https://github.com/sindresorhus/pure)의 모습과 동작을 재현합니다. -![Screenshot of Pure preset](/presets/img/pure-preset.png) +![Pure 프리셋 스크린샷](/presets/img/pure-preset.png) -### Configuration +### 설정 ```sh starship preset pure-preset -o ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/pure-preset.toml) +[클릭하여 TOML 다운로드](/presets/toml/pure-preset.toml) <<< @/.vuepress/public/presets/toml/pure-preset.toml diff --git a/docs/ko-KR/presets/tokyo-night.md b/docs/ko-KR/presets/tokyo-night.md index 387025987..fb3a3a3a5 100644 --- a/docs/ko-KR/presets/tokyo-night.md +++ b/docs/ko-KR/presets/tokyo-night.md @@ -1,21 +1,21 @@ -[Return to Presets](./README.md#pastel-powerline) +[프리셋으로 돌아가기](./README.md#pastel-powerline) -# Tokyo Night Preset +# Tokyo Night 프리셋 -This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). +이 프리셋은 [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme)에서 영감을 받았습니다. -![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) +![Tokyo Night 프리셋 스크린샷](/presets/img/tokyo-night.png) ### 준비 사항 -- 터미널에 [Nerd Font](https://www.nerdfonts.com/)가 설치되어 있고 사용 가능해야 합니다 +- 터미널에 [Nerd Font](https://www.nerdfonts.com/) 설치 및 활성화 -### Configuration +### 설정 ```sh starship preset tokyo-night -o ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/tokyo-night.toml) +[클릭하여 TOML 다운로드](/presets/toml/tokyo-night.toml) <<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/nl-NL/config/README.md b/docs/nl-NL/config/README.md index 396fbb2c9..dccdabf20 100644 --- a/docs/nl-NL/config/README.md +++ b/docs/nl-NL/config/README.md @@ -206,6 +206,13 @@ This is the list of prompt-wide configuration options. | `add_newline` | `true` | Inserts blank line between shell prompts. | | `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: ### Example @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### Options | Option | Default | Description | @@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. | | `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | | `style` | `'bold yellow'` | The style for the module. | -| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | +| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu ### Options -| Option | Default | Description | -| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'C '` | The symbol used before displaying the compiler details | -| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | -| `style` | `'bold 149'` | The style for the module. | -| `disabled` | `false` | Disables the `c` module. | +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | +| `style` | `'bold 149'` | The style for the module. | +| `disabled` | `false` | Disables the `c` module. | ### Variables @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | The style for the module. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['.envrc']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbol | | Mirrors the value of option `symbol`. | +| style\* | `red bold` | Mirrors the value of option `style`. | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Docker Context The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). @@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `style` | `'bold green'` | The style for the module. | -| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. | +| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | | `disabled` | `false` | Disables the `fennel` module. | @@ -1524,11 +1577,46 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------------ | ------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | +| `added_style` | `'bold green'` | The style for the added count. | +| `deleted_style` | `'bold red'` | The style for the deleted count. | +| `only_nonzero_diffs` | `true` | Render status only for changed items. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### Variables + +| Variable | Example | Description | +| ----------------- | ------- | ------------------------------------------- | +| added | `1` | The current number of added lines | +| deleted | `2` | The current number of deleted lines | +| added_style\* | | Mirrors the value of option `added_style` | +| deleted_style\* | | Mirrors the value of option `deleted_style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. -When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set. +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. ### Options @@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | Option | Default | Description | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol]($style) '` | The format for the module. | -| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `style` | `"yellow bold"` | The style for the module. | +| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | The style for the module. | | `disabled` | `false` | Disables the `guix_shell` module. | ### Variables @@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `["gradle"]` | Which folders should trigger this module. | -| `style` | `"bold bright-cyan"` | The style for the module. | +| `detect_folders` | `['gradle']` | Which folders should trigger this module. | +| `style` | `'bold bright-cyan'` | The style for the module. | | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | Option | Default | Description | | ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. | -| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. | -| `style` | `"bold fg:202"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. | +| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. | +| `style` | `'bold fg:202'` | The style for the module. | | `disabled` | `false` | Disables the `haxe` module. | ### Variables @@ -2107,14 +2195,15 @@ The `hostname` module shows the system hostname. ### Options -| Option | Default | Description | -| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | -| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | -| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation | -| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | -| `style` | `'bold dimmed green'` | The style for the module. | -| `disabled` | `false` | Disables the `hostname` module. | +| Option | Default | Description | +| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | +| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | +| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation. | +| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | +| `style` | `'bold dimmed green'` | The style for the module. | +| `disabled` | `false` | Disables the `hostname` module. | ### Variables @@ -2126,7 +2215,9 @@ The `hostname` module shows the system hostname. *: This variable can only be used as a part of a style string -### Example +### Examples + +#### Always show the hostname ```toml # ~/.config/starship.toml @@ -2138,6 +2229,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Hide the hostname in remote tmux sessions + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met: @@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc' ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. ::: tip @@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten ### Options +::: warning + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + | Option | Default | Description | | ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | | `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | | `style` | `'cyan bold'` | The style for the module. | -| `context_aliases` | `{}` | Table of context aliases to display. | -| `user_aliases` | `{}` | Table of user aliases to display. | +| `context_aliases`* | `{}` | Table of context aliases to display. | +| `user_aliases`* | `{}` | Table of user aliases to display. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | +| `contexts` | `[]` | Customized styles and symbols for specific contexts. | | `disabled` | `true` | Disables the `kubernetes` module. | +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| Variable | Description | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `style` | The style for the module when using this context. If not set, will use module's style. | +| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + ### Variables | Variable | Example | Description | @@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Regex Matching +#### Kubernetes Context specific config -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. - -Long and automatically generated cluster names can be identified and shortened using regular expressions: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Line Break @@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_folders` | `['node_modules']` | Which folders should trigger this module. | | `style` | `'bold green'` | The style for the module. | | `disabled` | `false` | Disables the `nodejs` module. | -| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | +| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables @@ -2890,8 +3021,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | The format for the module. | -| `style` | `"bold white"` | The style for the module. | +| `format` | `'[$symbol]($style)'` | The format for the module. | +| `style` | `'bold white'` | The style for the module. | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met: | `symbol` | `'🐍 '` | A format string representing the symbol of Python | | `style` | `'yellow bold'` | The style for the module. | | `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `['py']` | Which extensions should trigger this module | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | @@ -3562,22 +3693,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `'bsh'` | A format string used to represent bash. | -| `fish_indicator` | `'fsh'` | A format string used to represent fish. | -| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | -| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | -| `ion_indicator` | `'ion'` | A format string used to represent ion. | -| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | -| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | -| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | -| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | -| `nu_indicator` | `'nu'` | A format string used to represent nu. | -| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | -| `format` | `'[$indicator]($style) '` | The format for the module. | -| `style` | `'white bold'` | The style for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | Default | Description | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | The style for the module. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https: | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables this module. | ### Variables @@ -4009,6 +4141,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +By default, the module will be shown if any of the following conditions are met: + +- The current directory contains a `template.typ` file +- The current directory contains any `*.typ` file + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | The style for the module. | +| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. | +| `detect_files` | `['template.typ']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `disabled` | `false` | Disables the `daml` module. | + +### Variables + +| Variable | Example | Description | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + ## Username The `username` module shows active user's username. The module will be shown if any of the following conditions are met: diff --git a/docs/nl-NL/faq/README.md b/docs/nl-NL/faq/README.md index 41bb2d391..1f8484406 100644 --- a/docs/nl-NL/faq/README.md +++ b/docs/nl-NL/faq/README.md @@ -120,3 +120,11 @@ If Starship was installed using the install script, the following command will d # Locate and delete the starship binary sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/nl-NL/guide/README.md b/docs/nl-NL/guide/README.md index ec9b9d834..c4a18ddb1 100644 --- a/docs/nl-NL/guide/README.md +++ b/docs/nl-NL/guide/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="Volg @StarshipPrompt op Twitter" /> + Stand With Ukraine

@@ -147,8 +152,6 @@ />

-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

diff --git a/docs/nl-NL/presets/README.md b/docs/nl-NL/presets/README.md index 3903bc17a..2e332ad14 100644 --- a/docs/nl-NL/presets/README.md +++ b/docs/nl-NL/presets/README.md @@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). [![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) diff --git a/docs/nl-NL/presets/gruvbox-rainbow.md b/docs/nl-NL/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..8f342a046 --- /dev/null +++ b/docs/nl-NL/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#gruvbox-rainbow) + +# Gruvbox Rainbow Preset + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png) + +### Benodigdheden + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal + +### Configuration + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/nl-NL/presets/jetpack.md b/docs/nl-NL/presets/jetpack.md new file mode 100644 index 000000000..0f52a9a9e --- /dev/null +++ b/docs/nl-NL/presets/jetpack.md @@ -0,0 +1,24 @@ +[Return to Presets](./README.md#jetpack) + +# Jetpack Preset + +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 uses the terminal's color theme. + +![Screenshot of Jetpack preset](/presets/img/jetpack.png) + +### Prerequisite + +- 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. + +### Configuration + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/no-NO/config/README.md b/docs/no-NO/config/README.md index 396fbb2c9..dccdabf20 100644 --- a/docs/no-NO/config/README.md +++ b/docs/no-NO/config/README.md @@ -206,6 +206,13 @@ This is the list of prompt-wide configuration options. | `add_newline` | `true` | Inserts blank line between shell prompts. | | `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: ### Example @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### Options | Option | Default | Description | @@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. | | `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | | `style` | `'bold yellow'` | The style for the module. | -| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | +| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu ### Options -| Option | Default | Description | -| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'C '` | The symbol used before displaying the compiler details | -| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | -| `style` | `'bold 149'` | The style for the module. | -| `disabled` | `false` | Disables the `c` module. | +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | +| `style` | `'bold 149'` | The style for the module. | +| `disabled` | `false` | Disables the `c` module. | ### Variables @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | The style for the module. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['.envrc']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbol | | Mirrors the value of option `symbol`. | +| style\* | `red bold` | Mirrors the value of option `style`. | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Docker Context The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). @@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `style` | `'bold green'` | The style for the module. | -| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. | +| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | | `disabled` | `false` | Disables the `fennel` module. | @@ -1524,11 +1577,46 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------------ | ------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | +| `added_style` | `'bold green'` | The style for the added count. | +| `deleted_style` | `'bold red'` | The style for the deleted count. | +| `only_nonzero_diffs` | `true` | Render status only for changed items. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### Variables + +| Variable | Example | Description | +| ----------------- | ------- | ------------------------------------------- | +| added | `1` | The current number of added lines | +| deleted | `2` | The current number of deleted lines | +| added_style\* | | Mirrors the value of option `added_style` | +| deleted_style\* | | Mirrors the value of option `deleted_style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. -When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set. +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. ### Options @@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | Option | Default | Description | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol]($style) '` | The format for the module. | -| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `style` | `"yellow bold"` | The style for the module. | +| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | The style for the module. | | `disabled` | `false` | Disables the `guix_shell` module. | ### Variables @@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `["gradle"]` | Which folders should trigger this module. | -| `style` | `"bold bright-cyan"` | The style for the module. | +| `detect_folders` | `['gradle']` | Which folders should trigger this module. | +| `style` | `'bold bright-cyan'` | The style for the module. | | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | Option | Default | Description | | ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. | -| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. | -| `style` | `"bold fg:202"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. | +| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. | +| `style` | `'bold fg:202'` | The style for the module. | | `disabled` | `false` | Disables the `haxe` module. | ### Variables @@ -2107,14 +2195,15 @@ The `hostname` module shows the system hostname. ### Options -| Option | Default | Description | -| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | -| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | -| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation | -| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | -| `style` | `'bold dimmed green'` | The style for the module. | -| `disabled` | `false` | Disables the `hostname` module. | +| Option | Default | Description | +| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | +| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | +| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation. | +| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | +| `style` | `'bold dimmed green'` | The style for the module. | +| `disabled` | `false` | Disables the `hostname` module. | ### Variables @@ -2126,7 +2215,9 @@ The `hostname` module shows the system hostname. *: This variable can only be used as a part of a style string -### Example +### Examples + +#### Always show the hostname ```toml # ~/.config/starship.toml @@ -2138,6 +2229,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Hide the hostname in remote tmux sessions + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met: @@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc' ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. ::: tip @@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten ### Options +::: warning + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + | Option | Default | Description | | ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | | `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | | `style` | `'cyan bold'` | The style for the module. | -| `context_aliases` | `{}` | Table of context aliases to display. | -| `user_aliases` | `{}` | Table of user aliases to display. | +| `context_aliases`* | `{}` | Table of context aliases to display. | +| `user_aliases`* | `{}` | Table of user aliases to display. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | +| `contexts` | `[]` | Customized styles and symbols for specific contexts. | | `disabled` | `true` | Disables the `kubernetes` module. | +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| Variable | Description | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `style` | The style for the module when using this context. If not set, will use module's style. | +| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + ### Variables | Variable | Example | Description | @@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Regex Matching +#### Kubernetes Context specific config -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. - -Long and automatically generated cluster names can be identified and shortened using regular expressions: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Line Break @@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_folders` | `['node_modules']` | Which folders should trigger this module. | | `style` | `'bold green'` | The style for the module. | | `disabled` | `false` | Disables the `nodejs` module. | -| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | +| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables @@ -2890,8 +3021,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | The format for the module. | -| `style` | `"bold white"` | The style for the module. | +| `format` | `'[$symbol]($style)'` | The format for the module. | +| `style` | `'bold white'` | The style for the module. | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met: | `symbol` | `'🐍 '` | A format string representing the symbol of Python | | `style` | `'yellow bold'` | The style for the module. | | `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `['py']` | Which extensions should trigger this module | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | @@ -3562,22 +3693,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `'bsh'` | A format string used to represent bash. | -| `fish_indicator` | `'fsh'` | A format string used to represent fish. | -| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | -| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | -| `ion_indicator` | `'ion'` | A format string used to represent ion. | -| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | -| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | -| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | -| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | -| `nu_indicator` | `'nu'` | A format string used to represent nu. | -| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | -| `format` | `'[$indicator]($style) '` | The format for the module. | -| `style` | `'white bold'` | The style for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | Default | Description | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | The style for the module. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https: | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables this module. | ### Variables @@ -4009,6 +4141,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +By default, the module will be shown if any of the following conditions are met: + +- The current directory contains a `template.typ` file +- The current directory contains any `*.typ` file + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | The style for the module. | +| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. | +| `detect_files` | `['template.typ']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `disabled` | `false` | Disables the `daml` module. | + +### Variables + +| Variable | Example | Description | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + ## Username The `username` module shows active user's username. The module will be shown if any of the following conditions are met: diff --git a/docs/no-NO/faq/README.md b/docs/no-NO/faq/README.md index 41bb2d391..1f8484406 100644 --- a/docs/no-NO/faq/README.md +++ b/docs/no-NO/faq/README.md @@ -120,3 +120,11 @@ If Starship was installed using the install script, the following command will d # Locate and delete the starship binary sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/no-NO/guide/README.md b/docs/no-NO/guide/README.md index f74b800c8..8257069bf 100644 --- a/docs/no-NO/guide/README.md +++ b/docs/no-NO/guide/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="Følg @StarshipPrompt på Twitter" /> + Stand With Ukraine

@@ -147,8 +152,6 @@ />

-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

diff --git a/docs/no-NO/presets/README.md b/docs/no-NO/presets/README.md index 3903bc17a..2e332ad14 100644 --- a/docs/no-NO/presets/README.md +++ b/docs/no-NO/presets/README.md @@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). [![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) diff --git a/docs/no-NO/presets/gruvbox-rainbow.md b/docs/no-NO/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..cfe75913d --- /dev/null +++ b/docs/no-NO/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#gruvbox-rainbow) + +# Gruvbox Rainbow Preset + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png) + +### Nødvendig forutsetninger + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal + +### Configuration + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/no-NO/presets/jetpack.md b/docs/no-NO/presets/jetpack.md new file mode 100644 index 000000000..0f52a9a9e --- /dev/null +++ b/docs/no-NO/presets/jetpack.md @@ -0,0 +1,24 @@ +[Return to Presets](./README.md#jetpack) + +# Jetpack Preset + +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 uses the terminal's color theme. + +![Screenshot of Jetpack preset](/presets/img/jetpack.png) + +### Prerequisite + +- 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. + +### Configuration + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/pl-PL/config/README.md b/docs/pl-PL/config/README.md index 10c03d706..a39cc9bb0 100644 --- a/docs/pl-PL/config/README.md +++ b/docs/pl-PL/config/README.md @@ -206,6 +206,13 @@ This is the list of prompt-wide configuration options. | `add_newline` | `true` | Inserts blank line between shell prompts. | | `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: porada + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: ### Example @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### Options | Option | Default | Description | @@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. | | `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | | `style` | `'bold yellow'` | The style for the module. | -| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | +| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu ### Options -| Option | Default | Description | -| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'C '` | The symbol used before displaying the compiler details | -| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | -| `style` | `'bold 149'` | The style for the module. | -| `disabled` | `false` | Disables the `c` module. | +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | +| `style` | `'bold 149'` | The style for the module. | +| `disabled` | `false` | Disables the `c` module. | ### Variables @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | The style for the module. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['.envrc']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Variables + +| Zmienne | Example | Description | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbol | | Mirrors the value of option `symbol`. | +| style\* | `red bold` | Mirrors the value of option `style`. | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Docker Context The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). @@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `style` | `'bold green'` | The style for the module. | -| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. | +| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | | `disabled` | `false` | Disables the `fennel` module. | @@ -1524,11 +1577,46 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------------ | ------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | +| `added_style` | `'bold green'` | The style for the added count. | +| `deleted_style` | `'bold red'` | The style for the deleted count. | +| `only_nonzero_diffs` | `true` | Render status only for changed items. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### Variables + +| Zmienne | Example | Description | +| ----------------- | ------- | ------------------------------------------- | +| added | `1` | The current number of added lines | +| deleted | `2` | The current number of deleted lines | +| added_style\* | | Mirrors the value of option `added_style` | +| deleted_style\* | | Mirrors the value of option `deleted_style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. -When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set. +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. ### Options @@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | Option | Default | Description | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol]($style) '` | The format for the module. | -| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `style` | `"yellow bold"` | The style for the module. | +| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | The style for the module. | | `disabled` | `false` | Disables the `guix_shell` module. | ### Variables @@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `["gradle"]` | Which folders should trigger this module. | -| `style` | `"bold bright-cyan"` | The style for the module. | +| `detect_folders` | `['gradle']` | Which folders should trigger this module. | +| `style` | `'bold bright-cyan'` | The style for the module. | | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | Option | Default | Description | | ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. | -| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. | -| `style` | `"bold fg:202"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. | +| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. | +| `style` | `'bold fg:202'` | The style for the module. | | `disabled` | `false` | Disables the `haxe` module. | ### Variables @@ -2107,14 +2195,15 @@ The `hostname` module shows the system hostname. ### Options -| Option | Default | Description | -| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | -| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | -| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation | -| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | -| `style` | `'bold dimmed green'` | The style for the module. | -| `disabled` | `false` | Disables the `hostname` module. | +| Option | Default | Description | +| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | +| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | +| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation. | +| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | +| `style` | `'bold dimmed green'` | The style for the module. | +| `disabled` | `false` | Disables the `hostname` module. | ### Variables @@ -2126,7 +2215,9 @@ The `hostname` module shows the system hostname. *: This variable can only be used as a part of a style string -### Example +### Examples + +#### Always show the hostname ```toml # ~/.config/starship.toml @@ -2138,6 +2229,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Hide the hostname in remote tmux sessions + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met: @@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc' ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. ::: porada @@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten ### Options +::: warning + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + | Option | Default | Description | | ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | | `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | | `style` | `'cyan bold'` | The style for the module. | -| `context_aliases` | `{}` | Table of context aliases to display. | -| `user_aliases` | `{}` | Table of user aliases to display. | +| `context_aliases`* | `{}` | Table of context aliases to display. | +| `user_aliases`* | `{}` | Table of user aliases to display. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | +| `contexts` | `[]` | Customized styles and symbols for specific contexts. | | `disabled` | `true` | Disables the `kubernetes` module. | +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| Zmienne | Description | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `style` | The style for the module when using this context. If not set, will use module's style. | +| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + ### Variables | Zmienne | Example | Description | @@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Regex Matching +#### Kubernetes Context specific config -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. - -Long and automatically generated cluster names can be identified and shortened using regular expressions: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Line Break @@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_folders` | `['node_modules']` | Which folders should trigger this module. | | `style` | `'bold green'` | The style for the module. | | `disabled` | `false` | Disables the `nodejs` module. | -| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | +| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables @@ -2890,8 +3021,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | The format for the module. | -| `style` | `"bold white"` | The style for the module. | +| `format` | `'[$symbol]($style)'` | The format for the module. | +| `style` | `'bold white'` | The style for the module. | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met: | `symbol` | `'🐍 '` | A format string representing the symbol of Python | | `style` | `'yellow bold'` | The style for the module. | | `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `['py']` | Which extensions should trigger this module | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | @@ -3562,22 +3693,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `'bsh'` | A format string used to represent bash. | -| `fish_indicator` | `'fsh'` | A format string used to represent fish. | -| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | -| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | -| `ion_indicator` | `'ion'` | A format string used to represent ion. | -| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | -| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | -| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | -| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | -| `nu_indicator` | `'nu'` | A format string used to represent nu. | -| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | -| `format` | `'[$indicator]($style) '` | The format for the module. | -| `style` | `'white bold'` | The style for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | Default | Description | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | The style for the module. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https: | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables this module. | ### Variables @@ -4009,6 +4141,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +By default, the module will be shown if any of the following conditions are met: + +- The current directory contains a `template.typ` file +- The current directory contains any `*.typ` file + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | The style for the module. | +| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. | +| `detect_files` | `['template.typ']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `disabled` | `false` | Disables the `daml` module. | + +### Variables + +| Zmienne | Example | Description | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + ## Username The `username` module shows active user's username. The module will be shown if any of the following conditions are met: diff --git a/docs/pl-PL/faq/README.md b/docs/pl-PL/faq/README.md index f88a28a5a..2757bc7b6 100644 --- a/docs/pl-PL/faq/README.md +++ b/docs/pl-PL/faq/README.md @@ -21,7 +21,7 @@ Yes, they can both be used to disable modules in the prompt. If all you plan to - Disabling modules is more explicit than omitting them from the top level `format` - Newly created modules will be added to the prompt as Starship is updated -## Dokumentacja stwierdza że Starship jest wieloplatformowy. Dlaczego moja preferowana powłoka nie jest obsługiwana? +## Dokumentacja twierdzi, że Starship jest wieloplatformowy. Dlaczego moja preferowana powłoka nie jest obsługiwana? The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used. @@ -120,3 +120,11 @@ If Starship was installed using the install script, the following command will d # Locate and delete the starship binary sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/pl-PL/guide/README.md b/docs/pl-PL/guide/README.md index 0d5c72212..89a4d1b5d 100644 --- a/docs/pl-PL/guide/README.md +++ b/docs/pl-PL/guide/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="Śledź @StarshipPrompt na Twitterze" /> + Wspieraj Ukrainę

@@ -147,8 +152,6 @@ />

-[![SWUbaner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

diff --git a/docs/pl-PL/presets/README.md b/docs/pl-PL/presets/README.md index f72d797b8..5bb82d8ec 100644 --- a/docs/pl-PL/presets/README.md +++ b/docs/pl-PL/presets/README.md @@ -63,3 +63,9 @@ Ten zestaw ustawień jest inspirowany [M365Princess](https://github.com/JanDeDo Ten zestaw ustawień jest inspirowany [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). [![Zrzut ekranu ustawień Tokio Night](/presets/img/tokyo-night.png "Kliknij, aby wyświetlić ustawienia Tokio Night")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +Zestaw mocno inspirowany przez [Pastel Powerline](./pastel-powerline.md) i [Tokyo Night](./tokyo-night.md). + +[![Zrzut ekranu ustawień Gruvbox Rainbow](/presets/img/gruvbox-rainbow.png "Kliknij, aby wyświetlić ustawienia Gruvbox Rainbow")](./gruvbox-rainbow) diff --git a/docs/pl-PL/presets/gruvbox-rainbow.md b/docs/pl-PL/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..8e3abe06f --- /dev/null +++ b/docs/pl-PL/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[Powrót do ustawień predefiniowanych](./README.md#gruvbox-rainbow) + +# Ustawienia Gruvbox Rainbow + +Zestaw mocno inspirowany przez [Pastel Powerline](./pastel-powerline.md) i [Tokyo Night](./tokyo-night.md). + +![Zrzut ekranu ustawień Gruvbox Rainbow](/presets/img/gruvbox-rainbow.png) + +### Wymagania wstępne + +- Czcionka typu [Nerd Font](https://www.nerdfonts.com/) zainstalowana i włączona w twoim terminalu + +### Konfiguracja + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[Kliknij, aby pobrać TOML](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/pl-PL/presets/jetpack.md b/docs/pl-PL/presets/jetpack.md new file mode 100644 index 000000000..9206a9dc8 --- /dev/null +++ b/docs/pl-PL/presets/jetpack.md @@ -0,0 +1,24 @@ +[Powrót do ustawień predefiniowanych](./README.md#jetpack) + +# Jetpack Preset + +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 uses the terminal's color theme. + +![Screenshot of Jetpack preset](/presets/img/jetpack.png) + +### Wymaganie wstępne + +- 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. + +### Konfiguracja + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[Kliknij, aby pobrać TOML](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/pt-BR/config/README.md b/docs/pt-BR/config/README.md index 897722b02..c27f521a3 100644 --- a/docs/pt-BR/config/README.md +++ b/docs/pt-BR/config/README.md @@ -206,6 +206,13 @@ Esta é a lista de opções de configuração em todo o prompt. | `add_newline` | `true` | Insere linha vazia entre os prompts do shell. | | `palette` | `''` | Define qual a paleta de cores de `palettes` será usada. | | `palettes` | `{}` | Coleção de paletas de cores que atribuem [cores](/advanced-config/#style-strings) aos nomes definidos pelo usuário. Note que paletas de cores não podem referir-se a suas próprias definições de cores. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: ### Exemplo @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,6 +361,8 @@ Quando usar [AWSume](https://awsu.me) o perfil é lido da variável `AWSUME_PROF When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### Opções | Opções | Padrão | Descrição | @@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `region_aliases` | `{}` | Tabela de aleases de regiões a serem exibidas, além do nome da AWS. | | `profile_aliases` | `{}` | Tabela de apelidos de perfil a serem exibidos além do nome da AWS. | | `style` | `'bold yellow'` | O estilo do módulo. | -| `expiration_symbol` | `X` | O simbolo exibido quando as credenciais temporárias estão expiradas. | +| `expiration_symbol` | `'X'` | O simbolo exibido quando as credenciais temporárias estão expiradas. | | `disabled` | `false` | Desabilita o módulo `AWS`. | | `force_display` | `false` | Se `true` exibe as informações mesmo que `credentials`, `credential_process` ou `sso_start_url` não tenham sido configurados. | @@ -423,7 +435,7 @@ Enterprise_Naming_Scheme-voidstars = 'void**' ## Azure -O módulo `azure` exibe a assinatura Azure atual. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file. +O módulo `azure` exibe a assinatura Azure atual. Isto é baseado na exibição do nome da assinatura padrão ou no nome do usuário, como definido no arquivo `~/.azure/azureProfile.json`. ### Opções @@ -620,17 +632,17 @@ O módulo `c` mostra algumas informações sobre o seu compilador de C. Por padr ### Opções -| Opções | Padrão | Descrição | -| ------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | A string de formato do módulo. | -| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'C '` | O símbolo utilizado antes de exibir os detalhes do compilador | -| `detect_extensions` | `['c', 'h']` | Quais extensões devem ativar este módulo. | -| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | Como detectar qual é o compilador | -| `style` | `'bold 149'` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `c`. | +| Opções | Padrão | Descrição | +| ------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | A string de formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | O símbolo utilizado antes de exibir os detalhes do compilador | +| `detect_extensions` | `['c', 'h']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | Como detectar qual é o compilador | +| `style` | `'bold 149'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `c`. | ### Variáveis @@ -671,7 +683,7 @@ O caractere vai te dizer se o ultimo comando foi bem sucedido ou não. Você pod Por padrão ele apenas muda de cor. Se você deseja alterar o formato de uma olhada [neste exemplo](#with-custom-error-shape). -::: warning +::: atenção `vimcmd_symbol` is only supported in cmd, fish and zsh. `vimcmd_replace_one_symbol`, `vimcmd_replace_symbol`, and `vimcmd_visual_symbol` are only supported in fish due to [upstream issues with mode detection in zsh](https://github.com/starship/starship/issues/625#issuecomment-732454148). @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### Opções + +| Opções | Padrão | Descrição | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | O formato do módulo. | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | O estilo do módulo. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['.envrc']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Variáveis + +| Variável | Exemplo | Descrição | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbol | | Espelha o valor da opção `symbol`. | +| style\* | `red bold` | Espelha o valor da opção `style`. | + +*: Esta variável só pode ser usada como parte de uma string de estilo + +### Exemplo + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Docker Context O módulo `docker_context` exibe o [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) ativo atualmente se não estiver definido como `default` ou se as variáveis de ambiente `DOCKER_MACHINE_NAME`, `DOCKER_HOST` ou `DOCKER_CONTEXT` estiverem definidas (iram sobrescrever o contexto atual). @@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `style` | `'bold green'` | O estilo do módulo. | -| `detect_extensions` | `[fnl]` | Quais extensões devem ativar este módulo. | +| `detect_extensions` | `['fnl']` | Quais extensões devem ativar este módulo. | | `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | | `disabled` | `false` | Disables the `fennel` module. | @@ -1524,11 +1577,46 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### Opções + +| Opções | Padrão | Descrição | +| -------------------- | ------------------------------------------------------------ | ------------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | O formato do módulo. | +| `added_style` | `'bold green'` | O estilo para a contagem de adições. | +| `deleted_style` | `'bold red'` | O estilo para a contagem de exclusões. | +| `only_nonzero_diffs` | `true` | Exibe apenas o status para itens alterados. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### Variáveis + +| Variável | Exemplo | Descrição | +| ----------------- | ------- | --------------------------------------- | +| added | `1` | O número atual de linhas adicionadas | +| deleted | `2` | O número atual de linhas excluidas | +| added_style\* | | Espelha o valor da opção `added_style` | +| deleted_style\* | | Espelha o valor da opção`deleted_style` | + +*: Esta variável só pode ser usada como parte de uma string de estilo + +### Exemplo + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) O módulo `gcloud` exibe a configuração atual para a CLI do [`gcloud`](https://cloud.google.com/sdk/gcloud). Isto é baseadp mp arquivo `~/.config/gcloud/active_config` e no arquivo`~/.config/gcloud/configurations/config_{CONFIG NAME}` e a env var `CLOUDSDK_CONFIG`. -When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set. +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. ### Opções @@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | Opções | Padrão | Descrição | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol]($style) '` | O formato do módulo. | -| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `style` | `"yellow bold"` | O estilo do módulo. | +| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | O estilo do módulo. | | `disabled` | `false` | Disables the `guix_shell` module. | ### Variáveis @@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | Opções | Padrão | Descrição | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | Quais extensões devem ativar este módulo. | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Quais extensões devem ativar este módulo. | | `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `["gradle"]` | Quais pastas devem ativar este módulo. | -| `style` | `"bold bright-cyan"` | O estilo do módulo. | +| `detect_folders` | `['gradle']` | Quais pastas devem ativar este módulo. | +| `style` | `'bold bright-cyan'` | O estilo do módulo. | | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | Opções | Padrão | Descrição | | ------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["hx", "hxml"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Quais pastas devem ativar este módulo. | -| `symbol` | `"⌘ "` | O formato de string que representa o simbolo do Helm. | -| `style` | `"bold fg:202"` | O estilo do módulo. | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Quais pastas devem ativar este módulo. | +| `symbol` | `'⌘ '` | O formato de string que representa o simbolo do Helm. | +| `style` | `'bold fg:202'` | O estilo do módulo. | | `disabled` | `false` | Disables the `haxe` module. | ### Variáveis @@ -2107,14 +2195,15 @@ O módulo `hostname` exibe o nome do hostname. ### Opções -| Opções | Padrão | Descrição | -| ------------ | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| `ssh_only` | `true` | Apenas exibe o hostname quando conectado em uma sessão SSH. | -| `ssh_symbol` | `'🌐 '` | Uma formatação de string que representa o símbolo quando conectado à sessão SSH. | -| `trim_at` | `'.'` | String na qual vai truncar o hostname, após a primeira correspondência. `'.'` will stop after the first dot. `''` will disable any truncation | -| `format` | `'[$ssh_symbol$hostname]($style) in '` | O formato do módulo. | -| `style` | `'bold dimmed green'` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `hostname`. | +| Opções | Padrão | Descrição | +| ----------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | Apenas exibe o hostname quando conectado em uma sessão SSH. | +| `ssh_symbol` | `'🌐 '` | Uma formatação de string que representa o símbolo quando conectado à sessão SSH. | +| `trim_at` | `'.'` | String na qual vai truncar o hostname, após a primeira correspondência. `'.'` will stop after the first dot. `''` will disable any truncation. | +| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | O formato do módulo. | +| `style` | `'bold dimmed green'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `hostname`. | ### Variáveis @@ -2126,7 +2215,9 @@ O módulo `hostname` exibe o nome do hostname. *: Esta variável só pode ser usada como parte de uma string de estilo -### Exemplo +### Exemplos + +#### Always show the hostname ```toml # ~/.config/starship.toml @@ -2138,6 +2229,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Hide the hostname in remote tmux sessions + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java O módulo `java` exibe o versão atual instalada do [Java](https://www.oracle.com/java/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: @@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc' ## Kubernetes -Exibe o nome atual do [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) e, se definido, o namespace, usuário e cluster do arquivo kubeconfig. O namespace precisa ser definido no arquivo kubeconfig, isso pode ser feito via `kubectl config set-context starship-context --namespace astronaut`. Da mesma forma, o usuário e o cluster podem ser definidos com `kubectl config set-context starship-context --user starship-user` e `kubectl config set-context starship-context --cluster starship-cluster`. Se a env var `$KUBECONFIG` estiver definida o módulo vai usa-la ao invés de usar o `~/.kube/config`. +Exibe o nome atual do [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) e, se definido, o namespace, usuário e cluster do arquivo kubeconfig. O namespace precisa ser definido no arquivo kubeconfig, isso pode ser feito via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. Se a env var `$KUBECONFIG` estiver definida o módulo vai usa-la ao invés de usar o `~/.kube/config`. ::: tip @@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten ### Opções +::: atenção + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + | Opções | Padrão | Descrição | | ------------------- | ---------------------------------------------------- | ------------------------------------------------------------- | | `symbol` | `'☸ '` | Uma string que representa o simbolo exibido antes do Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | O formato do módulo. | | `style` | `'cyan bold'` | O estilo do módulo. | -| `context_aliases` | `{}` | Tabela de aliases de contexto para exibir. | -| `user_aliases` | `{}` | Table of user aliases to display. | +| `context_aliases`* | `{}` | Tabela de aliases de contexto para exibir. | +| `user_aliases`* | `{}` | Table of user aliases to display. | | `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. | | `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `contexts` | `[]` | Customized styles and symbols for specific contexts. | | `disabled` | `true` | Desabilita o módulo `kubernetes`. | +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| Variável | Descrição | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `style` | The style for the module when using this context. If not set, will use module's style. | +| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + ### Variáveis | Variável | Exemplo | Descrição | @@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Correspondência Regex +#### Kubernetes Context specific config -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -A expressão regular deve coincidir com todo o contexto kube, Grupos de captura podem ser referenciados usando `$name` e `$N` na substituição. Isto esta mais explicado na documentação do [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace). - -Nomes longos de clusters gerados automaticamente podem ser encurtados usando expressão regular: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Quebra de Linha @@ -2730,7 +2861,7 @@ O módulo `nodejs` exibe a versão atual instalada do [Node.js](https://nodejs.o | `detect_folders` | `['node_modules']` | Quais pastas devem ativar este módulo. | | `style` | `'bold green'` | O estilo do módulo. | | `disabled` | `false` | Desabilita o módulo `nodejs`. | -| `not_capable_style` | `bold red` | O estilo para o módulo quando a propriedade engine no package.json não coincide com a versão do Node.js. | +| `not_capable_style` | `'bold red'` | O estilo para o módulo quando a propriedade engine no package.json não coincide com a versão do Node.js. | ### Variáveis @@ -2890,8 +3021,8 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para | Opções | Padrão | Descrição | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | O formato do módulo. | -| `style` | `"bold white"` | O estilo do módulo. | +| `format` | `'[$symbol]($style)'` | O formato do módulo. | +| `style` | `'bold white'` | O estilo do módulo. | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -3149,13 +3280,13 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida: ### Variáveis -| Variável | Exemplo | Descrição | -| --------------- | ---------- | --------------------------------- | -| version | `v0.12.24` | A versão do `pulumi` | -| stack | `dev` | A stack Pulumi atual | -| nome do usuário | `alice` | O nome de usuário Pulumi atual | -| symbol | | Espelha o valor da opção `symbol` | -| style\* | | Espelha o valor da opção `style` | +| Variável | Exemplo | Descrição | +| --------- | ---------- | --------------------------------- | +| version | `v0.12.24` | A versão do `pulumi` | +| stack | `dev` | A stack Pulumi atual | +| username | `alice` | O nome de usuário Pulumi atual | +| symbol | | Espelha o valor da opção `symbol` | +| style\* | | Espelha o valor da opção `style` | *: Esta variável só pode ser usada como parte de uma string de estilo @@ -3245,7 +3376,7 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida: | `symbol` | `'🐍 '` | Uma string que representa o simbolo do Python | | `style` | `'yellow bold'` | O estilo do módulo. | | `pyenv_version_name` | `false` | Usa pyenv para pegar a versão do Python | -| `pyenv_prefix` | `pyenv` | Prefixo antes da versão do pyenv, apenas usado se pyenv for usado | +| `pyenv_prefix` | `'pyenv'` | Prefixo antes da versão do pyenv, apenas usado se pyenv for usado | | `python_binary` | `['python', 'python3', 'python2']` | Configura o binário python que o Starship vai executar para obter a versão. | | `detect_extensions` | `['py']` | Quais extensões devem acionar este módulo | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | [] | @@ -3562,22 +3693,23 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para ### Opções -| Opções | Padrão | Descrição | -| ---------------------- | ------------------------- | ------------------------------------------------------- | -| `bash_indicator` | `'bsh'` | Uma string para representar o bash. | -| `fish_indicator` | `'fsh'` | Uma string usada para representar o fish. | -| `zsh_indicator` | `'zsh'` | Uma string usada para representar o zsh. | -| `powershell_indicator` | `'psh'` | Uma string usada para representar o powershell. | -| `ion_indicator` | `'ion'` | Uma string usada para representar o ion. | -| `elvish_indicator` | `'esh'` | Uma string usada para representar o elvish. | -| `tcsh_indicator` | `'tsh'` | Uma string usada para representar o tcsh. | -| `xonsh_indicator` | `'xsh'` | Uma string usada para representar o xonsh. | -| `cmd_indicator` | `'cmd'` | Uma string usada para representar o cmd. | -| `nu_indicator` | `'nu'` | Uma string usada para representar o nu. | -| `unknown_indicator` | `''` | Valor padrão para exibir quando o shell é desconhecido. | -| `format` | `'[$indicator]($style) '` | O formato do módulo. | -| `style` | `'white bold'` | O estilo do módulo. | -| `disabled` | `true` | Desabilita o módulo `shell`. | +| Opções | Padrão | Descrição | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | Uma string para representar o bash. | +| `fish_indicator` | `'fsh'` | Uma string usada para representar o fish. | +| `zsh_indicator` | `'zsh'` | Uma string usada para representar o zsh. | +| `powershell_indicator` | `'psh'` | Uma string usada para representar o powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | Uma string usada para representar o ion. | +| `elvish_indicator` | `'esh'` | Uma string usada para representar o elvish. | +| `tcsh_indicator` | `'tsh'` | Uma string usada para representar o tcsh. | +| `xonsh_indicator` | `'xsh'` | Uma string usada para representar o xonsh. | +| `cmd_indicator` | `'cmd'` | Uma string usada para representar o cmd. | +| `nu_indicator` | `'nu'` | Uma string usada para representar o nu. | +| `unknown_indicator` | `''` | Valor padrão para exibir quando o shell é desconhecido. | +| `format` | `'[$indicator]($style) '` | O formato do módulo. | +| `style` | `'white bold'` | O estilo do módulo. | +| `disabled` | `true` | Desabilita o módulo `shell`. | ### Variáveis @@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https: | Opções | Padrão | Descrição | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${major}.${minor}.${patch}"` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | Quais extensões devem ativar este módulo. | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${major}.${minor}.${patch}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Quais extensões devem ativar este módulo. | | `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `style` | `"bold blue"` | O estilo do módulo. | +| `style` | `'bold blue'` | O estilo do módulo. | | `disabled` | `false` | Disables this module. | ### Variáveis @@ -4009,6 +4141,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +Por padrão, o módulo será exibido se qualquer das seguintes condições for atendida: + +- O diretório atual conter um arquivo `template.typ` +- The current directory contains any `*.typ` file + +### Opções + +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. | +| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | O estilo do módulo. | +| `detect_extensions` | `['.typ']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['template.typ']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | +| `disabled` | `false` | Disables the `daml` module. | + +### Variáveis + +| Variável | Exemplo | Descrição | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| symbol | | Espelha o valor da opção `symbol` | +| style\* | | Espelha o valor da opção `style` | + +*: Esta variável só pode ser usada como parte de uma string de estilo + ## Nome do usuário O módulo `username` mostra o nome de usuário do usuário ativo. O módulo será mostrado se alguma das seguintes condições for atendida: diff --git a/docs/pt-BR/faq/README.md b/docs/pt-BR/faq/README.md index 27259e572..c445f797d 100644 --- a/docs/pt-BR/faq/README.md +++ b/docs/pt-BR/faq/README.md @@ -120,3 +120,11 @@ Se o Starship foi instalado usando o script de instalação, o comando abaixo ir # Localiza e exclui o binário do starship sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/pt-BR/guide/README.md b/docs/pt-BR/guide/README.md index 67d284205..f13eb380d 100644 --- a/docs/pt-BR/guide/README.md +++ b/docs/pt-BR/guide/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="Siga o @StarshipPrompt no Twitter" /> + Stand With Ukraine

@@ -147,8 +152,6 @@ />

-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

diff --git a/docs/pt-BR/presets/README.md b/docs/pt-BR/presets/README.md index 9e41bc240..0d58e994f 100644 --- a/docs/pt-BR/presets/README.md +++ b/docs/pt-BR/presets/README.md @@ -63,3 +63,9 @@ Esta personalização é inspirada em [M365Princess](https://github.com/JanDeDob Este preset é inspirado por [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). [![Captura de tela de Tokyo Night preset](/presets/img/tokyo-night.png "Clique para visualizar Tokyo Night preset")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) diff --git a/docs/pt-BR/presets/gruvbox-rainbow.md b/docs/pt-BR/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..588b5c3a6 --- /dev/null +++ b/docs/pt-BR/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[Retornar para Personalizações](./README.md#gruvbox-rainbow) + +# Gruvbox Rainbow Preset + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png) + +### Pré-requisitos + +- Uma fonte [Nerd Font](https://www.nerdfonts.com/) instalada e ativada em seu terminal + +### Configuração + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[Clique para baixar o TOML](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/pt-BR/presets/jetpack.md b/docs/pt-BR/presets/jetpack.md new file mode 100644 index 000000000..339ab8c80 --- /dev/null +++ b/docs/pt-BR/presets/jetpack.md @@ -0,0 +1,24 @@ +[Retornar para Personalizações](./README.md#jetpack) + +# Jetpack Preset + +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 uses the terminal's color theme. + +![Screenshot of Jetpack preset](/presets/img/jetpack.png) + +### Prerequisite + +- 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. + +### Configuração + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[Clique para baixar o TOML](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/pt-PT/config/README.md b/docs/pt-PT/config/README.md index 396fbb2c9..dccdabf20 100644 --- a/docs/pt-PT/config/README.md +++ b/docs/pt-PT/config/README.md @@ -206,6 +206,13 @@ This is the list of prompt-wide configuration options. | `add_newline` | `true` | Inserts blank line between shell prompts. | | `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: ### Example @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### Options | Option | Default | Description | @@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. | | `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | | `style` | `'bold yellow'` | The style for the module. | -| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | +| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu ### Options -| Option | Default | Description | -| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'C '` | The symbol used before displaying the compiler details | -| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | -| `style` | `'bold 149'` | The style for the module. | -| `disabled` | `false` | Disables the `c` module. | +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | +| `style` | `'bold 149'` | The style for the module. | +| `disabled` | `false` | Disables the `c` module. | ### Variables @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | The style for the module. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['.envrc']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbol | | Mirrors the value of option `symbol`. | +| style\* | `red bold` | Mirrors the value of option `style`. | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Docker Context The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). @@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `style` | `'bold green'` | The style for the module. | -| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. | +| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | | `disabled` | `false` | Disables the `fennel` module. | @@ -1524,11 +1577,46 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------------ | ------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | +| `added_style` | `'bold green'` | The style for the added count. | +| `deleted_style` | `'bold red'` | The style for the deleted count. | +| `only_nonzero_diffs` | `true` | Render status only for changed items. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### Variables + +| Variable | Example | Description | +| ----------------- | ------- | ------------------------------------------- | +| added | `1` | The current number of added lines | +| deleted | `2` | The current number of deleted lines | +| added_style\* | | Mirrors the value of option `added_style` | +| deleted_style\* | | Mirrors the value of option `deleted_style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. -When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set. +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. ### Options @@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | Option | Default | Description | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol]($style) '` | The format for the module. | -| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `style` | `"yellow bold"` | The style for the module. | +| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | The style for the module. | | `disabled` | `false` | Disables the `guix_shell` module. | ### Variables @@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `["gradle"]` | Which folders should trigger this module. | -| `style` | `"bold bright-cyan"` | The style for the module. | +| `detect_folders` | `['gradle']` | Which folders should trigger this module. | +| `style` | `'bold bright-cyan'` | The style for the module. | | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | Option | Default | Description | | ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. | -| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. | -| `style` | `"bold fg:202"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. | +| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. | +| `style` | `'bold fg:202'` | The style for the module. | | `disabled` | `false` | Disables the `haxe` module. | ### Variables @@ -2107,14 +2195,15 @@ The `hostname` module shows the system hostname. ### Options -| Option | Default | Description | -| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | -| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | -| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation | -| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | -| `style` | `'bold dimmed green'` | The style for the module. | -| `disabled` | `false` | Disables the `hostname` module. | +| Option | Default | Description | +| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | +| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | +| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation. | +| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | +| `style` | `'bold dimmed green'` | The style for the module. | +| `disabled` | `false` | Disables the `hostname` module. | ### Variables @@ -2126,7 +2215,9 @@ The `hostname` module shows the system hostname. *: This variable can only be used as a part of a style string -### Example +### Examples + +#### Always show the hostname ```toml # ~/.config/starship.toml @@ -2138,6 +2229,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Hide the hostname in remote tmux sessions + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met: @@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc' ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. ::: tip @@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten ### Options +::: warning + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + | Option | Default | Description | | ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | | `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | | `style` | `'cyan bold'` | The style for the module. | -| `context_aliases` | `{}` | Table of context aliases to display. | -| `user_aliases` | `{}` | Table of user aliases to display. | +| `context_aliases`* | `{}` | Table of context aliases to display. | +| `user_aliases`* | `{}` | Table of user aliases to display. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | +| `contexts` | `[]` | Customized styles and symbols for specific contexts. | | `disabled` | `true` | Disables the `kubernetes` module. | +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| Variable | Description | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `style` | The style for the module when using this context. If not set, will use module's style. | +| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + ### Variables | Variable | Example | Description | @@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Regex Matching +#### Kubernetes Context specific config -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. - -Long and automatically generated cluster names can be identified and shortened using regular expressions: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Line Break @@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_folders` | `['node_modules']` | Which folders should trigger this module. | | `style` | `'bold green'` | The style for the module. | | `disabled` | `false` | Disables the `nodejs` module. | -| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | +| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables @@ -2890,8 +3021,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | The format for the module. | -| `style` | `"bold white"` | The style for the module. | +| `format` | `'[$symbol]($style)'` | The format for the module. | +| `style` | `'bold white'` | The style for the module. | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met: | `symbol` | `'🐍 '` | A format string representing the symbol of Python | | `style` | `'yellow bold'` | The style for the module. | | `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `['py']` | Which extensions should trigger this module | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | @@ -3562,22 +3693,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `'bsh'` | A format string used to represent bash. | -| `fish_indicator` | `'fsh'` | A format string used to represent fish. | -| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | -| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | -| `ion_indicator` | `'ion'` | A format string used to represent ion. | -| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | -| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | -| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | -| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | -| `nu_indicator` | `'nu'` | A format string used to represent nu. | -| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | -| `format` | `'[$indicator]($style) '` | The format for the module. | -| `style` | `'white bold'` | The style for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | Default | Description | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | The style for the module. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https: | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | +| `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables this module. | ### Variables @@ -4009,6 +4141,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +By default, the module will be shown if any of the following conditions are met: + +- The current directory contains a `template.typ` file +- The current directory contains any `*.typ` file + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | The style for the module. | +| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. | +| `detect_files` | `['template.typ']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `disabled` | `false` | Disables the `daml` module. | + +### Variables + +| Variable | Example | Description | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + ## Username The `username` module shows active user's username. The module will be shown if any of the following conditions are met: diff --git a/docs/pt-PT/faq/README.md b/docs/pt-PT/faq/README.md index 41bb2d391..1f8484406 100644 --- a/docs/pt-PT/faq/README.md +++ b/docs/pt-PT/faq/README.md @@ -120,3 +120,11 @@ If Starship was installed using the install script, the following command will d # Locate and delete the starship binary sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/pt-PT/guide/README.md b/docs/pt-PT/guide/README.md index 0289a807f..26c725541 100644 --- a/docs/pt-PT/guide/README.md +++ b/docs/pt-PT/guide/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="Follow @StarshipPrompt on Twitter" /> + Stand With Ukraine

@@ -147,8 +152,6 @@ />

-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

diff --git a/docs/pt-PT/presets/README.md b/docs/pt-PT/presets/README.md index 3903bc17a..2e332ad14 100644 --- a/docs/pt-PT/presets/README.md +++ b/docs/pt-PT/presets/README.md @@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). [![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) diff --git a/docs/pt-PT/presets/gruvbox-rainbow.md b/docs/pt-PT/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..7e2db717f --- /dev/null +++ b/docs/pt-PT/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#gruvbox-rainbow) + +# Gruvbox Rainbow Preset + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png) + +### Prerequisites + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal + +### Configuration + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/pt-PT/presets/jetpack.md b/docs/pt-PT/presets/jetpack.md new file mode 100644 index 000000000..0f52a9a9e --- /dev/null +++ b/docs/pt-PT/presets/jetpack.md @@ -0,0 +1,24 @@ +[Return to Presets](./README.md#jetpack) + +# Jetpack Preset + +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 uses the terminal's color theme. + +![Screenshot of Jetpack preset](/presets/img/jetpack.png) + +### Prerequisite + +- 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. + +### Configuration + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/ru-RU/README.md b/docs/ru-RU/README.md index 9439e767a..811871ea5 100644 --- a/docs/ru-RU/README.md +++ b/docs/ru-RU/README.md @@ -2,7 +2,7 @@ home: true heroImage: /logo.svg heroText: -tagline: Минималистичная, быстрая и бесконечно настраиваемая командная строка для любой оболочки! +tagline: Минималистичное, быстрое и бесконечно настраиваемое приглашение командной строки для любой оболочки! actionText: Начало работы → actionLink: ./guide/ features: @@ -18,7 +18,7 @@ features: footer: Под лицензией ISC | Авторское право © 2019-настоящее Starship Contributors #Used for the description meta tag, for SEO metaTitle: "Starship: Cross-Shell Prompt" -description: Starship - минимальная, быстрая и бесконечная настраиваемая командная строка для любой оболочки! Показывает нужную вам информацию, оставаясь красивой и минималистичной. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell. +description: Starship - минимальная, быстрая и бесконечная настраиваемая командная строка для любой оболочки! Показывает нужную вам информацию, оставаясь красивой и минималистичной. Быстрая установка доступна для Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, и PowerShell. ---
@@ -28,34 +28,34 @@ description: Starship - минимальная, быстрая и бесконе
-### Обязательные требования +### Обязательные условия - Установленный и включенный шрифт [Nerd Font](https://www.nerdfonts.com/) в вашем терминале. ### Быстрая установка -1. Установите двоичный файл **starship**: +1. Установите бинарный файл **starship**: - #### Установить последнюю версию + #### Установка последней версии - Через Bash: + Через Shell: ```sh curl -sS https://starship.rs/install.sh | sh ``` - Для обновления Starship перезапустите этот скрипт. Он заменит текущую версию без изменения конфигурации. + Чтобы обновить Starship, повторно запустите приведенный выше скрипт. Он заменит текущую версию, не затрагивая конфигурацию Starship. - #### Установить через менеджер пакетов + #### Установка через пакетный менеджер - С [Homebrew](https://brew.sh/): + С помощью [Homebrew](https://brew.sh/): ```sh brew install starship ``` - With [Winget](https://github.com/microsoft/winget-cli): + С помощью [Winget](https://github.com/microsoft/winget-cli): ```powershell winget install starship @@ -149,7 +149,7 @@ description: Starship - минимальная, быстрая и бесконе ::: warning - This will change in the future. Only Nushell v0.78+ is supported. + This will change in the future. Поддерживается только Nushell v0.78+. ::: diff --git a/docs/ru-RU/advanced-config/README.md b/docs/ru-RU/advanced-config/README.md index 8586667c1..005fff03a 100644 --- a/docs/ru-RU/advanced-config/README.md +++ b/docs/ru-RU/advanced-config/README.md @@ -271,14 +271,14 @@ continuation_prompt = '▶▶ ' Цветовой спецификатор может быть одним из следующих: -- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- Один из стандартных цветов терминалов: `black`, `red`, `green`, `blue`, `gellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). - `#`, за которой следует шестизначное шестнадцатеричное число. Это определяет [шестнадцатеричный код цвета RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp). - Число от 0 до 255. Это определяет [8-битный код цвета ANSI](https://i.stack.imgur.com/KTSQa.png). Если для переднего плана/фона задано несколько цветов, то последняя из строк будет иметь приоритет. -Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: +Не все строки стиля будут корректно отображаться в терминале. В частности, существуют следующие известные ошибки: -- Many terminals disable support for `blink` by default -- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). -- `strikethrough` is not supported by the default macOS Terminal.app +- Во многих терминалах по умолчанию отключена поддержка `blink` +- `hidden` [не поддерживается в iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `strikethrough` по умолчанию не поддерживается в macOS Terminal.app diff --git a/docs/ru-RU/config/README.md b/docs/ru-RU/config/README.md index 1ce293ee1..5aeb02e1d 100644 --- a/docs/ru-RU/config/README.md +++ b/docs/ru-RU/config/README.md @@ -206,6 +206,13 @@ detect_extensions = ['ts', '!video.ts', '!audio.ts'] | `add_newline` | `true` | Inserts blank line between shell prompts. | | `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: ### Пример @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### Опции | Параметр | По умолчанию | Описание | @@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `region_aliases` | `{}` | Таблица региона псевдонимов, отображаемая вместе с именем AWS. | | `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | | `style` | `'bold yellow'` | Стиль модуля. | -| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | +| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Отключение модуля `AWS`. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu ### Опции -| Параметр | По умолчанию | Описание | -| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'C '` | The symbol used before displaying the compiler details | -| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | -| `style` | `'bold 149'` | Стиль модуля. | -| `disabled` | `false` | Disables the `c` module. | +| Параметр | По умолчанию | Описание | +| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | +| `style` | `'bold 149'` | Стиль модуля. | +| `disabled` | `false` | Disables the `c` module. | ### Переменные @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### Опции + +| Параметр | По умолчанию | Описание | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | Формат модуля. | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | Стиль модуля. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['.envrc']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Переменные + +| Переменная | Пример | Описание | +| ---------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbol | | Отражает значение параметра `symbol`. | +| style\* | `red bold` | Отражает значение параметра `style`. | + +*: Эта переменная может использоваться только в качестве части строки style + +### Пример + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Контекст Docker The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). @@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `style` | `'bold green'` | Стиль модуля. | -| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. | +| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | | `disabled` | `false` | Disables the `fennel` module. | @@ -1524,11 +1577,46 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### Опции + +| Параметр | По умолчанию | Описание | +| -------------------- | ------------------------------------------------------------ | ------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Формат модуля. | +| `added_style` | `'bold green'` | The style for the added count. | +| `deleted_style` | `'bold red'` | The style for the deleted count. | +| `only_nonzero_diffs` | `true` | Render status only for changed items. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### Переменные + +| Переменная | Пример | Описание | +| ----------------- | ------ | ------------------------------------------- | +| added | `1` | The current number of added lines | +| deleted | `2` | The current number of deleted lines | +| added_style\* | | Mirrors the value of option `added_style` | +| deleted_style\* | | Mirrors the value of option `deleted_style` | + +*: Эта переменная может использоваться только в качестве части строки style + +### Пример + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. -When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set. +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. ### Опции @@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | Параметр | По умолчанию | Описание | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol]($style) '` | Формат модуля. | -| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `style` | `"yellow bold"` | Стиль модуля. | +| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | Стиль модуля. | | `disabled` | `false` | Disables the `guix_shell` module. | ### Переменные @@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `["gradle"]` | Which folders should trigger this module. | -| `style` | `"bold bright-cyan"` | Стиль модуля. | +| `detect_folders` | `['gradle']` | Which folders should trigger this module. | +| `style` | `'bold bright-cyan'` | Стиль модуля. | | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | Параметр | По умолчанию | Описание | | ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. | -| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. | -| `style` | `"bold fg:202"` | Стиль модуля. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. | +| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. | +| `style` | `'bold fg:202'` | Стиль модуля. | | `disabled` | `false` | Disables the `haxe` module. | ### Переменные @@ -2107,14 +2195,15 @@ format = 'via [⎈ $version](bold white) ' ### Опции -| Параметр | По умолчанию | Описание | -| ------------ | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| `ssh_only` | `true` | Показывать имя хоста только при подключении через SSH. | -| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | -| `trim_at` | `'.'` | Символы, по которую имя хоста будет сокращено после первого совпадения. `'.'` will stop after the first dot. `''` will disable any truncation | -| `format` | `'[$ssh_symbol$hostname]($style) in '` | Формат модуля. | -| `style` | `'bold dimmed green'` | Стиль модуля. | -| `disabled` | `false` | Отключает модуль `hostname`. | +| Параметр | По умолчанию | Описание | +| ----------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | Показывать имя хоста только при подключении через SSH. | +| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | +| `trim_at` | `'.'` | Символы, по которую имя хоста будет сокращено после первого совпадения. `'.'` will stop after the first dot. `''` will disable any truncation. | +| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | Формат модуля. | +| `style` | `'bold dimmed green'` | Стиль модуля. | +| `disabled` | `false` | Отключает модуль `hostname`. | ### Переменные @@ -2126,7 +2215,9 @@ format = 'via [⎈ $version](bold white) ' *: Эта переменная может использоваться только в качестве части строки style -### Пример +### Примеры + +#### Always show the hostname ```toml # ~/.config/starship.toml @@ -2138,6 +2229,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Hide the hostname in remote tmux sessions + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met: @@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc' ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. ::: tip @@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten ### Опции +::: warning + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + | Параметр | По умолчанию | Описание | | ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | | `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | Формат модуля. | | `style` | `'cyan bold'` | Стиль модуля. | -| `context_aliases` | `{}` | Table of context aliases to display. | -| `user_aliases` | `{}` | Table of user aliases to display. | +| `context_aliases`* | `{}` | Table of context aliases to display. | +| `user_aliases`* | `{}` | Table of user aliases to display. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | +| `contexts` | `[]` | Customized styles and symbols for specific contexts. | | `disabled` | `true` | Отключает модуль `kubernetes`. | +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| Переменная | Описание | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `style` | The style for the module when using this context. If not set, will use module's style. | +| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + ### Переменные | Переменная | Пример | Описание | @@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Regex Matching +#### Kubernetes Context specific config -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. - -Long and automatically generated cluster names can be identified and shortened using regular expressions: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Разрыв Строки @@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_folders` | `['node_modules']` | Which folders should trigger this module. | | `style` | `'bold green'` | Стиль модуля. | | `disabled` | `false` | Отключает модуль `nodejs`. | -| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | +| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Переменные @@ -2890,8 +3021,8 @@ The [os_info](https://lib.rs/crates/os_info) crate used by this module is known | Параметр | По умолчанию | Описание | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | Формат модуля. | -| `style` | `"bold white"` | Стиль модуля. | +| `format` | `'[$symbol]($style)'` | Формат модуля. | +| `style` | `'bold white'` | Стиль модуля. | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met: | `symbol` | `'🐍 '` | A format string representing the symbol of Python | | `style` | `'yellow bold'` | Стиль модуля. | | `pyenv_version_name` | `false` | Использовать pyenv для получения версии Python | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `['py']` | Which extensions should trigger this module | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | @@ -3562,22 +3693,23 @@ The `shell` module shows an indicator for currently used shell. ### Опции -| Параметр | По умолчанию | Описание | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `'bsh'` | A format string used to represent bash. | -| `fish_indicator` | `'fsh'` | A format string used to represent fish. | -| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | -| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | -| `ion_indicator` | `'ion'` | A format string used to represent ion. | -| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | -| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | -| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | -| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | -| `nu_indicator` | `'nu'` | A format string used to represent nu. | -| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | -| `format` | `'[$indicator]($style) '` | Формат модуля. | -| `style` | `'white bold'` | Стиль модуля. | -| `disabled` | `true` | Disables the `shell` module. | +| Параметр | По умолчанию | Описание | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | Формат модуля. | +| `style` | `'white bold'` | Стиль модуля. | +| `disabled` | `true` | Disables the `shell` module. | ### Переменные @@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https: | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | Стиль модуля. | +| `style` | `'bold blue'` | Стиль модуля. | | `disabled` | `false` | Disables this module. | ### Переменные @@ -4009,6 +4141,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +By default, the module will be shown if any of the following conditions are met: + +- Текущий каталог содержит файл `template.typ` +- The current directory contains any `*.typ` file + +### Опции + +| Параметр | По умолчанию | Описание | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | Стиль модуля. | +| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. | +| `detect_files` | `['template.typ']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `disabled` | `false` | Disables the `daml` module. | + +### Переменные + +| Переменная | Пример | Описание | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | + +*: Эта переменная может использоваться только в качестве части строки style + ## Имя пользователя Модуль `username` показывает имя текущего пользователя. Модуль будет показан, если любое из следующих условий соблюдено: diff --git a/docs/ru-RU/faq/README.md b/docs/ru-RU/faq/README.md index fd295b141..6fe2f96c7 100644 --- a/docs/ru-RU/faq/README.md +++ b/docs/ru-RU/faq/README.md @@ -1,12 +1,12 @@ -# Frequently Asked Questions +# Часто задаваемые вопросы ## Какая конфигурация используется в демо-GIF? - **Эмулятор терминала**: [iTerm2](https://iterm2.com/) - - **Тема**: Минимальная + - **Тема**: Minimal - **Цветовая схема**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy) - - **Font**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads) -- **Оболочка**: [Fish Shell](https://fishshell.com/) + - **Шрифт**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads) +- **Командная оболочка**: [Fish Shell](https://fishshell.com/) - **Конфигурация**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish) - **Подсказка**: [Starship](https://starship.rs/) @@ -120,3 +120,11 @@ If Starship was installed using the install script, the following command will d # Locate and delete the starship binary sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/ru-RU/guide/README.md b/docs/ru-RU/guide/README.md index e992d3a41..5795e781d 100644 --- a/docs/ru-RU/guide/README.md +++ b/docs/ru-RU/guide/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="Подпишитесь на @StarshipPrompt в Twitter" /> + Stand With Ukraine

@@ -147,8 +152,6 @@ />

-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

-**Минималистичная, быстрая и бесконечно настраиваемая командная строка для любой оболочки!** +**Минималистичное, быстрое и бесконечно настраиваемое приглашение командной строки для любой оболочки!** - **Быстрая:** она быстрая – _очень-очень_ быстрая! 🚀 - **Настраиваемая:** настройте каждый элемент вашей командной строки. @@ -229,6 +232,7 @@ Alternatively, install Starship using any of the following package managers: | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| openSUSE | [OSS](https://software.opensuse.org/package/starship) | `zypper in starship` | | Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
diff --git a/docs/ru-RU/presets/README.md b/docs/ru-RU/presets/README.md index acfaf78f8..a20991e94 100644 --- a/docs/ru-RU/presets/README.md +++ b/docs/ru-RU/presets/README.md @@ -1,65 +1,71 @@ -# Предустановки +# Пресеты -Ниже приведена коллекция предустановок конфигураций сообщества для Starship. Если вы хотите поделиться своей предустановкой, пожалуйста, [создайте PR](https://github.com/starship/starship/edit/master/docs/presets/README.md), обновляя этот файл! 😊 +Ниже представлена коллекция пресетов для Starship, созданных сообществом. Если у вас есть пресет, которым вы хотите поделиться, пожалуйста, [отправьте PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) для обновления этого файла! 😊 -To get details on how to use a preset, simply click on the image. +Чтобы получить подробную информацию о том, как использовать тот или иной пресет, просто щелкните на его изображение. -## [Символы Шрифта Nerd Font](./nerd-font.md) +## [Nerd Font Symbols](./nerd-font.md) -This preset changes the symbols for each module to use Nerd Font symbols. +Этот пресет изменяет символы для каждого модуля на символы Nerd Font. -[![Скриншот предустановки Nerd Font Symbols](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font) +[![Скриншот пресета Nerd Font Symbols](/presets/img/nerd-font-symbols.png "Нажмите, чтобы просмотреть пресет Nerd Font Symbols")](./nerd-font) ## [No 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. +Этот пресет изменяет символы для нескольких модулей таким образом, чтобы в приглашении командной строки нигде не использовались символы Nerd Font. ::: tip -This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). +Этот пресет станет пресетом по умолчанию [в будущем релизе starship](https://github.com/starship/starship/pull/3544). ::: -[Click to view No Nerd Font preset](./no-nerd-font) +[Нажмите, чтобы просмотреть пресет No Nerd Font](./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.). +Шаблон изменяет формат всех встроенных модулей для показа их сегментов в скобках вместо использования стандартных в Starship слов ("via", "on", и т. д.). -[![Screenshot of Bracketed Segments preset](/presets/img/bracketed-segments.png "Click to view Bracketed Segments preset")](./bracketed-segments) +[![Скриншот пресета Bracketed Segments](/presets/img/bracketed-segments.png "Нажмите, чтобы просмотреть пресет Bracketed Segments")](./bracketed-segments) ## [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. +Этот пресет изменяет символы для каждого модуля на обычный текст. Отлично подходит, если у вас нет возможности использовать Unicode. -[![Screenshot of Plain Text Symbols preset](/presets/img/plain-text-symbols.png "Click to view Plain Text Symbols preset")](./plain-text) +[![Скриншот пресета Plain Text Symbols](/presets/img/plain-text-symbols.png "Нажмите, чтобы просмотреть пресет Plain Text Symbols")](./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! +Этот пресет скрывает версии сред выполнения языков программирования. Если вы работаете с контейнерами или виртуализированными средами, то этот пресет для вас! -[![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes) +[![Скриншот пресета Hide Runtime Versions](/presets/img/no-runtime-versions.png "Нажмите, чтобы просмотреть пресет No Runtime Versions")](./no-runtimes) ## [No Empty Icons](./no-empty-icons.md) -This preset does not show icons if the toolset is not found. +Этот пресет не отображает иконки, если набор инструментов не найден. -[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md) +[![Скриншот пресета No Empty Icons](/presets/img/no-empty-icons.png "Нажмите, чтобы просмотреть пресет No Runtime Versions")](./no-empty-icons.md) ## [Pure Prompt](./pure-preset.md) -This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). +Этот пресет имитирует внешний вид и поведение [Pure](https://github.com/sindresorhus/pure). -[![Screenshot of Pure preset](/presets/img/pure-preset.png "Click to view Pure Prompt preset")](./pure-preset) +[![Скриншот пресета Pure](/presets/img/pure-preset.png "Нажмите, чтобы просмотреть пресет Pure Prompt")](./pure-preset) ## [Pastel 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. +Эта пресет вдохновлен [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). В нем также показано, как работает замена пути в starship. -[![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline) +[![Скриншот пресета Pastel Powerline](/presets/img/pastel-powerline.png "Нажмите, чтобы просмотреть пресет Pure Prompt")](./pastel-powerline) ## [Tokyo Night](./tokyo-night.md) -This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). +Этот пресет вдохновлен [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). -[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) +[![Скриншот пресета Tokyo Night](/presets/img/tokyo-night.png "Нажмите, чтобы просмотреть пресет Tokyo Night")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +Этот пресет в значительной степени вдохновлен [Pastel Powerline](./pastel-powerline.md) и [Tokyo Night](./tokyo-night.md). + +[![Скриншот пресета Gruvbox Rainbow](/presets/img/gruvbox-rainbow.png "Нажмите, чтобы просмотреть пресет Gruvbox Rainbow")](./gruvbox-rainbow) diff --git a/docs/ru-RU/presets/bracketed-segments.md b/docs/ru-RU/presets/bracketed-segments.md index 668805bb5..37737aa76 100644 --- a/docs/ru-RU/presets/bracketed-segments.md +++ b/docs/ru-RU/presets/bracketed-segments.md @@ -1,10 +1,10 @@ -[Return to Presets](./README.md#bracketed-segments) +[Вернуться к пресетам](./README.md#bracketed-segments) -# Bracketed Segments 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.). +Шаблон изменяет формат всех встроенных модулей для показа их сегментов в скобках вместо использования стандартных в Starship слов ("via", "on", и т. д.). -![Screenshot of Bracketed Segments preset](/presets/img/bracketed-segments.png) +![Скриншот пресета Bracketed Segments](/presets/img/bracketed-segments.png) ### Конфигурация @@ -12,6 +12,6 @@ This preset changes the format of all the built-in modules to show their segment starship preset bracketed-segments -o ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/bracketed-segments.toml) +[Нажмите, чтобы загрузить TOML](/presets/toml/bracketed-segments.toml) <<< @/.vuepress/public/presets/toml/bracketed-segments.toml diff --git a/docs/ru-RU/presets/gruvbox-rainbow.md b/docs/ru-RU/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..b60d31d68 --- /dev/null +++ b/docs/ru-RU/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[Вернуться к пресетам](./README.md#gruvbox-rainbow) + +# Пресет Gruvbox Rainbow + +Этот пресет в значительной степени вдохновлен [Pastel Powerline](./pastel-powerline.md) и [Tokyo Night](./tokyo-night.md). + +![Скриншот пресета Gruvbox Rainbow](/presets/img/gruvbox-rainbow.png) + +### Обязательные требования + +- Установленный и включенный шрифт [Nerd Font](https://www.nerdfonts.com/) в вашем терминале + +### Конфигурация + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[Нажмите, чтобы загрузить TOML](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/ru-RU/presets/jetpack.md b/docs/ru-RU/presets/jetpack.md new file mode 100644 index 000000000..5fc4fa800 --- /dev/null +++ b/docs/ru-RU/presets/jetpack.md @@ -0,0 +1,24 @@ +[Вернуться к пресетам](./README.md#jetpack) + +# Пресет Jetpack + +Это псевдоминималистичный пресет, вдохновленный приглашениями командной оболочки [geometry](https://github.com/geometry-zsh/geometry) и [spaceship](https://github.com/spaceship-prompt/spaceship-prompt). + +> Jetpack использует цветовую тему терминала. + +![Скриншот пресета Jetpack](/presets/img/jetpack.png) + +### Обязательные условия + +- Требуется оболочка с поддержкой [`правостороннего приглашения`](https://starship.rs/advanced-config/#enable-right-prompt). +- Рекомендуется [Jetbrains Mono](https://www.jetbrains.com/lp/mono/). + +### Конфигурация + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[Нажмите, чтобы загрузить TOML](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/ru-RU/presets/nerd-font.md b/docs/ru-RU/presets/nerd-font.md index 33592888c..956eee3fe 100644 --- a/docs/ru-RU/presets/nerd-font.md +++ b/docs/ru-RU/presets/nerd-font.md @@ -1,8 +1,8 @@ -[Return to Presets](./README.md#nerd-font-symbols) +[Вернуться к пресетам](./README.md#nerd-font-symbols) -# Nerd Font Symbols Preset +# Пресет Nerd Font Symbols -This preset changes the symbols for each module to use Nerd Font symbols. +Этот пресет изменяет символы для каждого модуля на символы Nerd Font. ![Скриншот предустановки Nerd Font Symbols](/presets/img/nerd-font-symbols.png) @@ -16,6 +16,6 @@ This preset changes the symbols for each module to use Nerd Font symbols. starship preset nerd-font-symbols -o ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/nerd-font-symbols.toml) +[Нажмите, чтобы загрузить TOML](/presets/toml/nerd-font-symbols.toml) <<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml diff --git a/docs/ru-RU/presets/no-empty-icons.md b/docs/ru-RU/presets/no-empty-icons.md index fbb175a21..66b00ce9f 100644 --- a/docs/ru-RU/presets/no-empty-icons.md +++ b/docs/ru-RU/presets/no-empty-icons.md @@ -1,10 +1,10 @@ -[Return to Presets](./README.md#no-empty-icons) +[Вернуться к пресетам](./README.md#no-empty-icons) -# No Empty Icons Preset +# Пресет No Empty Icons -If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined. +Если файлы набора инструментов найдены, то отображается икнока набора инструментов. Если набор инструментов не найден и нельзя определить номер его версии, то он не отображается. Этот пресет изменяет поведение так, чтобы значок отображался только в том случае, если информация о наборе инструментов может быть определена. -![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) +![Скриншот пресета No Empty Icons](/presets/img/no-empty-icons.png) ### Конфигурация @@ -12,6 +12,6 @@ If toolset files are identified the toolset icon is displayed. If the toolset is starship preset no-empty-icons -o ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/no-empty-icons.toml) +[Нажмите, чтобы загрузить TOML](/presets/toml/no-empty-icons.toml) <<< @/.vuepress/public/presets/toml/no-empty-icons.toml diff --git a/docs/ru-RU/presets/no-nerd-font.md b/docs/ru-RU/presets/no-nerd-font.md index d236d11d3..d09097118 100644 --- a/docs/ru-RU/presets/no-nerd-font.md +++ b/docs/ru-RU/presets/no-nerd-font.md @@ -1,12 +1,12 @@ -[Return to Presets](./README.md#no-nerd-fonts) +[Вернуться к пресетам](./README.md#no-nerd-fonts) -# No Nerd Fonts Preset +# Пресет No Nerd Fonts -This preset restricts the use of symbols to those from emoji and powerline sets. +Данный пресет ограничивает использование символов только символами из наборов emoji и powerline. -This means that even without a Nerd Font installed, you should be able to view all module symbols. +Это означает, что даже без установленного шрифта Nerd Font вы сможете увидеть все символы модулей. -This preset will become the default preset in a future release of starship. +Этот пресет станет пресетом по умолчанию в одном из будущих релизов Starship. ### Конфигурация @@ -14,6 +14,6 @@ This preset will become the default preset in a future release of starship. starship preset no-nerd-font -o ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/no-nerd-font.toml) +[Нажмите, чтобы загрузить TOML](/presets/toml/no-nerd-font.toml) <<< @/.vuepress/public/presets/toml/no-nerd-font.toml diff --git a/docs/ru-RU/presets/no-runtimes.md b/docs/ru-RU/presets/no-runtimes.md index 03d834673..5d35fda2d 100644 --- a/docs/ru-RU/presets/no-runtimes.md +++ b/docs/ru-RU/presets/no-runtimes.md @@ -1,10 +1,10 @@ -[Return to Presets](./README.md#no-runtime-versions) +[Вернуться к пресетам](./README.md#no-runtime-versions) -# No Runtime Versions Preset +# Пресет No Runtime Versions -This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you! +Этот пресет скрывает версии сред выполнения языков программирования. Если вы работаете с контейнерами или виртуализированными средами, то этот пресет для вас! -![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png) +![Скриншот пресета Hide Runtime Versions](/presets/img/no-runtime-versions.png) ### Конфигурация @@ -12,6 +12,6 @@ This preset hides the version of language runtimes. If you work in containers or starship preset no-runtime-versions -o ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/no-runtime-versions.toml) +[Нажмите, чтобы загрузить TOML](/presets/toml/no-runtime-versions.toml) <<< @/.vuepress/public/presets/toml/no-runtime-versions.toml diff --git a/docs/ru-RU/presets/pastel-powerline.md b/docs/ru-RU/presets/pastel-powerline.md index 71cb8972e..cb4b13e49 100644 --- a/docs/ru-RU/presets/pastel-powerline.md +++ b/docs/ru-RU/presets/pastel-powerline.md @@ -1,14 +1,14 @@ -[Return to Presets](./README.md#pastel-powerline) +[Вернуться к пресетам](./README.md#pastel-powerline) -# Pastel Powerline 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. +Этот пресет вдохновлен [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). В нем также показано, как работает замена пути в starship. -![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png) +![Скриншот пресета Pastel Powerline](/presets/img/pastel-powerline.png) ### Обязательные требования -- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Caskaydia Cove Nerd Font) +- Установленный и включенный в терминале шрифт [Nerd Font](https://www.nerdfonts.com/) (в примере используется Caskaydia Cove Nerd Font) ### Конфигурация @@ -16,6 +16,6 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m starship preset pastel-powerline -o ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/pastel-powerline.toml) +[Нажмите, чтобы загрузить TOML](/presets/toml/pastel-powerline.toml) <<< @/.vuepress/public/presets/toml/pastel-powerline.toml diff --git a/docs/ru-RU/presets/plain-text.md b/docs/ru-RU/presets/plain-text.md index bbc602b16..ff106c344 100644 --- a/docs/ru-RU/presets/plain-text.md +++ b/docs/ru-RU/presets/plain-text.md @@ -1,10 +1,10 @@ -[Return to Presets](./README.md#plain-text-symbols) +[Вернуться к пресетам](./README.md#plain-text-symbols) -## Plain Text Symbols Preset +## Пресет Plain Text Symbols -This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode. +Этот пресет изменяет символы для каждого модуля на обычный текст. Отлично подходит, если у вас нет возможности использовать Unicode. -![Screenshot of Plain Text Symbols preset](/presets/img/plain-text-symbols.png) +![Скриншот пресета Plain Text Symbols](/presets/img/plain-text-symbols.png) ### Конфигурация @@ -12,6 +12,6 @@ This preset changes the symbols for each module into plain text. Great if you do starship preset plain-text-symbols -o ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/plain-text-symbols.toml) +[Нажмите, чтобы загрузить TOML](/presets/toml/plain-text-symbols.toml) <<< @/.vuepress/public/presets/toml/plain-text-symbols.toml diff --git a/docs/ru-RU/presets/pure-preset.md b/docs/ru-RU/presets/pure-preset.md index 8268f59a8..9d9ddf5dc 100644 --- a/docs/ru-RU/presets/pure-preset.md +++ b/docs/ru-RU/presets/pure-preset.md @@ -1,10 +1,10 @@ -[Return to Presets](./README.md#pure) +[Вернуться к пресетам](./README.md#pure) -# Pure Preset +# Пресет Pure -This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). +Этот пресет имитирует внешний вид и поведение [Pure](https://github.com/sindresorhus/pure). -![Screenshot of Pure preset](/presets/img/pure-preset.png) +![Скриншот пресета Pure](/presets/img/pure-preset.png) ### Конфигурация @@ -12,6 +12,6 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso starship preset pure-preset -o ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/pure-preset.toml) +[Нажмите, чтобы загрузить TOML](/presets/toml/pure-preset.toml) <<< @/.vuepress/public/presets/toml/pure-preset.toml diff --git a/docs/ru-RU/presets/tokyo-night.md b/docs/ru-RU/presets/tokyo-night.md index 0735f82fa..ba0c0fb5f 100644 --- a/docs/ru-RU/presets/tokyo-night.md +++ b/docs/ru-RU/presets/tokyo-night.md @@ -1,10 +1,10 @@ -[Return to Presets](./README.md#pastel-powerline) +[Вернуться к пресетам](./README.md#pastel-powerline) -# Tokyo Night Preset +# Пресет Tokyo Night -This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). +Этот пресет вдохновлен [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). -![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) +![Скриншот пресета Tokyo Night](/presets/img/tokyo-night.png) ### Обязательные требования @@ -16,6 +16,6 @@ This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/t starship preset tokyo-night -o ~/.config/starship.toml ``` -[Click to download TOML](/presets/toml/tokyo-night.toml) +[Нажмите, чтобы загрузить TOML](/presets/toml/tokyo-night.toml) <<< @/.vuepress/public/presets/toml/tokyo-night.toml diff --git a/docs/tr-TR/config/README.md b/docs/tr-TR/config/README.md index 9ac9e8407..6c01d99bb 100644 --- a/docs/tr-TR/config/README.md +++ b/docs/tr-TR/config/README.md @@ -206,6 +206,13 @@ This is the list of prompt-wide configuration options. | `add_newline` | `true` | Inserts blank line between shell prompts. | | `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: ### Example @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### Options | Option | Default | Description | @@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. | | `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | | `stil` | `'bold yellow'` | The style for the module. | -| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | +| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu ### Options -| Option | Default | Description | -| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'C '` | The symbol used before displaying the compiler details | -| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | -| `stil` | `'bold 149'` | The style for the module. | -| `disabled` | `false` | Disables the `c` module. | +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | +| `stil` | `'bold 149'` | The style for the module. | +| `disabled` | `false` | Disables the `c` module. | ### Variables @@ -671,7 +683,7 @@ The character will tell you whether the last command was successful or not. It c By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). -::: warning +::: uyarı `vimcmd_symbol` yalnızca cmd, fish ve zsh'de desteklenir. `vimcmd_replace_one_symbol`, `vimcmd_replace_symbol`, and `vimcmd_visual_symbol` are only supported in fish due to [upstream issues with mode detection in zsh](https://github.com/starship/starship/issues/625#issuecomment-732454148). @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `stil` | `'bold orange'` | The style for the module. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['.envrc']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbol | | Mirrors the value of option `symbol`. | +| style\* | `red bold` | Mirrors the value of option `style`. | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Docker Context The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). @@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `stil` | `'bold green'` | The style for the module. | -| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. | +| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | | `disabled` | `false` | Disables the `fennel` module. | @@ -1524,11 +1577,46 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------------ | ------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | +| `added_style` | `'bold green'` | The style for the added count. | +| `deleted_style` | `'bold red'` | The style for the deleted count. | +| `only_nonzero_diffs` | `true` | Render status only for changed items. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### Variables + +| Variable | Example | Description | +| ----------------- | ------- | ------------------------------------------- | +| added | `1` | The current number of added lines | +| deleted | `2` | The current number of deleted lines | +| added_style\* | | Mirrors the value of option `added_style` | +| deleted_style\* | | Mirrors the value of option `deleted_style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. -When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set. +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. ### Options @@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | Option | Default | Description | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol]($style) '` | The format for the module. | -| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `stil` | `"yellow bold"` | The style for the module. | +| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `stil` | `'yellow bold'` | The style for the module. | | `disabled` | `false` | Disables the `guix_shell` module. | ### Variables @@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `["gradle"]` | Which folders should trigger this module. | -| `stil` | `"bold bright-cyan"` | The style for the module. | +| `detect_folders` | `['gradle']` | Which folders should trigger this module. | +| `stil` | `'bold bright-cyan'` | The style for the module. | | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | Option | Default | Description | | ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. | -| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. | -| `stil` | `"bold fg:202"` | The style for the module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. | +| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. | +| `stil` | `'bold fg:202'` | The style for the module. | | `disabled` | `false` | Disables the `haxe` module. | ### Variables @@ -2107,14 +2195,15 @@ The `hostname` module shows the system hostname. ### Options -| Option | Default | Description | -| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | -| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | -| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation | -| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | -| `stil` | `'bold dimmed green'` | The style for the module. | -| `disabled` | `false` | Disables the `hostname` module. | +| Option | Default | Description | +| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | +| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | +| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation. | +| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | +| `stil` | `'bold dimmed green'` | The style for the module. | +| `disabled` | `false` | Disables the `hostname` module. | ### Variables @@ -2126,7 +2215,9 @@ The `hostname` module shows the system hostname. *: This variable can only be used as a part of a style string -### Example +### Examples + +#### Always show the hostname ```toml # ~/.config/starship.toml @@ -2138,6 +2229,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Hide the hostname in remote tmux sessions + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met: @@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc' ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. ::: tip @@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten ### Options +::: uyarı + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + | Option | Default | Description | | ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | | `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | | `stil` | `'cyan bold'` | The style for the module. | -| `context_aliases` | `{}` | Table of context aliases to display. | -| `user_aliases` | `{}` | Table of user aliases to display. | +| `context_aliases`* | `{}` | Table of context aliases to display. | +| `user_aliases`* | `{}` | Table of user aliases to display. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | +| `contexts` | `[]` | Customized styles and symbols for specific contexts. | | `disabled` | `true` | Disables the `kubernetes` module. | +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| Variable | Description | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `stil` | The style for the module when using this context. If not set, will use module's style. | +| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + ### Variables | Variable | Example | Description | @@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Regex Matching +#### Kubernetes Context specific config -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. - -Long and automatically generated cluster names can be identified and shortened using regular expressions: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Line Break @@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_folders` | `['node_modules']` | Which folders should trigger this module. | | `stil` | `'bold green'` | The style for the module. | | `disabled` | `false` | Disables the `nodejs` module. | -| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | +| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables @@ -2890,8 +3021,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Default | Description | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | The format for the module. | -| `stil` | `"bold white"` | The style for the module. | +| `format` | `'[$symbol]($style)'` | The format for the module. | +| `stil` | `'bold white'` | The style for the module. | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met: | `symbol` | `'🐍 '` | A format string representing the symbol of Python | | `stil` | `'yellow bold'` | The style for the module. | | `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `['py']` | Which extensions should trigger this module | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | @@ -3562,22 +3693,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `'bsh'` | A format string used to represent bash. | -| `fish_indicator` | `'fsh'` | A format string used to represent fish. | -| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | -| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | -| `ion_indicator` | `'ion'` | A format string used to represent ion. | -| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | -| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | -| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | -| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | -| `nu_indicator` | `'nu'` | A format string used to represent nu. | -| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | -| `format` | `'[$indicator]($style) '` | The format for the module. | -| `stil` | `'white bold'` | The style for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | Default | Description | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `stil` | `'white bold'` | The style for the module. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https: | Option | Default | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `stil` | `"bold blue"` | The style for the module. | +| `stil` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables this module. | ### Variables @@ -4009,6 +4141,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +By default, the module will be shown if any of the following conditions are met: + +- The current directory contains a `template.typ` file +- The current directory contains any `*.typ` file + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'t '` | A format string representing the symbol of Daml | +| `stil` | `'bold #0093A7'` | The style for the module. | +| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. | +| `detect_files` | `['template.typ']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `disabled` | `false` | Disables the `daml` module. | + +### Variables + +| Variable | Example | Description | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + ## Username The `username` module shows active user's username. The module will be shown if any of the following conditions are met: diff --git a/docs/tr-TR/faq/README.md b/docs/tr-TR/faq/README.md index 41bb2d391..1f8484406 100644 --- a/docs/tr-TR/faq/README.md +++ b/docs/tr-TR/faq/README.md @@ -120,3 +120,11 @@ If Starship was installed using the install script, the following command will d # Locate and delete the starship binary sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/tr-TR/guide/README.md b/docs/tr-TR/guide/README.md index a333bb59f..f7ddcd9d0 100644 --- a/docs/tr-TR/guide/README.md +++ b/docs/tr-TR/guide/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="@StarshipPrompt'u Twitter'da takip edin" /> + Stand With Ukraine

@@ -147,8 +152,6 @@ />

-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

@@ -288,7 +292,7 @@ eval "$(starship init bash)"
Cmd -Cmd ıle beraber [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) kullanmalısınız. `%LocalAppData%\clink\starship.lua` dosyasını belirtilen dizinde aşağıdaki kod içeriği olacak şekilde oluşturun: +Cmd ile beraber [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) kullanmalısınız. `%LocalAppData%\clink\starship.lua` dosyasını belirtilen dizinde aşağıdaki kod içeriği olacak şekilde oluşturun: ```lua load(io.popen('starship init cmd'):read("*a"))() diff --git a/docs/tr-TR/presets/README.md b/docs/tr-TR/presets/README.md index 79d72c95e..1c20e0383 100644 --- a/docs/tr-TR/presets/README.md +++ b/docs/tr-TR/presets/README.md @@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). [![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) diff --git a/docs/tr-TR/presets/gruvbox-rainbow.md b/docs/tr-TR/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..73c65357c --- /dev/null +++ b/docs/tr-TR/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#gruvbox-rainbow) + +# Gruvbox Rainbow Preset + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png) + +### Ön koşullar + +- Terminalinizde bir [Nerd Font](https://www.nerdfonts.com/) yüklü ve etkin olmalı + +### Yapılandırma + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/tr-TR/presets/jetpack.md b/docs/tr-TR/presets/jetpack.md new file mode 100644 index 000000000..ed7cbbbd0 --- /dev/null +++ b/docs/tr-TR/presets/jetpack.md @@ -0,0 +1,24 @@ +[Return to Presets](./README.md#jetpack) + +# Jetpack Preset + +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 uses the terminal's color theme. + +![Screenshot of Jetpack preset](/presets/img/jetpack.png) + +### Prerequisite + +- 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. + +### Yapılandırma + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/uk-UA/config/README.md b/docs/uk-UA/config/README.md index c41de0354..179a76eee 100644 --- a/docs/uk-UA/config/README.md +++ b/docs/uk-UA/config/README.md @@ -206,6 +206,13 @@ detect_extensions = ['ts', '!video.ts', '!audio.ts'] | `add_newline` | `true` | Вставити порожній рядок між командними рядками в оболонці. | | `palette` | `''` | Встановлює кольорову палітру використовуючи `palettes`. | | `palettes` | `{}` | Колекція кольорових палітр, для призначення [кольорів](/advanced-config/#style-strings) до назв визначених користувачем. Зверніть увагу, що кольорові палітри не можуть посилатися на їх власні визначення кольору. | +| `follow_symlinks` | `true` | Перевіряти символічні посилання чи вони посилаються на теки; використовується в таких модулях як git. | + +::: tip + +Якщо у вас є символічні посилання не мережеві файлові системи, зважте на встановлення `follow_symlink` у `false`. + +::: ### Приклад @@ -242,7 +249,7 @@ mustard = '#af8700' ```toml format = '$all' -# Є тотожним +# Which is equivalent to format = """ $username\ $hostname\ @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,6 +361,8 @@ format = '$all$directory$character' Під час використання [saml2aws](https://github.com/Versent/saml2aws) інформація про закінчення терміну дії, отримана з `~/.aws/credentials`, повертається до ключа `x_security_token_expires`. +Під час використання [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) профіль читається зі змінної `AWS_SSO_PROFILE`. + ### Параметри | Параметр | Стандартно | Опис | @@ -360,7 +372,7 @@ format = '$all$directory$character' | `region_aliases` | `{}` | Таблиця псевдонімів регіону для показу на додачу до назви AWS. | | `profile_aliases` | `{}` | Таблиця псевдонімів профілю для показу на додачу до назви AWS. | | `style` | `'bold yellow'` | Стиль модуля. | -| `expiration_symbol` | `X` | Символ, який показується, коли закінчився термін дії тимчасових облікових даних. | +| `expiration_symbol` | `'X'` | Символ, який показується, коли закінчився термін дії тимчасових облікових даних. | | `disabled` | `false` | Вимикає модуль `AWS`. | | `force_display` | `false` | Якщо `true`, інформація показується, навіть якщо `credentials`, `credential_process` або `sso_start_url` не вказано. | @@ -620,17 +632,17 @@ format = 'via [🍔 $version](bold green) ' ### Параметри -| Параметр | Стандартно | Опис | -| ------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | Формат рядка модуля. | -| `version_format` | `'v${raw}'` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` | -| `symbol` | `'C '` | Символ, який знаходиться перед інформацією про компілятор | -| `detect_extensions` | `['c', 'h']` | Які розширення повинні запускати цей модуль. | -| `detect_files` | `[]` | Які імена файлів мають запускати цей модуль. | -| `detect_folders` | `[]` | В яких теках цей модуль має запускатись. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | Як виявити компілятор | -| `style` | `'bold 149'` | Стиль модуля. | -| `disabled` | `false` | Вимикає модуль `c`. | +| Параметр | Стандартно | Опис | +| ------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | Формат рядка модуля. | +| `version_format` | `'v${raw}'` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` | +| `symbol` | `'C '` | Символ, який знаходиться перед інформацією про компілятор | +| `detect_extensions` | `['c', 'h']` | Які розширення повинні запускати цей модуль. | +| `detect_files` | `[]` | Які імена файлів мають запускати цей модуль. | +| `detect_folders` | `[]` | В яких теках цей модуль має запускатись. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | Як виявити компілятор | +| `style` | `'bold 149'` | Стиль модуля. | +| `disabled` | `false` | Вимикає модуль `c`. | ### Змінні @@ -643,7 +655,7 @@ format = 'via [🍔 $version](bold green) ' NB `версія` не має стандартного формату. -### Commands +### Команди Параметр `commands` отримує список команд для визначення версії та назви компілятора. @@ -673,7 +685,7 @@ format = 'via [$name $version]($style)' ::: warning -`vimcmd_symbol` працює лише з cmd, fish та zsh. `vimcmd_replace_one_symbol`, `vimcmd_replace_symbol`, and `vimcmd_visual_symbol` працює лише з fish через [проблемою визначення режиму роботи в zsh](https://github.com/starship/starship/issues/625#issuecomment-732454148). +`vimcmd_symbol` працює лише з cmd, fish та zsh. `vimcmd_replace_one_symbol`, `vimcmd_replace_symbol`, and `vimcmd_visual_symbol` працює лише з fish через [проблему визначення режиму роботи в zsh](https://github.com/starship/starship/issues/625#issuecomment-732454148). ::: @@ -789,15 +801,15 @@ vimcmd_symbol = '[V](bold green) ' ## Command Duration – час виконання -Модуль `cmd_duration` показує, скільки часу виконувалась остання команда. Модуль буде показаний лише в тому випадку, якщо на виконання команди пішло понад дві секунди або більше, ніж значення змінної `min_time`, якщо воно задане. +Модуль `cmd_duration` показує, скільки часу виконувалась остання команда. Модуль буде показаний лише в тому випадку, якщо на виконання команди пішло понад дві секунди або більше, ніж значення змінної `min_time`, якщо воно задане. ::: warning Не вмикайте DEBUG trap в Bash -Якщо ви запускаєте Starship у `bash`, не вмикайте `DEBUG` trap після запуску `eval $(starship init $0)`, або цей модуль **** не працюватиме. +Якщо ви запускаєте Starship у `bash`, не вмикайте `DEBUG trap` після запуску `eval $(starship init $0)`, бо цей модуль **не працюватиме**. ::: -Користувачі Bash, яким потрібна функція preexec, можуть використовувати [фреймворк bash_preexec від rcaloras](https://github.com/rcaloras/bash-preexec). Просто визначте масиви `preexec_function` і `precmd_functions` перед запуском `eval $(starship init $0)`, а потім продовжуй як зазвичай. +Користувачі Bash, яким потрібна функція preexec, можуть використовувати [фреймворк bash_preexec від rcaloras](https://github.com/rcaloras/bash-preexec). Просто визначте масиви `preexec_function` і `precmd_functions` перед запуском `eval $(starship init $0)`, а потім продовжуйте як зазвичай. ### Параметри @@ -837,7 +849,7 @@ format = 'underwent [$duration](bold yellow)' ::: tip -Це не призводить до придушення власного модифікатора командного рядка в conda. Можливо, вам доведеться виконати `conda config --set changeps1 False`. +Це не призводить до вимикання власного модифікатора командного рядка в conda. Можливо, вам доведеться виконати `conda config --set changeps1 False`. ::: @@ -944,7 +956,7 @@ format = 'via [✨ $version](bold blue) ' ## Daml -Модуль `daml` показує поточну версію SDK [Daml](https://www.digitalasset.com/developers), коли ви перебуваєте в кореневій теці проєкту Daml. `sdk-version` у файлі `daml.yaml` буде використовуватись, якщо значення не буде перевизначене змінною оточення `DAML_SDK_VERSION`. Типово, модуль показується, якщо виконується будь-яка з наступних умов: +Модуль `daml` показує поточну версію SDK <1">Daml, коли ви перебуваєте в кореневій теці проєкту Daml. `sdk-version` у файлі `daml.yaml` буде використовуватись, якщо значення не буде перевизначене змінною оточення `DAML_SDK_VERSION`. Типово, модуль показується, якщо виконується будь-яка з наступних умов: - Поточна тека містить файл `daml.yaml` @@ -1058,11 +1070,11 @@ format = 'via [🦕 $version](green bold) ' ## Directory -Модуль `directory` показує шлях до поточної теки, урізаючи його до трьох останніх батьківських тек. Шлях до теки також буде скорочений до кореня git-репозиторію, якому ви перебуваєте. +Модуль `directory` показує шлях до поточної теки, урізаючи його до трьох останніх батьківських тек. Шлях до теки також буде скорочений до кореня git-репозиторію, в якому ви перебуваєте. Якщо використовується параметр `fish_style_pwd_dir_length`, замість того, щоб приховувати скорочений шлях, ви побачите скорочену назву кожної теки в залежності від числа, яке ви вказали для цього параметра. -Наприклад, маємо `~/Dev/Nix/nixpkgs/pkgs` де `nixpkgs` є коренем репозиторію, а параметр — `1`. Ви побачите `~/D/N/nixpkgs/pkgs`, тоді як до цього було `nixpkgs/pkg`. +Наприклад, маємо `~/Dev/Nix/nixpkgs/pkgs` де `nixpkgs` є коренем репозиторію, а параметр — `1`. Ви побачите `~/D/N/nixpkgs/pkgs`, тоді як до цього було `nixpkgs/pkgs`. ### Параметри @@ -1091,7 +1103,7 @@ format = 'via [🦕 $version](green bold) ' | `fish_style_pwd_dir_length` | `0` | Кількість символів, які використовуються при застосуванні логіки шляху fish shell pwd. | | `use_logical_path` | `true` | Якщо `true` показувати логічний шлях оболонки через `PWD` або `--logical-path`. Якщо `false` – показувати шлях фізичної файлової системи з розвʼязанням шляхів для символічних посилань. | -`substitutions` дозволяє визначити довільні заміни літер рядків, що зустрічаються в шляху, наприклад, довга префікси мережа або теки розробки (в Java). Зауважте, що це відключить стиль fish у PWD. +`substitutions` дозволяє визначити довільні заміни літер рядків, що зустрічаються в шляху, наприклад, довгі префікси мережі або теки розробки (в Java). Зауважте, що це відключить стиль fish у PWD. ```toml [directory.substitutions] @@ -1099,7 +1111,7 @@ format = 'via [🦕 $version](green bold) ' 'src/com/long/java/path' = 'mypath' ``` -`fish_style_pwd_dir_length` взаємодіє зі стандартними опціями скорочення, по-перше, що може бути дивним, якщо значення не нуль, замість цього будуть показуватись компоненти шляху, які звичайно скорочені, зі вказаною кількістю символів. Наприклад, шлях `/built/this/on/on/rock/and/roll`, який зазвичай показуватиметься як `rock/and/roll`, буде показаний як `/b/t/c/o/rock/and/roll` з `fish_style_pwd_dir_length = 1` — шлях компонентів, які зазвичай вилучаються, показуються одним символом. Для `fish_style_pwd_dir_length = 2` це буде `/bu/th/ci/on/rock/and/roll`. +`fish_style_pwd_dir_length` взаємодіє зі стандартними опціями скорочення, по-перше, що може бути дивним, якщо значення не нуль, замість цього будуть показуватись компоненти шляху, які звичайно скорочені, зі вказаною кількістю символів. Наприклад, шлях `/built/this/city/on/rock/and/roll`, який зазвичай показуватиметься як `rock/and/roll`, буде показаний як `/b/t/c/o/rock/and/roll` з `fish_style_pwd_dir_length = 1` — шлях компонентів, які зазвичай вилучаються, показуються одним символом. Для `fish_style_pwd_dir_length = 2` це буде `/bu/th/ci/on/rock/and/roll`.
@@ -1137,9 +1149,50 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +Модуль `direnv` показує статус rc-файла якщо він існує. Статус включає: шлях до файлу rc, чи він завантажений та, чи `direnv` дозволяє його використання. + +### Параметри + +| Параметр | Стандартно | Опис | +| ------------------- | -------------------------------------- | ------------------------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | Формат модуля. | +| `symbol` | `'direnv '` | Символ, що показується перед direnv context. | +| `style` | `'bold orange'` | Стиль модуля. | +| `disabled` | `true` | Вимикає модуль `direnv`. | +| `detect_extensions` | `[]` | Які розширення повинні запускати цей модуль. | +| `detect_files` | `['.envrc']` | Які імена файлів мають запускати цей модуль. | +| `detect_folders` | `[]` | В яких теках цей модуль має запускатись. | +| `allowed_msg` | `'allowed'` | Повідомлення, що показується коли використання rc-файлу дозволене. | +| `denied_msg` | `'denied'` | Повідомлення, що показується коли використання rc-файлу заборонене. | +| `loaded_msg` | `'loaded'` | Повідомлення, що показується коли rc-файл завантажений. | +| `unloaded_msg` | `'not loaded'` | Повідомлення, що показується коли rc-файл не завантажений. | + +### Змінні + +| Змінна | Приклад | Опис | +| --------- | ------------------- | ----------------------------------------- | +| loaded | `loaded` | Чи завантажений rc-файл. | +| allowed | `denied` | Чи дозволене використання rc-файлу. | +| rc_path | `/home/test/.envrc` | Шлях до rc-файлу. | +| symbol | | Віддзеркалює значення параметра `symbol`. | +| style\* | `red bold` | Віддзеркалює значення параметра `style`. | + +*: Ця змінна може бути використана лише як частина стилю рядка + +### Приклад + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Docker Context -Модуль `docker_context` показує поточний [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) якщо його не встановлено у `default`, або якщо `DOCKER_MACHINE_NAME` `DOCKER_HOST` або `DOCKER_CONTEXT` змінні середовища встановлені (оскільки вони призначені для перевизначення контексту). +Модуль `docker_context` показує поточний [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) якщо його не встановлено у `default`, або якщо змінні середовища `DOCKER_MACHINE_NAME`, `DOCKER_HOST` або `DOCKER_CONTEXT` встановлені (оскільки вони призначені для перевизначення контексту). ### Параметри @@ -1177,7 +1230,7 @@ format = 'via [🐋 $context](blue bold)' Модуль `dotnet` показує відповідну версію [.NET Core SDK](https://dotnet.microsoft.com/) для поточної теки. Якщо SDK закріплена в поточній теці, показується закріплена версія. В іншому випадку модуль покаже останню встановлену версію SDK. -Стандартно модуль буде показаний в командному рядку, коли один чи більше з наступних файлів є в теці: +Стандартно модуль буде показаний в командному рядку, коли в теці присутні один чи більше наступних файлів: - `global.json` - `project.json` @@ -1190,9 +1243,9 @@ format = 'via [🐋 $context](blue bold)' Вам також знадобиться .NET Core SDK, встановлений для того, щоб використовувати його правильно. -Всередині, цей модуль використовує власний механізм для виявлення версій. Як правило, він удвічі швидший ніж запуск `dotnet --version`, але він може показувати некоректну версію, якщо ваш проєкт .NET має не звичайне розташування тек. Якщо точність важливіша за швидкість, ви можете вимкнути механізм встановивши `heuristic = false` в налаштуваннях модуля. +Всередині, цей модуль використовує власний механізм для виявлення версій. Як правило, він удвічі швидший ніж запуск `dotnet --version`, але він може показувати некоректну версію, якщо ваш проєкт .NET має незвичайне розташування тек. Якщо точність важливіша за швидкість, ви можете вимкнути механізм встановивши `heuristic = false` в налаштуваннях модуля. -Модуль також показуватиме Target Framework Monamework ([https://docs.microsoft. om/en-us/dotnet/standard/frameworks#supported-target-frameworks](https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-frameworks)), коли у поточній теці є файл `.csproj`. +Модуль також показуватиме Target Framework Monamework (), коли у поточній теці є файл `.csproj`. ### Параметри @@ -1232,7 +1285,7 @@ heuristic = false ## Elixir -Модуль `elixir` показує поточну встановлену версію [Elixir](https://elixir-lang.org/) та [Erlang/OTP](https://erlang.org/doc/). Типово, модуль показується, якщо виконується будь-яка з наступних умов: +Модуль `elixir` показує поточну встановлену версію [Elixir](https://elixir-lang.org/) та <2">Erlang/OTP. Типово, модуль показується, якщо виконується будь-яка з наступних умов: - Поточна тека містить файл `mix.exs`. @@ -1320,13 +1373,13 @@ format = 'via [ $version](cyan bold) ' ::: tip -Порядок в якому модуль env_var показується може встановлюватись індивідуально додавання `${env_var.foo}` в `format` верхнього рівня (через те, що використовуються крапки, потрібно використовувати `${...}`). Типово, модуль `env_var` покаже усі модулі env_var, в тому порядку того, як вони були визначені. +Порядок в якому модуль env_var показується може встановлюватись індивідуально додаванням `${env_var.foo}` в `format` верхнього рівня (через те, що використовуються крапки, потрібно використовувати `${...}`). Типово, модуль `env_var` покаже усі модулі env_var, в тому порядку, в якому вони були визначені. ::: ::: tip -Кілька змінних оточення можуть бути показані за допомоги `.`. (див. приклад) Якщо опції конфігурації `variable` не встановлено, модуль показуватиме значення змінної після символу `.` під назвою. +Кілька змінних оточення можуть бути показані за допомоги `.`. (див. приклад) Якщо параметр конфігурації `variable` не встановлено, модуль показуватиме значення змінної під назвою тексту після символу `.`. Приклад: наступна конфігурація показуватиме значення змінної середовища USER @@ -1435,7 +1488,7 @@ format = 'via [e $version](bold red) ' | `version_format` | `'v${raw}'` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` | | `symbol` | `'🧅 '` | Символ, який знаходиться перед версією fennel. | | `style` | `'bold green'` | Стиль модуля. | -| `detect_extensions` | `[fnl]` | Які розширення повинні запускати цей модуль. | +| `detect_extensions` | `['fnl']` | Які розширення повинні запускати цей модуль. | | `detect_files` | `[]` | Які імена файлів мають запускати цей модуль. | | `detect_folders` | `[]` | Які теки мають запускати цей модуль. | | `disabled` | `false` | Вимикає модуль `fennel`. | @@ -1524,6 +1577,41 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +Модуль `fossil_metrics` покаже кількість доданих та видалених рядків у поточній теці. Потрібна версія Fossil не нижче v2.14 (2021-01-20). + +### Параметри + +| Параметр | Стандартно | Опис | +| -------------------- | ------------------------------------------------------------ | -------------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Формат модуля. | +| `added_style` | `'bold green'` | Стиль для показу кількості доданих рядків. | +| `deleted_style` | `'bold red'` | Стиль для показу кількості видалених рядків. | +| `only_nonzero_diffs` | `true` | Показувати стан лише для змінених елементів. | +| `disabled` | `true` | Вимикає модуль `fossil_metrics`. | + +### Змінні + +| Змінна | Приклад | Опис | +| ----------------- | ------- | ----------------------------------------------- | +| added | `1` | Поточна кількість доданих рядків | +| deleted | `2` | Поточна кількість видалених рядків | +| added_style\* | | Віддзеркалює значення параметра `added_style` | +| deleted_style\* | | Віддзеркалює значення параметра `deleted_style` | + +*: Ця змінна може бути використана лише як частина стилю рядка + +### Приклад + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) Модуль `gcloud` показує поточну конфігурацію [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. Він базується на файлі `~/.config/gcloud/active_config` та на `~/.config/gcloud/configurations/config_{CONFIG NAME}` і на змінній оточення `CLOUDSDK_CONFIG`. @@ -1681,7 +1769,7 @@ tag_symbol = '🔖 ' ## Git State -Модуль `git_state` показується в теках, які є частиною репозиторію git, під час виконання операцій на зразок _REBASING_, _BISECTING тощо. Інформація про прогрес операції (наприклад, REBASING 3/10), також буде показана якщо вона доступна.

+Модуль `git_state` показується в теках, які є частиною репозиторію git, під час виконання операцій на зразок _REBASING_, _BISECTING_ тощо. Якщо є інформація про прогрес (наприклад, REBASING 3/10), ця інформація також буде показана. ### Параметри @@ -1725,7 +1813,7 @@ cherry_pick = '[🍒 PICKING](bold red)' ::: tip -За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. +Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. ::: @@ -1767,7 +1855,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' ::: tip -Модуль Git Status дуже повільно працює в теках Windows у середовищі WSL (наприклад, під `/mnt/c/`). Ви можете вимкнути модуль або використати `windows_starship` для використання Windows-native Starship `git_status` для цих шляхів. +Модуль Git Status дуже повільно працює в теках Windows у середовищі WSL (наприклад, під `/mnt/c/`). Ви можете вимкнути модуль або використати `windows_starship` для використання Windows-версії Starship для тримання `git_status` для цих шляхів. ::: @@ -1931,8 +2019,8 @@ format = 'via [$symbol($version )($mod_version )]($style)' | Параметр | Стандартно | Опис | | ---------- | -------------------------- | ----------------------------------------------- | | `format` | `'via [$symbol]($style) '` | Формат модуля. | -| `symbol` | `"🐃 "` | Формат рядка, що представляє символ guix-shell. | -| `style` | `"yellow bold"` | Стиль модуля. | +| `symbol` | `'🐃 '` | Формат рядка, що представляє символ guix-shell. | +| `style` | `'yellow bold'` | Стиль модуля. | | `disabled` | `false` | Вимикає модуль `guix_shell`. | ### Змінні @@ -1969,13 +2057,13 @@ format = 'via [🐂](yellow bold) ' | Параметр | Стандартно | Опис | | ------------------- | ------------------------------------ | ----------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` | -| `symbol` | `"🅶 "` | Формат рядка, що представляє символ Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | Які розширення повинні запускати цей модуль. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` | +| `symbol` | `'🅶 '` | Формат рядка, що представляє символ Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Які розширення повинні запускати цей модуль. | | `detect_files` | `[]` | Які імена файлів мають запускати цей модуль. | -| `detect_folders` | `["gradle"]` | В яких теках цей модуль має запускатись. | -| `style` | `"bold bright-cyan"` | Стиль модуля. | +| `detect_folders` | `['gradle']` | В яких теках цей модуль має запускатись. | +| `style` | `'bold bright-cyan'` | Стиль модуля. | | `disabled` | `false` | Вимикає модуль `gradle`. | | `recursive` | `false` | Дозволяє рекурсивний пошук теки `gradle`. | @@ -2034,13 +2122,13 @@ format = 'via [🐂](yellow bold) ' | Параметр | Стандартно | Опис | | ------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${raw}"` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` | -| `detect_extensions` | `["hx", "hxml"]` | Які розширення повинні запускати цей модуль. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Які імена файлів мають запускати цей модуль. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Які теки мають запускати цей модуль. | -| `symbol` | `"⌘ "` | Формат рядка, що представляє символ Helm. | -| `style` | `"bold fg:202"` | Стиль модуля. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Які розширення повинні запускати цей модуль. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Які імена файлів мають запускати цей модуль. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Які теки мають запускати цей модуль. | +| `symbol` | `'⌘ '` | Формат рядка, що представляє символ Helm. | +| `style` | `'bold fg:202'` | Стиль модуля. | | `disabled` | `false` | Вимикає модуль `haxe`. | ### Змінні @@ -2107,14 +2195,15 @@ format = 'via [⎈ $version](bold white) ' ### Параметри -| Параметр | Стандартно | Опис | -| ------------ | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `ssh_only` | `true` | Показувати назву хоста лише при підключенні через SSH. | -| `ssh_symbol` | `'🌐 '` | Формат рядка для показу символу підключення до SSH-сеансу. | -| `trim_at` | `'.'` | Рядок, у якому назва хоста буде обрізано після першого збігу. `'.'` зупиниться після першої точки. `''` вимкне будь-яке скорочення | -| `format` | `'[$ssh_symbol$hostname]($style) in '` | Формат модуля. | -| `style` | `'bold dimmed green'` | Стиль модуля. | -| `disabled` | `false` | Вимикає модуль `hostname`. | +| Параметр | Стандартно | Опис | +| ----------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | Показувати назву хоста лише при підключенні через SSH. | +| `ssh_symbol` | `'🌐 '` | Формат рядка для показу символу підключення до SSH-сеансу. | +| `trim_at` | `'.'` | Рядок, у якому назва хоста буде обрізано після першого збігу. `'.'` зупиниться після першої точки. `''` вимкне будь-яке скорочення. | +| `detect_env_vars` | `[]` | Які змінні середовища повинні запускати цей модуль. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | Формат модуля. | +| `style` | `'bold dimmed green'` | Стиль модуля. | +| `disabled` | `false` | Вимикає модуль `hostname`. | ### Змінні @@ -2126,7 +2215,9 @@ format = 'via [⎈ $version](bold white) ' *: Ця змінна може бути використана лише як частина стилю рядка -### Приклад +### Приклади + +#### Завжди показувати hostname ```toml # ~/.config/starship.toml @@ -2138,6 +2229,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Приховувати hostname для віддалених сеансів tmux + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java Модуль `java` показує поточну встановлену версію [Java](https://www.oracle.com/java/). Типово, модуль показується, якщо виконується будь-яка з наступних умов: @@ -2211,7 +2313,7 @@ symbol = '🌟 ' | `style` | `'bold blue'` | Стиль модуля. | | `disabled` | `false` | Вимикає модуль `jobs`. | -*: Цей параметр застарів, використовуйте параметри `number_threshold` і `symbol_threshold` замість цього. +*: Цей параметр застарів, використовуйте параметри `number_threshold` та `symbol_threshold` замість цього. ### Змінні @@ -2327,7 +2429,7 @@ kotlin_binary = 'kotlinc' ::: tip -За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. +Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. Коли модуль увімкнено, він завжди буде активним, якщо будь-який з параметрів `detect_extensions`, `detect_files` або `detect_folders` встановлені, модуль буде активним тільки в теках, що відповідають умовам. @@ -2335,17 +2437,39 @@ kotlin_binary = 'kotlinc' ### Параметри -| Параметр | Стандартно | Опис | -| ------------------- | ---------------------------------------------------- | -------------------------------------------- | -| `symbol` | `'☸ '` | Символ, що показується перед Кластером. | -| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | Формат модуля. | -| `style` | `'cyan bold'` | Стиль модуля. | -| `context_aliases` | `{}` | Таблиця контекстних псевдонімів. | -| `user_aliases` | `{}` | Таблиця псевдонімів користувача. | -| `detect_extensions` | `[]` | Які розширення повинні запускати цей модуль. | -| `detect_files` | `[]` | Які імена файлів мають запускати цей модуль. | -| `detect_folders` | `[]` | Які теки мають запускати цей модуль. | -| `disabled` | `true` | Вимикає модуль `kubernetes`. | +::: warning + +Параметри `context_aliases` та `user_aliases` є застарілими. Використовуйте `contexts` та, відповідно, `context_alias` та `user_alias`, натомість. + +::: + +| Параметр | Стандартно | Опис | +| ------------------- | ---------------------------------------------------- | --------------------------------------------------------- | +| `symbol` | `'☸ '` | Символ, що показується перед Кластером. | +| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | Формат модуля. | +| `style` | `'cyan bold'` | Стиль модуля. | +| `context_aliases`* | `{}` | Таблиця контекстних псевдонімів. | +| `user_aliases`* | `{}` | Таблиця псевдонімів користувача. | +| `detect_extensions` | `[]` | Які розширення повинні запускати цей модуль. | +| `detect_files` | `[]` | Які імена файлів мають запускати цей модуль. | +| `detect_folders` | `[]` | Які теки мають запускати цей модуль. | +| `contexts` | `[]` | Кастомізовані стилі та символи для конкретних контекстів. | +| `disabled` | `true` | Вимикає модуль `kubernetes`. | + +*: Цей параметр є застарілими, додайте `contexts`, відповідно, `context_alias` та `user_alias`, натомість. + +Для налаштування стилю модуля для конкретних середовищ використовуйте наступну конфігурацію як частину списку `contexts`: + +| Змінна | Опис | +| ----------------- | --------------------------------------------------------------------------------------------------------- | +| `context_pattern` | **Обовʼязково** Регулярний вираз, що повертає збіг з назвою поточного контексту Kubernetes. | +| `user_pattern` | Регулярний вираз, що відповідає поточному імені користувача Kubernetes. | +| `context_alias` | Псевдонім контексту для показу замість назви повного контексту. | +| `user_alias` | Псевдонім користувача для показу замість повного імені користувача. | +| `style` | Стиль для модуля, при використанні цього контексту. Якщо не вказано, використовуватиметься стиль модуля. | +| `symbol` | Символ для модуля при використанні цього контексту. Якщо не вказано, використовуватиметься символ модуля. | + +Зверніть увагу, що всі регулярні вирази виглядають як `^$` і мають збігатись з усім рядком. Регулярний вираз `*_pattern` може мати групи, які можуть зазначатись у відповідних аліасах як `$name` та `$N` (дивіться приклад нижче та [документації rust Regex::replace()](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). ### Змінні @@ -2368,13 +2492,9 @@ kotlin_binary = 'kotlinc' [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Показує модуль лише у теках, що містять файл `k8s`. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Регулярні вирази +#### Kubernetes Context спец налаштування -Крім простого псевдоніма, `context_aliases` і `user_aliases` також підтримують розширене зіставлення та перейменування за допомогою регулярних виразів. - -Регулярний вираз має збігатися в усьому kube context, на групи захоплення можна посилатися за допомогою `$name` і `$N` при заміні. Трохи більше пояснень в документації [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace). - -Довгі автоматично згенеровані назви кластерів можуть бути визначені та скорочені за допомогою регулярних виразів: +Параметр `contexts` використовується для налаштування того, як виглядає назва контексту Kubernetes (стиль та символ), якщо назва збігається з визначеною регулярним виразом. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml -# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. -# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) -# and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +[[kubernetes.contexts]] +# стиль "bold red" + типовий символ, коли назва поточного контексту Kubernetes збігається з "production" *та* поточний користувач +# збігається з "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# стиль "green" + інший символ, коли назва поточного контексту Kubernetes містить openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Використання груп +# Контекст з GKE, AWS та інших хмарних постачальників зазвичай має додаткову інформацію, наприклад регіон/зону. +# Наступний елемент збігається з форматом GKE format (`gke_projectname_zone_cluster-name`) +# та змінює кожний відповідний kube context на більш зрозумілий формат (`gke-cluster-name`): +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Line Break @@ -2509,7 +2640,7 @@ format = 'via [🌕 $version](bold blue) ' ::: tip -За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. +Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. ::: @@ -2730,7 +2861,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' | `detect_folders` | `['node_modules']` | В яких теках цей модуль має запускатись. | | `style` | `'bold green'` | Стиль модуля. | | `disabled` | `false` | Вимикає модуль `nodejs`. | -| `not_capable_style` | `bold red` | Стиль для модуля, коли версія рушія у package.json не відповідає версії Node.js. | +| `not_capable_style` | `'bold red'` | Стиль для модуля, коли версія рушія у package.json не відповідає версії Node.js. | ### Змінні @@ -2882,7 +3013,7 @@ symbol = '☁️ ' ::: tip -За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. +Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. ::: @@ -2890,12 +3021,12 @@ symbol = '☁️ ' | Параметр | Стандартно | Опис | | ---------- | --------------------- | ------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | Формат модуля. | -| `style` | `"bold white"` | Стиль модуля. | +| `format` | `'[$symbol]($style)'` | Формат модуля. | +| `style` | `'bold white'` | Стиль модуля. | | `disabled` | `true` | Вимикає модуль `os`. | | `symbols` | | Таблиця символів для кожної операційної системи. | -`symbols` дозволяє визначити довільні символи для кожного типу операційної системи. Типи операційних систем не визначені вашою конфігурацією, використовують стандартну таблицю символів, дивись нижче. На цю мить усі операційні системи, що підтримуються модулем, перераховані нижче. Якщо ви бажаєте додати операційну систему, то можете створити [запит на функцію](https://github.com/starship/starship/issues/new/choose). +`symbols` дозволяє визначити довільні символи для кожного типу операційної системи. Типи операційних систем не визначені вашою конфігурацією, використовують стандартну таблицю символів, дивись нижче. На цю мить усі операційні системи, що підтримуються модулем, перераховані нижче. Якщо ви бажаєте додати операційну систему, то можете створити [відповідний запит](https://github.com/starship/starship/issues/new/choose). ```toml # Це таблиця стандартних символів. @@ -2974,7 +3105,7 @@ Arch = "Arch is the best! " ## Package Version -Модуль `package` показується, коли поточна тека є сховищем для пакунка, і показує його поточну версію. Наразі модуль підтримує такі пакунки: `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` and `dart`. +Модуль `package` показується, коли поточна тека є сховищем для пакунка, і показує його поточну версію. Наразі модуль підтримує такі пакунки: `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` та `dart`. - [**npm**](https://docs.npmjs.com/cli/commands/npm) — версія пакунка `npm` отримується з `package.json` з поточної теки - [**Cargo**](https://doc.rust-lang.org/cargo/) — версія пакунка `cargo` отримується з `Cargo.toml` з поточної теки @@ -3127,7 +3258,7 @@ format = 'via [🔹 $version](147 bold) ' ::: tip -За замовчуванням, версія Pulumi не показана, тому що отримання версії потребує на порядок більше часу, ніж потрібно іншим плагінам (близько 70мc). Якщо ви все ще хочете увімкнути показ версії, [дивіться приклад нижче](#with-pulumi-version). +Стандартно версія Pulumi не показується, через те що для цього потрібно набагато більше часу ніж на завантаження більшості втулків (~70ms). Якщо ви все ще хочете увімкнути показ версії, [дивіться приклад нижче](#with-pulumi-version). ::: @@ -3245,7 +3376,7 @@ format = 'via [$symbol$version](bold white)' | `symbol` | `'🐍 '` | Формат рядка, що представляє символ Python | | `style` | `'yellow bold'` | Стиль модуля. | | `pyenv_version_name` | `false` | Використовувати pyenv для отримання версії Python | -| `pyenv_prefix` | `pyenv` | Префікс перед версією pyenv, показується якщо pyenv використовується | +| `pyenv_prefix` | `'pyenv'` | Префікс перед версією pyenv, показується якщо pyenv використовується | | `python_binary` | `['python', 'python3', 'python2']` | Налаштовує бінарні файли python, який Starship буде використовувати для отримання версії. | | `detect_extensions` | `['py']` | Які розширення повинні запускати цей модуль | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Назви файлів, які активують модуль | @@ -3254,7 +3385,7 @@ format = 'via [$symbol$version](bold white)' ::: tip -Змінна `python_binary` приймає як рядок, так список рядків. Starship спробує запустити кожен бінарний файл, поки це не дасть результат. Зауважте, що можна змінити двійковий файл, який використовується Starship, щоб отримати версію Python, а не параметрів, які використовуються. +Змінна `python_binary` приймає як рядок, так і список рядків. Starship спробує запустити кожен бінарний файл, поки це не дасть результат. Зауважте, що можна змінити двійковий файл, який використовується Starship, щоб отримати версію Python, а не параметрів, які використовуються. Стандартні значення та порядок для `python_binary` було вибрано так, щоб спочатку ідентифікувати версію Python у середовищах virtualenv/conda (які наразі все ще додають `python`, незалежно від того, чи вказує він на `python3` чи на `python2`). Це може мати побічний ефект: якщо у вас все ще встановлено системний Python 2, він може бути обраний перед будь-яким Python 3 (принаймні в дистрибутивах Linux, які завжди містять символічне посилання `/usr/bin/python` на Python 2). Якщо ви більше не працюєте з Python 2, але не можете видалити системний Python 2, змінивши його на `'python3'`, ви приховаєте будь-яку версію Python 2, див. приклад нижче. @@ -3284,7 +3415,7 @@ pyenv_version_name = true # ~/.config/starship.toml [python] -# Використання лише двійкового файлу `python3` для отримання версії. +# Використання лише `python3` для отримання версії. python_binary = 'python3' ``` @@ -3556,28 +3687,29 @@ symbol = '🌟 ' ::: tip -За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. +Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. ::: ### Параметри -| Параметр | Стандартно | Опис | -| ---------------------- | ------------------------- | -------------------------------------------------------------- | -| `bash_indicator` | `'bsh'` | Формат рядка, що використовується для bash. | -| `fish_indicator` | `'fsh'` | Формат рядка, що використовується для fish. | -| `zsh_indicator` | `'zsh'` | Формат рядка, що використовується для zsh. | -| `powershell_indicator` | `'psh'` | Формат рядка, що використовується для powershell. | -| `ion_indicator` | `'ion'` | Формат рядка, що використовується для ion. | -| `elvish_indicator` | `'esh'` | Формат рядка, що використовується для elvish. | -| `tcsh_indicator` | `'tsh'` | Формат рядка, що використовується для tcsh. | -| `xonsh_indicator` | `'xsh'` | Формат рядка, що використовується для xonsh. | -| `cmd_indicator` | `'cmd'` | Формат рядка, що використовується для cmd. | -| `nu_indicator` | `'nu'` | Формат рядка, що використовується для nu. | -| `unknown_indicator` | `''` | Типове значення, що буде показане, якщо оболонка не визначена. | -| `format` | `'[$indicator]($style) '` | Формат модуля. | -| `style` | `'white bold'` | Стиль модуля. | -| `disabled` | `true` | Вимикає модуль `shell`. | +| Параметр | Стандартно | Опис | +| ---------------------- | ------------------------- | --------------------------------------------------------------------------------------------------------- | +| `bash_indicator` | `'bsh'` | Формат рядка, що використовується для bash. | +| `fish_indicator` | `'fsh'` | Формат рядка, що використовується для fish. | +| `zsh_indicator` | `'zsh'` | Формат рядка, що використовується для zsh. | +| `powershell_indicator` | `'psh'` | Формат рядка, що використовується для powershell. | +| `pwsh_indicator` | | Формат рядка, що використовується для pwsh. Типове значення віддзеркалює значення `powershell_indicator`. | +| `ion_indicator` | `'ion'` | Формат рядка, що використовується для ion. | +| `elvish_indicator` | `'esh'` | Формат рядка, що використовується для elvish. | +| `tcsh_indicator` | `'tsh'` | Формат рядка, що використовується для tcsh. | +| `xonsh_indicator` | `'xsh'` | Формат рядка, що використовується для xonsh. | +| `cmd_indicator` | `'cmd'` | Формат рядка, що використовується для cmd. | +| `nu_indicator` | `'nu'` | Формат рядка, що використовується для nu. | +| `unknown_indicator` | `''` | Типове значення, що буде показане, якщо оболонка не визначена. | +| `format` | `'[$indicator]($style) '` | Формат модуля. | +| `style` | `'white bold'` | Стиль модуля. | +| `disabled` | `true` | Вимикає модуль `shell`. | ### Змінні @@ -3686,7 +3818,7 @@ format = '[📦 \[$env\]]($style) ' ## Solidity -Модуль `solidity` показує поточну версію [Solidity](https://soliditylang.org/) Модуль буде показано, якщо буде вказано якісь з наступних умов: +Модуль `solidity` показує поточну версію [Solidity](https://soliditylang.org/). Модуль буде показано, якщо буде виконуються наступні умови: - Поточна тека містить файл `.sol` @@ -3694,14 +3826,14 @@ format = '[📦 \[$env\]]($style) ' | Параметр | Стандартно | Опис | | ------------------- | ------------------------------------ | ----------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `version_format` | `"v${major}.${minor}.${patch}"` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` | -| `symbol` | `"S "` | Формат рядка, що представляє символ Solidity | -| `compiler | ["solc"] | Стандартний компілятор Solidity. | -| `detect_extensions` | `["sol"]` | Які розширення повинні запускати цей модуль. | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${major}.${minor}.${patch}'` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` | +| `symbol` | `'S '` | Формат рядка, що представляє символ Solidity | +| `compiler | ['solc'] | Стандартний компілятор Solidity. | +| `detect_extensions` | `['sol']` | Які розширення повинні запускати цей модуль. | | `detect_files` | `[]` | Які імена файлів мають запускати цей модуль. | | `detect_folders` | `[]` | В яких теках цей модуль має запускатись. | -| `style` | `"bold blue"` | Стиль модуля. | +| `style` | `'bold blue'` | Стиль модуля. | | `disabled` | `false` | Вмикає цей модуль. | ### Змінні @@ -3761,7 +3893,7 @@ format = '[$symbol$environment](dimmed blue) ' ::: tip -За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. +Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. ::: @@ -3822,7 +3954,7 @@ disabled = false ::: tip -За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. +Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. ::: @@ -3969,7 +4101,7 @@ format = '[🏎💨 $workspace]($style) ' ::: tip -За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. +Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. ::: @@ -4009,6 +4141,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +Модуль `typst` показує поточну встановлену версію Typst, що використовується в проєкті. + +Типово, модуль показується, якщо виконується будь-яка з наступних умов: + +- Поточна тека містить файл `template.typ` +- Поточна тека містить файл `.typ` + +### Параметри + +| Параметр | Стандартно | Опис | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` | +| `symbol` | `'t '` | Формат рядка, що представляє символ Daml | +| `style` | `'bold #0093A7'` | Стиль модуля. | +| `detect_extensions` | `['.typ']` | Які розширення повинні запускати цей модуль. | +| `detect_files` | `['template.typ']` | Які імена файлів мають запускати цей модуль. | +| `detect_folders` | `[]` | В яких теках цей модуль має запускатись. | +| `disabled` | `false` | Вимикає модуль `daml`. | + +### Змінні + +| Змінна | Приклад | Опис | +| ------------- | --------- | ------------------------------------------- | +| version | `v0.9.0` | Версія `typst`, псевдонім для typst_version | +| typst_version | `default` | Поточна версія Typest | +| symbol | | Віддзеркалює значення параметра `symbol` | +| style\* | | Віддзеркалює значення параметра `style` | + +*: Ця змінна може бути використана лише як частина стилю рядка + ## Username Модуль `username` показує імʼя активного користувача. Модуль показується, якщо виконується будь-яка з наступних умов: @@ -4204,8 +4369,8 @@ symbol = '⚡️ ' Модулі показуються, якщо виконується будь-яка з наступних умов: -- Поточна тека містить файл, ім'я якого є в `detect_files` -- Поточна тека містить теки, ім'я яких вказано в `detect_folders` +- Поточна тека містить файл, імʼя якого є в `detect_files` +- Поточна тека містить теки, імʼя яких вказано в `detect_folders` - Поточна тека містить файл, розширення якого є в `detect_extensions` - Команда `when` повертає 0 - Поточна операційна система (std::env::consts::OS) збігається з полем `os`, якщо визначено. @@ -4228,7 +4393,7 @@ symbol = '⚡️ ' ::: -::: warning Вихідні дані команди друкуються без екранування +::: warning Результати роботи команди виводяться без екранування Незалежно від результату, який генерує команда, він виводиться в командний рядок у незміненому вигляді. Це означає, що якщо вивід містить спеціальні послідовності, які інтерпретуються оболонкою, вони будуть оброблені та перетворені оболонкою при виводі. Ці спеціальні послідовності є специфічними для оболонки, напр. ви можете написати модуль, який записує послідовності bash, наприклад. `\h`, але цей модуль не працюватиме в оболонці fish або zsh. @@ -4244,7 +4409,7 @@ symbol = '⚡️ ' | `when` | `false` | Або булеве значення (`true` чи `false`, без лапок) або команди shell, що використовуються як умова для показу модуля. У випадку рядка команди, модуль буде показаний, якщо команда повертає код завершення `0`. | | `require_repo` | `false` | Якщо `true`, модуль буде показано лише в шляхах, що містять репозиторій (git). Цей параметр сам по собі не є достатньою умовою для показу модуля за відсутності інших варіантів. | | `shell` | | [Дивіться нижче](#custom-command-shell) | -| `опис` | `''` | Опис модуля, який показується під час запуску `starship explain`. | +| `description` | `''` | Опис модуля, який показується під час запуску `starship explain`. | | `detect_files` | `[]` | Файли, які треба шукати у робочій теці для отримання збігу. | | `detect_folders` | `[]` | Теки, які треба шукати у робочій теці для отримання збігу. | | `detect_extensions` | `[]` | Розширення файлів, які треба шукати у робочій теці для отримання збігу. | @@ -4285,13 +4450,13 @@ shell = ['pwsh', '-Command', '-'] ::: warning Переконайтеся, що ваша оболонка завершує процеси правильно -Якщо ви вказуєте власну команду, переконайтеся, що стандартний Shell, який використовується starship, буде виконувати команді з чистим (graceful) завершенням, за допомогою параметра `shell`. +Якщо ви вказуєте власну команду, переконайтеся, що стандартний Shell, який використовується starship, буде виконувати команди з чистим (graceful) завершенням, за допомогою параметра `shell`. Наприклад, PowerShell потребує параметр `-Command` для виконання однорядкової команди. Пропуск цього параметра може призвести до рекурсивного циклу starship, де оболонка може спробувати знову завантажити повний профіль середовища з самим starship і, отже, повторно виконати власну команду, потрапивши в нескінченний цикл. Параметри, подібні до `-NoProfile` у PowerShell, також рекомендовані для інших оболонок, щоб уникнути додаткового часу завантаження власного профілю під час кожного виклику Starship. -Наразі реалізовано автоматичне виявлення оболонок і правильне додавання параметрів, але можливо, що охоплено не всі оболонки. [Будь ласка, сповістіть про проблему](https://github.com/starship/starship/issues/new/choose) з подробицями про термінал та конфігурацію автозапуску, якщо ви зіткнулись з таким сценарій. +Наразі реалізовано автоматичне виявлення оболонок і правильне додавання параметрів, але можливо, що охоплено не всі оболонки. [Будь ласка, сповістіть про проблему](https://github.com/starship/starship/issues/new/choose) з подробицями про термінал та конфігурацію автозапуску, якщо ви зіткнулись з таким сценарієм. ::: diff --git a/docs/uk-UA/faq/README.md b/docs/uk-UA/faq/README.md index 2d1f9fd2f..afdb13d6b 100644 --- a/docs/uk-UA/faq/README.md +++ b/docs/uk-UA/faq/README.md @@ -120,3 +120,11 @@ Starship так само легко видалити, як і встановит # Locate and delete the starship binary sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/uk-UA/guide/README.md b/docs/uk-UA/guide/README.md index d93495bbc..5782ac00b 100644 --- a/docs/uk-UA/guide/README.md +++ b/docs/uk-UA/guide/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="Слідкуйте за @StarshipPrompt на Twitter" /> + Підтримуйте Україну

@@ -147,8 +152,6 @@ />

-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

Android -Встановіть Starship використовуючи будь-який з наступних пакетних менеджерів: +Встановіть Starship використовуючи будь-який з наступних менеджерів пакунків: | Репозиторій | Команда для встановлення | | --------------------------------------------------------------------------------- | ------------------------ | @@ -197,7 +200,7 @@
BSD -Встановіть Starship використовуючи будь-який з наступних пакетних менеджерів: +Встановіть Starship використовуючи будь-який з наступних менеджерів пакунків: | Дистрибутив | Репозиторій | Команда для встановлення | | --------------- | -------------------------------------------------------- | --------------------------------- | @@ -216,7 +219,7 @@ curl -sS https://starship.rs/install.sh | sh ``` -Як варіант, можете встановити Starship через будь-який з наступних пакетних менеджерів: +Як варіант, можете встановити Starship скориставшись будь-яким з наступних менеджерів пакунків: | Дистрибутив | Репозиторій | Команда для встановлення | | ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | @@ -229,6 +232,7 @@ curl -sS https://starship.rs/install.sh | sh | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| openSUSE | [OSS](https://software.opensuse.org/package/starship) | `zypper in starship` | | Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
@@ -242,7 +246,7 @@ curl -sS https://starship.rs/install.sh | sh curl -sS https://starship.rs/install.sh | sh ``` -Як варіант, можете встановити Starship скориставшись будь-яким з наступних пакетних менеджерів: +Як варіант, можете встановити Starship скориставшись будь-яким з наступних менеджерів пакунків: | Репозиторій | Команда для встановлення | | -------------------------------------------------------- | --------------------------------------- | @@ -256,9 +260,9 @@ curl -sS https://starship.rs/install.sh | sh
Windows -Встановіть останню версію системи за допомогою MSI-інсталятора з розділу [релізів](https://github.com/starship/starship/releases/latest). +Встановіть останню версію для вашої системи за допомогою MSI-інсталятора з розділу [релізів](https://github.com/starship/starship/releases/latest). -Встановіть Starship використовуючи будь-який з наступних менеджерів пакетів: +Встановіть Starship використовуючи будь-який з наступних менеджерів пакунків: | Репозиторій | Команда для встановлення | | -------------------------------------------------------------------------------------------- | --------------------------------------- | @@ -341,7 +345,7 @@ mkdir ~/.cache/starship starship init nu | save -f ~/.cache/starship/init.nu ``` -Додайте наступний рядок наприкінці налаштувань Nushell (знайдіть її за допомоги `$nu.config-path`): +Додайте наступний рядок наприкінці Вашої конфігурації Nushell (знайдіть її виконавши `$nu.config-path`): ```sh use ~/.cache/starship/init.nu @@ -354,7 +358,7 @@ use ~/.cache/starship/init.nu
PowerShell -Додайте наступний рядок наприкінці Вашої конфігурації PowerShell (знайдіть її виконавши `$PROFILE`): +Додайте наступний рядок наприкінці вашої конфігурації PowerShell (знайдіть її виконавши команду `$PROFILE`): ```powershell Invoke-Expression (&starship init powershell) @@ -397,9 +401,9 @@ eval "$(starship init zsh)" ### Крок 3. Налаштуйте starship -Запустіть новий екземпляр вашої оболонки і ви побачите новий яскравий командний рядок. Якщо вас влаштовують стандартні налаштування – насолоджуйтесь результатом! +Запустіть новий екземпляр вашої оболонки і ви побачите новий яскравий командний рядок. Якщо ви задоволені налаштуваннями, насолоджуйтесь! -Якщо ви бажаєте, ви можете продовжити налаштування Starship: +Якщо ви бажаєте додатково налаштувати Starship: - **[Налаштування](https://starship.rs/config/)** – дізнайтесь як налаштувати Starship, щоб підлаштувати командний рядок під свої потреби @@ -425,7 +429,7 @@ eval "$(starship init zsh)" ## ❤️ Спонсори -Підтримайте цей проект [ставши спонсором](https://github.com/sponsors/starship). Ваше імʼя або логотип показуватимуться тут з посиланням на ваш сайт. +Підтримайте цей проєкт [ставши спонсором](https://github.com/sponsors/starship). Ваше імʼя або логотип показуватимуться тут з посиланням на ваш сайт. **Підтримувачі** diff --git a/docs/uk-UA/presets/README.md b/docs/uk-UA/presets/README.md index 50c8fdbac..e1dc7d3c7 100644 --- a/docs/uk-UA/presets/README.md +++ b/docs/uk-UA/presets/README.md @@ -63,3 +63,9 @@ Цей шаблон створений під враженням від [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). [![Скріншот шаблона Tokyo Night](/presets/img/tokyo-night.png "Натисніть, щоб переглянути шаблон Токіо Night")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +Цей шаблон створено під впливом [Pastel Powerline](./pastel-powerline.md) та [Tokyo Night](./tokyo-night.md). + +[![Скріншот шаблона Gruvbox Rainbow](/presets/img/gruvbox-rainbow.png "Натисніть, щоб переглянути шаблон Gruvbox Rainbow")](./gruvbox-rainbow) diff --git a/docs/uk-UA/presets/gruvbox-rainbow.md b/docs/uk-UA/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..b6272ae5a --- /dev/null +++ b/docs/uk-UA/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[Повернутися до Шаблонів](./README.md#gruvbox-rainbow) + +# Шаблон Gruvbox Rainbow + +Цей шаблон створено під впливом [Pastel Powerline](./pastel-powerline.md) та [Tokyo Night](./tokyo-night.md). + +![Скріншот шаблона Gruvbox Rainbow](/presets/img/gruvbox-rainbow.png) + +### Передумови + +- Встановлений та увімкнений шрифт [Nerd Font](https://www.nerdfonts.com/) у вашому терміналі + +### Налаштування + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[Натисніть, щоб завантажити TOML](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/uk-UA/presets/jetpack.md b/docs/uk-UA/presets/jetpack.md new file mode 100644 index 000000000..be6565d39 --- /dev/null +++ b/docs/uk-UA/presets/jetpack.md @@ -0,0 +1,24 @@ +[Повернутися до Шаблонів](./README.md#jetpack) + +# Jetpack + +Цей псевдомінімалістичний шаблон створений під враженням від [geometry](https://github.com/geometry-zsh/geometry) та командного рядка [spaceship](https://github.com/spaceship-prompt/spaceship-prompt). + +> Jetpack використовує колірну тему термінала. + +![Скріншот шаблона Jetpack](/presets/img/jetpack.png) + +### Передумови + +- Потрібна командна оболонка з підтримкою [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt). +- Рекомендується [Jetbrains Mono](https://www.jetbrains.com/lp/mono/). + +### Налаштування + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[Натисніть, щоб завантажити TOML](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/vi-VN/config/README.md b/docs/vi-VN/config/README.md index e38d4c4e0..72769990f 100644 --- a/docs/vi-VN/config/README.md +++ b/docs/vi-VN/config/README.md @@ -206,6 +206,13 @@ Cái này là danh sách các tuỳ chọn cho cấu hình prompt-wide. | `add_newline` | `true` | Chèn dòng trắng giữa các dấu nhắc lệnh. | | `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: ### Ví dụ @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### Các tuỳ chọn | Tuỳ chọn | Mặc định | Mô tả | @@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `region_aliases` | `{}` | Bảng của các region alias để hiển thị ngoài tên AWS. | | `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | | `style` | `'bold yellow'` | Kiểu cho module. | -| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | +| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Vô hiệu `AWS` module. | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu ### Options -| Tuỳ chọn | Mặc định | Mô tả | -| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'C '` | The symbol used before displaying the compiler details | -| `detect_extensions` | `['c', 'h']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `[]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | -| `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | -| `style` | `'bold 149'` | Kiểu cho module. | -| `disabled` | `false` | Disables the `c` module. | +| Tuỳ chọn | Mặc định | Mô tả | +| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `[]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | +| `style` | `'bold 149'` | Kiểu cho module. | +| `disabled` | `false` | Disables the `c` module. | ### Các biến @@ -671,7 +683,7 @@ Kí tự sẽ nói cho bạn câu lệnh cuối liệu thành công hay thất b Mặc định, nó chỉ thay đổi màu. If you also want to change its shape take a look at [this example](#with-custom-error-shape). -::: warning +::: cảnh báo `vimcmd_symbol` is only supported in cmd, fish and zsh. `vimcmd_replace_one_symbol`, `vimcmd_replace_symbol`, and `vimcmd_visual_symbol` are only supported in fish due to [upstream issues with mode detection in zsh](https://github.com/starship/starship/issues/625#issuecomment-732454148). @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### Options + +| Tuỳ chọn | Mặc định | Mô tả | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | Định dạng cho module. | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | Kiểu cho module. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['.envrc']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol`. | +| style\* | `red bold` | Giá trị ghi đè của `style`. | + +*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Docker Context The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). @@ -1427,7 +1480,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe - The current directory contains a file with the `.fnl` extension -### Options +### Các tuỳ chọn | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | @@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `style` | `'bold green'` | Kiểu cho module. | -| `detect_extensions` | `[fnl]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_extensions` | `['fnl']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | | `detect_files` | `[]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào nên kích hoạt các mô đun này. | | `disabled` | `false` | Disables the `fennel` module. | @@ -1463,7 +1516,7 @@ symbol = '⫰ ' The `fill` module fills any extra space on the line with a symbol. If multiple `fill` modules are present in a line they will split the space evenly between them. This is useful for aligning other modules. -### Các tuỳ chọn +### Options | Tuỳ chọn | Mặc định | Mô tả | | ---------- | -------------- | --------------------------------- | @@ -1524,11 +1577,46 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### Options + +| Tuỳ chọn | Mặc định | Mô tả | +| -------------------- | ------------------------------------------------------------ | ------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Định dạng cho module. | +| `added_style` | `'bold green'` | The style for the added count. | +| `deleted_style` | `'bold red'` | The style for the deleted count. | +| `only_nonzero_diffs` | `true` | Render status only for changed items. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| ----------------- | ----- | ------------------------------------------- | +| added | `1` | The current number of added lines | +| deleted | `2` | The current number of deleted lines | +| added_style\* | | Mirrors the value of option `added_style` | +| deleted_style\* | | Mirrors the value of option `deleted_style` | + +*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) Mô đun `gcloud` hiển thị cấu hình hiện tại của [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. Cái này dựa trên tập tin `~/.config/gcloud/active_config`, `~/.config/gcloud/configurations/config_{CONFIG NAME}` và biến môi trường `CLOUDSDK_CONFIG`. -When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set. +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. ### Options @@ -1771,7 +1859,7 @@ The Git Status module is very slow in Windows directories (for example under `/m ::: -### Options +### Các tuỳ chọn | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | @@ -1879,7 +1967,7 @@ The `golang` module shows the currently installed version of [Go](https://golang - Thư mục hiện tại chứa một thư mục `Godeps` - Thư mục hiện tại chứa một tệp tin với phần mở rộng `.go` -### Options +### Các tuỳ chọn | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | @@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | Tuỳ chọn | Mặc định | Mô tả | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol]($style) '` | Định dạng cho module. | -| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `style` | `"yellow bold"` | Kiểu cho module. | +| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | Kiểu cho module. | | `disabled` | `false` | Disables the `guix_shell` module. | ### Các biến @@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | | `detect_files` | `[]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | -| `detect_folders` | `["gradle"]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"bold bright-cyan"` | Kiểu cho module. | +| `detect_folders` | `['gradle']` | Những thư mục nào sẽ kích hoạt mô-đun này. | +| `style` | `'bold bright-cyan'` | Kiểu cho module. | | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["hx", "hxml"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Những thư mục nào nên kích hoạt các mô đun này. | -| `symbol` | `"⌘ "` | Một format string đại diện cho biểu tượng của Helm. | -| `style` | `"bold fg:202"` | Kiểu cho module. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Những thư mục nào nên kích hoạt các mô đun này. | +| `symbol` | `'⌘ '` | Một format string đại diện cho biểu tượng của Helm. | +| `style` | `'bold fg:202'` | Kiểu cho module. | | `disabled` | `false` | Disables the `haxe` module. | ### Các biến @@ -2107,14 +2195,15 @@ Mô đun `hostname` hiển thị hostnam hệ thống. ### Các tuỳ chọn -| Tuỳ chọn | Mặc định | Mô tả | -| ------------ | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| `ssh_only` | `true` | Chỉ hiển thị hostname khi được kết nối tới một phiên SSH. | -| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | -| `trim_at` | `'.'` | Chuỗi mà hostname được cắt ngắn, sau khi khớp lần đầu tiên. `'.'` will stop after the first dot. `''` will disable any truncation | -| `format` | `'[$ssh_symbol$hostname]($style) in '` | Định dạng cho module. | -| `style` | `'bold dimmed green'` | Kiểu cho module. | -| `disabled` | `false` | Vô hiệu `hastname` module. | +| Tuỳ chọn | Mặc định | Mô tả | +| ----------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | Chỉ hiển thị hostname khi được kết nối tới một phiên SSH. | +| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | +| `trim_at` | `'.'` | Chuỗi mà hostname được cắt ngắn, sau khi khớp lần đầu tiên. `'.'` will stop after the first dot. `''` will disable any truncation. | +| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | Định dạng cho module. | +| `style` | `'bold dimmed green'` | Kiểu cho module. | +| `disabled` | `false` | Vô hiệu `hastname` module. | ### Các biến @@ -2126,7 +2215,9 @@ Mô đun `hostname` hiển thị hostnam hệ thống. *: Biến này có thể chỉ được sử dụng như một phần của style string -### Ví dụ +### Các ví dụ + +#### Always show the hostname ```toml # ~/.config/starship.toml @@ -2138,6 +2229,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Hide the hostname in remote tmux sessions + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: @@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc' ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. Nếu biến môi trường `$KUBECONFIG` được thiết lập, mô đun sẽ sử dụng cái đó nếu nó không sử dụng `~/.kube/config`. +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. Nếu biến môi trường `$KUBECONFIG` được thiết lập, mô đun sẽ sử dụng cái đó nếu nó không sử dụng `~/.kube/config`. ::: tip @@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten ### Các tuỳ chọn +::: cảnh báo + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | | `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | Định dạng cho module. | | `style` | `'cyan bold'` | Kiểu cho module. | -| `context_aliases` | `{}` | Table of context aliases to display. | -| `user_aliases` | `{}` | Table of user aliases to display. | +| `context_aliases`* | `{}` | Table of context aliases to display. | +| `user_aliases`* | `{}` | Table of user aliases to display. | | `detect_extensions` | `[]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | | `detect_files` | `[]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào nên kích hoạt các mô đun này. | +| `contexts` | `[]` | Customized styles and symbols for specific contexts. | | `disabled` | `true` | Disables the `kubernetes` module. | +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| Biến | Mô tả | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `style` | The style for the module when using this context. If not set, will use module's style. | +| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + ### Các biến | Biến | Ví dụ | Mô tả | @@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Regex Matching +#### Kubernetes Context specific config -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. - -Long and automatically generated cluster names can be identified and shortened using regular expressions: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Line Break @@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_folders` | `['node_modules']` | Những thư mục nào sẽ kích hoạt mô-đun này. | | `style` | `'bold green'` | Kiểu cho module. | | `disabled` | `false` | Disables the `nodejs` module. | -| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | +| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Các biến @@ -2890,8 +3021,8 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế | Tuỳ chọn | Mặc định | Mô tả | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | Định dạng cho module. | -| `style` | `"bold white"` | Kiểu cho module. | +| `format` | `'[$symbol]($style)'` | Định dạng cho module. | +| `style` | `'bold white'` | Kiểu cho module. | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -3245,7 +3376,7 @@ Mặc định module sẽ được hiển thị nếu có bất kì điều ki | `symbol` | `'🐍 '` | A format string representing the symbol of Python | | `style` | `'yellow bold'` | Kiểu cho module. | | `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `['py']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Tên tệp nào sẽ kích hoạt mô-đun này | @@ -3562,22 +3693,23 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế ### Các tuỳ chọn -| Tuỳ chọn | Mặc định | Mô tả | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `'bsh'` | A format string used to represent bash. | -| `fish_indicator` | `'fsh'` | A format string used to represent fish. | -| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | -| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | -| `ion_indicator` | `'ion'` | A format string used to represent ion. | -| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | -| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | -| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | -| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | -| `nu_indicator` | `'nu'` | A format string used to represent nu. | -| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | -| `format` | `'[$indicator]($style) '` | Định dạng cho module. | -| `style` | `'white bold'` | Kiểu cho module. | -| `disabled` | `true` | Disables the `shell` module. | +| Tuỳ chọn | Mặc định | Mô tả | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | Định dạng cho module. | +| `style` | `'white bold'` | Kiểu cho module. | +| `disabled` | `true` | Disables the `shell` module. | ### Các biến @@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https: | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | | `detect_files` | `[]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `"bold blue"` | Kiểu cho module. | +| `style` | `'bold blue'` | Kiểu cho module. | | `disabled` | `false` | Disables this module. | ### Các biến @@ -4009,6 +4141,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +By default, the module will be shown if any of the following conditions are met: + +- Thư mục hiện tại chứa một tập tin `template.typ` +- The current directory contains any `*.typ` file + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | Kiểu cho module. | +| `detect_extensions` | `['.typ']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['template.typ']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | +| `disabled` | `false` | Disables the `daml` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +*: Biến này có thể chỉ được sử dụng như một phần của style string + ## Username The `username` module shows active user's username. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: diff --git a/docs/vi-VN/faq/README.md b/docs/vi-VN/faq/README.md index 9af777e5b..04983a2de 100644 --- a/docs/vi-VN/faq/README.md +++ b/docs/vi-VN/faq/README.md @@ -120,3 +120,11 @@ If Starship was installed using the install script, the following command will d # Locate and delete the starship binary sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/vi-VN/guide/README.md b/docs/vi-VN/guide/README.md index 0900d31b3..70bc2f10d 100644 --- a/docs/vi-VN/guide/README.md +++ b/docs/vi-VN/guide/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="Theo dõi @StarshipPrompt trên Twitter" /> + Stand With Ukraine

@@ -147,8 +152,6 @@ />

-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

@@ -236,7 +240,7 @@ Hoặc là, cài đặt Starship bằng một package manager bất kì:
macOS -Cài phiên bản mới nhất cho hệ điều hành của bạn: +Cài đặt phiên bản mới nhất cho hệ điều hành của bạn: ```sh curl -sS https://starship.rs/install.sh | sh diff --git a/docs/vi-VN/presets/README.md b/docs/vi-VN/presets/README.md index 0e28b2a59..ea3f1b6fc 100644 --- a/docs/vi-VN/presets/README.md +++ b/docs/vi-VN/presets/README.md @@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). [![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) diff --git a/docs/vi-VN/presets/gruvbox-rainbow.md b/docs/vi-VN/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..5986631c2 --- /dev/null +++ b/docs/vi-VN/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#gruvbox-rainbow) + +# Gruvbox Rainbow Preset + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png) + +### Yêu cầu + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal + +### Cấu hình + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/vi-VN/presets/jetpack.md b/docs/vi-VN/presets/jetpack.md new file mode 100644 index 000000000..4b83fa3d6 --- /dev/null +++ b/docs/vi-VN/presets/jetpack.md @@ -0,0 +1,24 @@ +[Return to Presets](./README.md#jetpack) + +# Jetpack Preset + +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 uses the terminal's color theme. + +![Screenshot of Jetpack preset](/presets/img/jetpack.png) + +### Prerequisite + +- 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. + +### Cấu hình + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index 90ac6fea5..316497e05 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -162,7 +162,7 @@ description: Starship是一款轻量级、反应迅速、可自定义的高颜 然后在您的 Nushell 配置文件的最后(使用 `$nu.config-path` 来获取它的路径),添加以下内容: ```sh - use ~/.cache/starship/init.nu + 使用 ~/.cache/starship/init.nu ``` diff --git a/docs/zh-CN/config/README.md b/docs/zh-CN/config/README.md index 9807ad5dd..b41d3714e 100644 --- a/docs/zh-CN/config/README.md +++ b/docs/zh-CN/config/README.md @@ -206,6 +206,13 @@ detect_extensions = ['ts', '!video.ts', '!audio.ts'] | `add_newline` | `true` | 在 shell 提示符之间插入空行。 | | `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: ### 示例 @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### 配置项 | 选项 | 默认值 | 描述 | @@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `region_aliases` | `{}` | 地区缩写列表,用来显示在 AWS 主机名之后。 | | `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | | `style` | `'bold yellow'` | 此组件的样式。 | -| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | +| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | 禁用 `AWS` 组件。 | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `'C '` | The symbol used before displaying the compiler details | -| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | -| `style` | `'bold 149'` | 此组件的样式。 | -| `disabled` | `false` | Disables the `c` module. | +| 选项 | 默认值 | 描述 | +| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `符号` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | +| `style` | `'bold 149'` | 此组件的样式。 | +| `disabled` | `false` | Disables the `c` module. | ### 变量 @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### 配置项 + +| 选项 | 默认值 | 描述 | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | 组件格式化模板。 | +| `符号` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | 此组件的样式。 | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['.envrc']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### 变量 + +| 字段 | 示例 | 描述 | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| 符号 | | `symbol`对应值. | +| style\* | `red bold` | `style`对应值. | + +*: 此变量只能作为样式字符串的一部分使用 + +### 示例 + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Docker Context The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). @@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `符号` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `style` | `'bold green'` | 此组件的样式。 | -| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. | +| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | | `disabled` | `false` | Disables the `fennel` module. | @@ -1524,11 +1577,46 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### 配置项 + +| 选项 | 默认值 | 描述 | +| -------------------- | ------------------------------------------------------------ | ------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | 组件格式化模板。 | +| `added_style` | `'bold green'` | The style for the added count. | +| `deleted_style` | `'bold red'` | The style for the deleted count. | +| `only_nonzero_diffs` | `true` | Render status only for changed items. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### 变量 + +| 字段 | 示例 | 描述 | +| ----------------- | --- | ------------------------------------------- | +| added | `1` | The current number of added lines | +| deleted | `2` | The current number of deleted lines | +| added_style\* | | Mirrors the value of option `added_style` | +| deleted_style\* | | Mirrors the value of option `deleted_style` | + +*: 此变量只能作为样式字符串的一部分使用 + +### 示例 + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. -When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set. +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. ### 配置项 @@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | 选项 | 默认值 | 描述 | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol]($style) '` | 组件格式化模板。 | -| `符号` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `style` | `"yellow bold"` | 此组件的样式。 | +| `符号` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | 此组件的样式。 | | `disabled` | `false` | Disables the `guix_shell` module. | ### 变量 @@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `符号` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `["gradle"]` | Which folders should trigger this module. | -| `style` | `"bold bright-cyan"` | 此组件的样式。 | +| `detect_folders` | `['gradle']` | Which folders should trigger this module. | +| `style` | `'bold bright-cyan'` | 此组件的样式。 | | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | 选项 | 默认值 | 描述 | | ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. | -| `符号` | `"⌘ "` | A format string representing the symbol of Helm. | -| `style` | `"bold fg:202"` | 此组件的样式。 | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. | +| `符号` | `'⌘ '` | A format string representing the symbol of Helm. | +| `style` | `'bold fg:202'` | 此组件的样式。 | | `disabled` | `false` | Disables the `haxe` module. | ### 变量 @@ -2107,14 +2195,15 @@ format = 'via [⎈ $version](bold white) ' ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------ | -------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `ssh_only` | `true` | 仅在连接到 SSH 会话时显示主机名。 | -| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | -| `trim_at` | `'.'` | 当主机名过长被截断时,会截断成第一次匹配该字符串之前的主机名。 `'.'` will stop after the first dot. `''` will disable any truncation | -| `format` | `'[$ssh_symbol$hostname]($style) in '` | 组件格式化模板。 | -| `style` | `'bold dimmed green'` | 此组件的样式。 | -| `disabled` | `false` | 禁用 `hostname` 组件。 | +| 选项 | 默认值 | 描述 | +| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------ | +| `ssh_only` | `true` | 仅在连接到 SSH 会话时显示主机名。 | +| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | +| `trim_at` | `'.'` | 当主机名过长被截断时,会截断成第一次匹配该字符串之前的主机名。 `'.'` will stop after the first dot. `''` will disable any truncation. | +| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | 组件格式化模板。 | +| `style` | `'bold dimmed green'` | 此组件的样式。 | +| `disabled` | `false` | 禁用 `hostname` 组件。 | ### 变量 @@ -2126,7 +2215,9 @@ format = 'via [⎈ $version](bold white) ' *: 此变量只能作为样式字符串的一部分使用 -### 示例 +### Examples + +#### Always show the hostname ```toml # ~/.config/starship.toml @@ -2138,6 +2229,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Hide the hostname in remote tmux sessions + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met: @@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc' ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. ::: tip @@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten ### 配置项 +::: warning + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + | 选项 | 默认值 | 描述 | | ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | | `符号` | `'☸ '` | A format string representing the symbol displayed before the Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | 组件格式化模板。 | | `style` | `'cyan bold'` | 此组件的样式。 | -| `context_aliases` | `{}` | Table of context aliases to display. | -| `user_aliases` | `{}` | Table of user aliases to display. | +| `context_aliases`* | `{}` | Table of context aliases to display. | +| `user_aliases`* | `{}` | Table of user aliases to display. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | +| `contexts` | `[]` | Customized styles and symbols for specific contexts. | | `disabled` | `true` | Disables the `kubernetes` module. | +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| 字段 | 描述 | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `style` | The style for the module when using this context. If not set, will use module's style. | +| `符号` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + ### 变量 | 字段 | 示例 | 描述 | @@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Regex Matching +#### Kubernetes Context specific config -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. - -Long and automatically generated cluster names can be identified and shortened using regular expressions: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## Line Break @@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_folders` | `['node_modules']` | Which folders should trigger this module. | | `style` | `'bold green'` | 此组件的样式。 | | `disabled` | `false` | 禁用 `nodejs` 组件。 | -| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | +| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. | ### 变量 @@ -2890,8 +3021,8 @@ The [os_info](https://lib.rs/crates/os_info) crate used by this module is known | 选项 | 默认值 | 描述 | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | 组件格式化模板。 | -| `style` | `"bold white"` | 此组件的样式。 | +| `format` | `'[$symbol]($style)'` | 组件格式化模板。 | +| `style` | `'bold white'` | 此组件的样式。 | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met: | `符号` | `'🐍 '` | 用于表示Python的格式化字符串。 | | `style` | `'yellow bold'` | 此组件的样式。 | | `pyenv_version_name` | `false` | 使用 pyenv 获取 Python 版本 | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `['py']` | Which extensions should trigger this module | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | @@ -3562,22 +3693,23 @@ The `shell` module shows an indicator for currently used shell. ### 配置项 -| 选项 | 默认值 | 描述 | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `'bsh'` | A format string used to represent bash. | -| `fish_indicator` | `'fsh'` | A format string used to represent fish. | -| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | -| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | -| `ion_indicator` | `'ion'` | A format string used to represent ion. | -| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | -| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | -| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | -| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | -| `nu_indicator` | `'nu'` | A format string used to represent nu. | -| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | -| `format` | `'[$indicator]($style) '` | 组件格式化模板。 | -| `style` | `'white bold'` | 此组件的样式。 | -| `disabled` | `true` | Disables the `shell` module. | +| 选项 | 默认值 | 描述 | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | 组件格式化模板。 | +| `style` | `'white bold'` | 此组件的样式。 | +| `disabled` | `true` | Disables the `shell` module. | ### 变量 @@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https: | 选项 | 默认值 | 描述 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | -| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `符号` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | 此组件的样式。 | +| `style` | `'bold blue'` | 此组件的样式。 | | `disabled` | `false` | Disables this module. | ### 变量 @@ -4009,6 +4141,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +By default, the module will be shown if any of the following conditions are met: + +- 当前目录包含一个 `template.typ` 文件 +- The current directory contains any `*.typ` file + +### 配置项 + +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `符号` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | 此组件的样式。 | +| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. | +| `detect_files` | `['template.typ']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `disabled` | `false` | Disables the `daml` module. | + +### 变量 + +| 字段 | 示例 | 描述 | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| 符号 | | `symbol`对应值 | +| style\* | | `style`对应值 | + +*: 此变量只能作为样式字符串的一部分使用 + ## Username `username` 组件显示当前活跃的用户名。 此组件将在符合以下任意条件时显示: diff --git a/docs/zh-CN/faq/README.md b/docs/zh-CN/faq/README.md index ece4a97e9..9d21b2225 100644 --- a/docs/zh-CN/faq/README.md +++ b/docs/zh-CN/faq/README.md @@ -120,3 +120,11 @@ Starship 的卸载过程与安装过程一样简单。 # 找到并且删除 Starship 二进制文件 sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/zh-CN/guide/README.md b/docs/zh-CN/guide/README.md index eeeeebc3d..b2b95546b 100644 --- a/docs/zh-CN/guide/README.md +++ b/docs/zh-CN/guide/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="在 Twitter 上关注 @Starshipmpt" /> + Stand With Ukraine

@@ -119,7 +124,7 @@ >Українська  

-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

Android @@ -224,11 +227,12 @@ curl -sS https://starship.rs/install.sh | sh | _任意发行版_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | | _任意发行版_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | -| Arch Linux | [Arch Linux Extra](https://archlinux.org/packages/extra/x86_64/starship) | `pacman -S starship` | +| Arch Linux | [Arch Linux 额外](https://archlinux.org/packages/extra/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | | NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` | +| openSUSE | [OSS](https://software.opensuse.org/package/starship) | `zypper in starship` | | Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
@@ -270,7 +274,7 @@ curl -sS https://starship.rs/install.sh | sh
-### 步骤 2. Set up your shell to use Starship +### 步骤 2. 设置您的 shell 以使用 Starship 配置你的终端来初始化 starship。 请从下面列表选择你的终端: @@ -341,10 +345,10 @@ mkdir ~/.cache/starship starship init nu | save -f ~/.cache/starship/init.nu ``` -然后将以下内容添加到您 Nushell 配置文件的末尾(使用 `$nu.config-path` 来获取它的路径): +然后在您的 Nushell 配置文件的最后(使用 `$nu.config-path` 来获取它的路径),添加以下内容: ```sh -use ~/.cache/starship/init.nu +使用 ~/.cache/starship/init.nu ``` 注意:仅支持 Nushell v0.78+ diff --git a/docs/zh-CN/presets/README.md b/docs/zh-CN/presets/README.md index 6dd4b87d8..1bec89ef2 100644 --- a/docs/zh-CN/presets/README.md +++ b/docs/zh-CN/presets/README.md @@ -63,3 +63,9 @@ This preset does not show icons if the toolset is not found. 此预设受 [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme) 的启发。 [![Tokyo Night预设预览](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) diff --git a/docs/zh-CN/presets/gruvbox-rainbow.md b/docs/zh-CN/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..4701cd1ae --- /dev/null +++ b/docs/zh-CN/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[返回全部预设](./README.md#gruvbox-rainbow) + +# Gruvbox Rainbow Preset + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png) + +### 前置要求 + +- 安装一种 [Nerd fonts](https://www.nerdfonts.com/) 并在您的终端启用。 + +### 配置 + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[点击下载 TOML 文件](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/zh-CN/presets/jetpack.md b/docs/zh-CN/presets/jetpack.md new file mode 100644 index 000000000..27ba891e5 --- /dev/null +++ b/docs/zh-CN/presets/jetpack.md @@ -0,0 +1,24 @@ +[返回全部预设](./README.md#jetpack) + +# Jetpack Preset + +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 uses the terminal's color theme. + +![Screenshot of Jetpack preset](/presets/img/jetpack.png) + +### Prerequisite + +- 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. + +### 配置 + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[点击下载 TOML 文件](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/docs/zh-TW/README.md b/docs/zh-TW/README.md index 4b57ac590..3f72e0d48 100644 --- a/docs/zh-TW/README.md +++ b/docs/zh-TW/README.md @@ -179,7 +179,7 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化 #### 命令提示字元 - You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: + 您需要在 Cmd 中使用 [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+)。 Add the following to a file `starship.lua` and place this file in Clink scripts directory: ```lua -- starship.lua diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md index 6626d765f..7f0845e4a 100644 --- a/docs/zh-TW/config/README.md +++ b/docs/zh-TW/config/README.md @@ -206,6 +206,13 @@ detect_extensions = ['ts', '!video.ts', '!audio.ts'] | `add_newline` | `true` | Inserts blank line between shell prompts. | | `palette` | `''` | Sets which color palette from `palettes` to use. | | `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. | +| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. | + +::: tip + +If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. + +::: ### 範例 @@ -253,6 +260,7 @@ $kubernetes\ $directory\ $vcsh\ $fossil_branch\ +$fossil_metrics\ $git_branch\ $git_commit\ $git_state\ @@ -301,6 +309,7 @@ $scala\ $solidity\ $swift\ $terraform\ +$typst\ $vlang\ $vagrant\ $zig\ @@ -314,6 +323,7 @@ $aws\ $gcloud\ $openstack\ $azure\ +$direnv\ $env_var\ $crystal\ $custom\ @@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key. +When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var. + ### 選項 | Option | 預設 | 說明 | @@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `region_aliases` | `{}` | 除了AWS名稱外,顯示區域別名表 | | `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. | | `style` | `'bold yellow'` | 這個模組的風格。 | -| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | +| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | 停用 `AWS` 模組。 | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | @@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu ### 選項 -| Option | 預設 | 說明 | -| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'C '` | The symbol used before displaying the compiler details | -| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is | -| `style` | `'bold 149'` | 這個模組的風格。 | -| `disabled` | `false` | Disables the `c` module. | +| Option | 預設 | 說明 | +| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | +| `style` | `'bold 149'` | 這個模組的風格。 | +| `disabled` | `false` | Disables the `c` module. | ### Variables @@ -1137,6 +1149,47 @@ truncation_length = 8 truncation_symbol = '…/' ``` +## Direnv + +The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`. + +### 選項 + +| Option | 預設 | 說明 | +| ------------------- | -------------------------------------- | ----------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | 這個模組的風格。 | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['.envrc']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | + +### Variables + +| 變數 | 範例 | 說明 | +| --------- | ------------------- | --------------------------------------- | +| loaded | `loaded` | Whether the current rc file is loaded. | +| allowed | `denied` | Whether the current rc file is allowed. | +| rc_path | `/home/test/.envrc` | The current rc file path. | +| symbol | | Mirrors the value of option `symbol`. | +| style\* | `red bold` | Mirrors the value of option `style`. | + +*: This variable can only be used as a part of a style string + +### 範例 + +```toml +# ~/.config/starship.toml + +[direnv] +disabled = false +``` + ## Docker Context The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). @@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. | | `style` | `'bold green'` | 這個模組的風格。 | -| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. | +| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | | `disabled` | `false` | Disables the `fennel` module. | @@ -1524,11 +1577,46 @@ truncation_length = 4 truncation_symbol = '' ``` +## Fossil Metrics + +The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required. + +### 選項 + +| Option | 預設 | 說明 | +| -------------------- | ------------------------------------------------------------ | ------------------------------------- | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | +| `added_style` | `'bold green'` | The style for the added count. | +| `deleted_style` | `'bold red'` | The style for the deleted count. | +| `only_nonzero_diffs` | `true` | Render status only for changed items. | +| `disabled` | `true` | Disables the `fossil_metrics` module. | + +### Variables + +| 變數 | 範例 | 說明 | +| ----------------- | --- | ------------------------------------------- | +| added | `1` | The current number of added lines | +| deleted | `2` | The current number of deleted lines | +| added_style\* | | Mirrors the value of option `added_style` | +| deleted_style\* | | Mirrors the value of option `deleted_style` | + +*: This variable can only be used as a part of a style string + +### 範例 + +```toml +# ~/.config/starship.toml + +[fossil_metrics] +added_style = 'bold blue' +format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' +``` + ## Google Cloud (`gcloud`) The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. -When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set. +When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set. ### 選項 @@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | Option | 預設 | 說明 | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol]($style) '` | The format for the module. | -| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. | -| `style` | `"yellow bold"` | 這個模組的風格。 | +| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | +| `style` | `'yellow bold'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `guix_shell` module. | ### Variables @@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | Option | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. | -| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. | +| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `["gradle"]` | Which folders should trigger this module. | -| `style` | `"bold bright-cyan"` | 這個模組的風格。 | +| `detect_folders` | `['gradle']` | Which folders should trigger this module. | +| `style` | `'bold bright-cyan'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | @@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | Option | 預設 | 說明 | | ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. | -| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. | -| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. | -| `style` | `"bold fg:202"` | 這個模組的風格。 | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. | +| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. | +| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. | +| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. | +| `style` | `'bold fg:202'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `haxe` module. | ### Variables @@ -2107,14 +2195,15 @@ format = 'via [⎈ $version](bold white) ' ### 選項 -| Option | 預設 | 說明 | -| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------- | -| `ssh_only` | `true` | 只在連接到一個 SSH session 時顯示主機名稱。 | -| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | -| `trim_at` | `'.'` | 擷取出主機名稱的斷點,以第一個符合的為準。 `'.'` will stop after the first dot. `''` will disable any truncation | -| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | -| `style` | `'bold dimmed green'` | 這個模組的風格。 | -| `disabled` | `false` | 停用 `hostname` 模組。 | +| Option | 預設 | 說明 | +| ----------------- | -------------------------------------- | -------------------------------------------------------------------------------------------- | +| `ssh_only` | `true` | 只在連接到一個 SSH session 時顯示主機名稱。 | +| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | +| `trim_at` | `'.'` | 擷取出主機名稱的斷點,以第一個符合的為準。 `'.'` will stop after the first dot. `''` will disable any truncation. | +| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. | +| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. | +| `style` | `'bold dimmed green'` | 這個模組的風格。 | +| `disabled` | `false` | 停用 `hostname` 模組。 | ### Variables @@ -2126,7 +2215,9 @@ format = 'via [⎈ $version](bold white) ' *: This variable can only be used as a part of a style string -### 範例 +### Examples + +#### Always show the hostname ```toml # ~/.config/starship.toml @@ -2138,6 +2229,17 @@ trim_at = '.companyname.com' disabled = false ``` +#### Hide the hostname in remote tmux sessions + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +detect_env_vars = ['!TMUX', 'SSH_CONNECTION'] +disabled = false +``` + ## Java The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met: @@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc' ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. ::: tip @@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten ### 選項 +::: warning + +The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead. + +::: + | Option | 預設 | 說明 | | ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | | `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | | `style` | `'cyan bold'` | 這個模組的風格。 | -| `context_aliases` | `{}` | Table of context aliases to display. | -| `user_aliases` | `{}` | Table of user aliases to display. | +| `context_aliases`* | `{}` | Table of context aliases to display. | +| `user_aliases`* | `{}` | Table of user aliases to display. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | +| `contexts` | `[]` | Customized styles and symbols for specific contexts. | | `disabled` | `true` | Disables the `kubernetes` module. | +*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead. + +To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list: + +| 變數 | 說明 | +| ----------------- | ---------------------------------------------------------------------------------------- | +| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. | +| `user_pattern` | Regular expression to match current Kubernetes user name. | +| `context_alias` | Context alias to display instead of the full context name. | +| `user_alias` | User alias to display instead of the full user name. | +| `style` | The style for the module when using this context. If not set, will use module's style. | +| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. | + +Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). + ### Variables | 變數 | 範例 | 說明 | @@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten [kubernetes] format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false -[kubernetes.context_aliases] -'dev.local.cluster.k8s' = 'dev' -'.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' -[kubernetes.user_aliases] -'dev.local.cluster.k8s' = 'dev' -'root/.*' = 'root' +contexts = [ + { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " }, +] ``` Only show the module in directories that contain a `k8s` file. @@ -2387,25 +2507,36 @@ disabled = false detect_files = ['k8s'] ``` -#### Regex Matching +#### Kubernetes Context specific config -Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. - -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. - -Long and automatically generated cluster names can be identified and shortened using regular expressions: +The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression. ```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -'.*/openshift-cluster/.*' = 'openshift' -# Or better, to rename every OpenShift cluster at once: -'.*/(?P[\w-]+)/.*' = '$var_cluster' +# ~/.config/starship.toml +[[kubernetes.contexts]] +# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user +# equals "admin_user" +context_pattern = "production" +user_pattern = "admin_user" +style = "bold red" +context_alias = "prod" +user_alias = "admin" + +[[kubernetes.contexts]] +# "green" style + a different symbol when Kubernetes current context name contains openshift +context_pattern = ".*openshift.*" +style = "green" +symbol = "💔 " +context_alias = "openshift" + +[[kubernetes.contexts]] +# Using capture groups # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' +context_pattern = "gke_.*_(?P[\\w-]+)" +context_alias = "gke-$cluster" ``` ## 換行 @@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_folders` | `['node_modules']` | Which folders should trigger this module. | | `style` | `'bold green'` | 這個模組的風格。 | | `disabled` | `false` | 停用 `nodejs` 模組。 | -| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | +| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables @@ -2890,8 +3021,8 @@ The [os_info](https://lib.rs/crates/os_info) crate used by this module is known | Option | 預設 | 說明 | | ---------- | --------------------- | ------------------------------------------------------ | -| `format` | `"[$symbol]($style)"` | The format for the module. | -| `style` | `"bold white"` | 這個模組的風格。 | +| `format` | `'[$symbol]($style)'` | The format for the module. | +| `style` | `'bold white'` | 這個模組的風格。 | | `disabled` | `true` | Disables the `os` module. | | `symbols` | | A table that maps each operating system to its symbol. | @@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met: | `symbol` | `'🐍 '` | A format string representing the symbol of Python | | `style` | `'yellow bold'` | 這個模組的風格。 | | `pyenv_version_name` | `false` | 使用 pyenv 取得 Python 的版本。 | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `['py']` | Which extensions should trigger this module | | `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module | @@ -3562,22 +3693,23 @@ The `shell` module shows an indicator for currently used shell. ### 選項 -| Option | 預設 | 說明 | -| ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `'bsh'` | A format string used to represent bash. | -| `fish_indicator` | `'fsh'` | A format string used to represent fish. | -| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | -| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | -| `ion_indicator` | `'ion'` | A format string used to represent ion. | -| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | -| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | -| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | -| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | -| `nu_indicator` | `'nu'` | A format string used to represent nu. | -| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | -| `format` | `'[$indicator]($style) '` | The format for the module. | -| `style` | `'white bold'` | 這個模組的風格。 | -| `disabled` | `true` | Disables the `shell` module. | +| Option | 預設 | 說明 | +| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `bash_indicator` | `'bsh'` | A format string used to represent bash. | +| `fish_indicator` | `'fsh'` | A format string used to represent fish. | +| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. | +| `powershell_indicator` | `'psh'` | A format string used to represent powershell. | +| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. | +| `ion_indicator` | `'ion'` | A format string used to represent ion. | +| `elvish_indicator` | `'esh'` | A format string used to represent elvish. | +| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. | +| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. | +| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. | +| `nu_indicator` | `'nu'` | A format string used to represent nu. | +| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. | +| `format` | `'[$indicator]($style) '` | The format for the module. | +| `style` | `'white bold'` | 這個模組的風格。 | +| `disabled` | `true` | Disables the `shell` module. | ### Variables @@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https: | Option | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"S "` | A format string representing the symbol of Solidity | -| `compiler | ["solc"] | The default compiler for Solidity. | -| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | 這個模組的風格。 | +| `style` | `'bold blue'` | 這個模組的風格。 | | `disabled` | `false` | Disables this module. | ### Variables @@ -4009,6 +4141,39 @@ utc_time_offset = '-5' time_range = '10:00:00-14:00:00' ``` +## Typst + +The `typst` module shows the current installed version of Typst used in a project. + +By default, the module will be shown if any of the following conditions are met: + +- 目前資料夾中有一個 `template.typ` 檔案 +- The current directory contains any `*.typ` file + +### 選項 + +| Option | 預設 | 說明 | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | 這個模組的風格。 | +| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. | +| `detect_files` | `['template.typ']` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `disabled` | `false` | Disables the `daml` module. | + +### Variables + +| 變數 | 範例 | 說明 | +| ------------- | --------- | ----------------------------------------------- | +| version | `v0.9.0` | The version of `typst`, alias for typst_version | +| typst_version | `default` | The current Typst version | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + ## 使用者名稱 `username` 模組顯示現在使用中的使用者名稱。 這個模組將在下列其中一個條件滿足時顯示: diff --git a/docs/zh-TW/faq/README.md b/docs/zh-TW/faq/README.md index 372f6d5ba..f19960c72 100644 --- a/docs/zh-TW/faq/README.md +++ b/docs/zh-TW/faq/README.md @@ -120,3 +120,11 @@ echo -e "\xee\x82\xa0" # Locate and delete the starship binary sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. diff --git a/docs/zh-TW/guide/README.md b/docs/zh-TW/guide/README.md index c93a1f460..f17404c24 100644 --- a/docs/zh-TW/guide/README.md +++ b/docs/zh-TW/guide/README.md @@ -32,6 +32,11 @@ src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square" alt="在推特上追蹤 @StarshipPrompt" /> + Stand With Ukraine

@@ -79,7 +84,7 @@ >Bahasa Indonesia   Italiano   Português do Brasil   Русский   Українська  

-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine) -

@@ -270,7 +274,7 @@ Install Starship using any of the following package managers:
-### 第二步 Set up your shell to use Starship +### 第二步 設定您的 shell 以啟用 Starship 設定您的 shell 以啟用 Starship。 請從下列選單選取您的 shell: @@ -288,7 +292,7 @@ eval "$(starship init bash)"
命令提示字元 -You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: +您需要在 Cmd 中使用 [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+)。 在此路徑 `%LocalAppData%\clink\starship.lua` 建立一個檔案,並填入以下內容: ```lua load(io.popen('starship init cmd'):read("*a"))() @@ -305,7 +309,7 @@ load(io.popen('starship init cmd'):read("*a"))() eval (starship init elvish) ``` -Note: Only Elvish v0.18+ is supported +注意:只支援 Elvish v0.18+ 以上的版本
@@ -376,7 +380,7 @@ eval `starship init tcsh`
Xonsh -將以下內容放到 `~/.xonshrc` 的結尾: +將以下內容加到 `~/.xonshrc` 的結尾: ```python execx($(starship init xonsh)) @@ -423,13 +427,13 @@ eval "$(starship init zsh)" - **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. -## ❤️ Sponsors +## ❤️ 贊助我們 -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. +你可以[成爲一個贊助者](https://github.com/sponsors/starship)來支持這個專案! 你的名字和頭像會在這裏顯示,並且會帶有一個前往你網站的鏈接。 -**Supporter Tier** +**贊助者等級** -- [Appwrite](https://appwrite.io/) +- [後端](https://appwrite.io/)


diff --git a/docs/zh-TW/presets/README.md b/docs/zh-TW/presets/README.md index 7bc035a34..0e6678b39 100644 --- a/docs/zh-TW/presets/README.md +++ b/docs/zh-TW/presets/README.md @@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). [![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night) + +## [Gruvbox Rainbow](./gruvbox-rainbow.md) + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) diff --git a/docs/zh-TW/presets/gruvbox-rainbow.md b/docs/zh-TW/presets/gruvbox-rainbow.md new file mode 100644 index 000000000..d1f3c343b --- /dev/null +++ b/docs/zh-TW/presets/gruvbox-rainbow.md @@ -0,0 +1,21 @@ +[Return to Presets](./README.md#gruvbox-rainbow) + +# Gruvbox Rainbow Preset + +This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). + +![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png) + +### 先決要求 + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal + +### 設定 + +```sh +starship preset gruvbox-rainbow -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/gruvbox-rainbow.toml) + +<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml diff --git a/docs/zh-TW/presets/jetpack.md b/docs/zh-TW/presets/jetpack.md new file mode 100644 index 000000000..0d85a56bb --- /dev/null +++ b/docs/zh-TW/presets/jetpack.md @@ -0,0 +1,24 @@ +[Return to Presets](./README.md#jetpack) + +# Jetpack Preset + +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 uses the terminal's color theme. + +![Screenshot of Jetpack preset](/presets/img/jetpack.png) + +### Prerequisite + +- 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. + +### 設定 + +```sh +starship preset jetpack -o ~/.config/starship.toml +``` + +[Click to download TOML](/presets/toml/jetpack.toml) + +<<< @/.vuepress/public/presets/toml/jetpack.toml diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 000000000..0a580e7ec --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "draft": true +} diff --git a/src/configs/aws.rs b/src/configs/aws.rs index 92e981d4d..22be05422 100644 --- a/src/configs/aws.rs +++ b/src/configs/aws.rs @@ -27,6 +27,9 @@ use std::collections::HashMap; /// When using [`AWSume`](https://awsu.me) the profile /// is read from the `AWSUME_PROFILE` env var and the credentials expiration /// date is read from the `AWSUME_EXPIRATION` env var. +/// +/// When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile +/// is read from the `AWS_SSO_PROFILE` env var. pub struct AwsConfig<'a> { /// The format for the module. pub format: &'a str, diff --git a/src/configs/direnv.rs b/src/configs/direnv.rs new file mode 100755 index 000000000..5ca1e1853 --- /dev/null +++ b/src/configs/direnv.rs @@ -0,0 +1,42 @@ +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = "config-schema", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct DirenvConfig<'a> { + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, + pub allowed_msg: &'a str, + pub not_allowed_msg: &'a str, + pub denied_msg: &'a str, + pub loaded_msg: &'a str, + pub unloaded_msg: &'a str, +} + +impl<'a> Default for DirenvConfig<'a> { + fn default() -> Self { + Self { + format: "[$symbol$loaded/$allowed]($style) ", + symbol: "direnv ", + style: "bold orange", + disabled: true, + detect_extensions: vec![], + detect_files: vec![".envrc"], + detect_folders: vec![], + allowed_msg: "allowed", + not_allowed_msg: "not allowed", + denied_msg: "denied", + loaded_msg: "loaded", + unloaded_msg: "not loaded", + } + } +} diff --git a/src/configs/mod.rs b/src/configs/mod.rs index aeb8193fd..c2cf0a8d9 100644 --- a/src/configs/mod.rs +++ b/src/configs/mod.rs @@ -19,6 +19,7 @@ pub mod daml; pub mod dart; pub mod deno; pub mod directory; +pub mod direnv; pub mod docker_context; pub mod dotnet; pub mod elixir; @@ -84,6 +85,7 @@ pub mod sudo; pub mod swift; pub mod terraform; pub mod time; +pub mod typst; pub mod username; pub mod v; pub mod vagrant; @@ -142,6 +144,8 @@ pub struct FullConfig<'a> { #[serde(borrow)] directory: directory::DirectoryConfig<'a>, #[serde(borrow)] + direnv: direnv::DirenvConfig<'a>, + #[serde(borrow)] docker_context: docker_context::DockerContextConfig<'a>, #[serde(borrow)] dotnet: dotnet::DotnetConfig<'a>, @@ -269,6 +273,8 @@ pub struct FullConfig<'a> { #[serde(borrow)] time: time::TimeConfig<'a>, #[serde(borrow)] + typst: typst::TypstConfig<'a>, + #[serde(borrow)] username: username::UsernameConfig<'a>, #[serde(borrow)] vagrant: vagrant::VagrantConfig<'a>, diff --git a/src/configs/rlang.rs b/src/configs/rlang.rs index 3982b723d..c759f570f 100644 --- a/src/configs/rlang.rs +++ b/src/configs/rlang.rs @@ -27,7 +27,7 @@ impl<'a> Default for RLangConfig<'a> { symbol: "📐 ", disabled: false, detect_extensions: vec!["R", "Rd", "Rmd", "Rproj", "Rsx"], - detect_files: vec![".Rprofile"], + detect_files: vec!["DESCRIPTION"], detect_folders: vec![".Rproj.user"], } } diff --git a/src/configs/shell.rs b/src/configs/shell.rs index 540ea8e32..9d0bd3aa0 100644 --- a/src/configs/shell.rs +++ b/src/configs/shell.rs @@ -13,6 +13,8 @@ pub struct ShellConfig<'a> { pub fish_indicator: &'a str, pub zsh_indicator: &'a str, pub powershell_indicator: &'a str, + #[serde(skip_serializing_if = "Option::is_none")] + pub pwsh_indicator: Option<&'a str>, pub ion_indicator: &'a str, pub elvish_indicator: &'a str, pub tcsh_indicator: &'a str, @@ -32,6 +34,7 @@ impl<'a> Default for ShellConfig<'a> { fish_indicator: "fsh", zsh_indicator: "zsh", powershell_indicator: "psh", + pwsh_indicator: None, ion_indicator: "ion", elvish_indicator: "esh", tcsh_indicator: "tsh", diff --git a/src/configs/starship_root.rs b/src/configs/starship_root.rs index aa3d65f9f..86fe7e754 100644 --- a/src/configs/starship_root.rs +++ b/src/configs/starship_root.rs @@ -18,6 +18,7 @@ pub struct StarshipRootConfig { pub scan_timeout: u64, pub command_timeout: u64, pub add_newline: bool, + pub follow_symlinks: bool, #[serde(skip_serializing_if = "Option::is_none")] pub palette: Option, pub palettes: HashMap, @@ -90,6 +91,7 @@ pub const PROMPT_ORDER: &[&str] = &[ "solidity", "swift", "terraform", + "typst", "vlang", "vagrant", "zig", @@ -105,6 +107,7 @@ pub const PROMPT_ORDER: &[&str] = &[ "gcloud", "openstack", "azure", + "direnv", "env_var", "crystal", "custom", @@ -134,6 +137,7 @@ impl Default for StarshipRootConfig { scan_timeout: 30, command_timeout: 500, add_newline: true, + follow_symlinks: true, palette: None, palettes: HashMap::default(), } diff --git a/src/configs/typst.rs b/src/configs/typst.rs new file mode 100644 index 000000000..28f4fc62b --- /dev/null +++ b/src/configs/typst.rs @@ -0,0 +1,34 @@ +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = "config-schema", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct TypstConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl<'a> Default for TypstConfig<'a> { + fn default() -> Self { + TypstConfig { + format: "via [$symbol($version )]($style)", + version_format: "v${raw}", + symbol: "t ", + style: "bold #0093A7", + disabled: false, + detect_extensions: vec!["typ"], + detect_files: vec!["template.typ"], + detect_folders: vec![], + } + } +} diff --git a/src/configure.rs b/src/configure.rs index ec23cf799..9ce0be34a 100644 --- a/src/configure.rs +++ b/src/configure.rs @@ -1,3 +1,4 @@ +use std::fmt::Write as _; use std::process; use std::process::Stdio; use std::str::FromStr; @@ -96,8 +97,10 @@ pub fn print_configuration(context: &Context, use_default: bool, paths: &[String "# $all is shorthand for {}", PROMPT_ORDER .iter() - .map(|module_name| format!("${module_name}")) - .collect::() + .fold(String::new(), |mut output, module_name| { + let _ = write!(output, "${module_name}"); + output + }) ); // Unwrapping is fine because config is based on FullConfig @@ -105,10 +108,10 @@ pub fn print_configuration(context: &Context, use_default: bool, paths: &[String if !use_default && !custom_modules.is_empty() { println!( "# $custom (excluding any modules already listed in `format`) is shorthand for {}", - custom_modules - .keys() - .map(|module_name| format!("${{custom.{module_name}}}")) - .collect::() + custom_modules.keys().fold(String::new(), |mut output, b| { + let _ = write!(output, "${{custom.{b}}}"); + output + }) ); } } diff --git a/src/context.rs b/src/context.rs index a07530093..4a651908f 100644 --- a/src/context.rs +++ b/src/context.rs @@ -8,6 +8,7 @@ use crate::modules; use crate::utils; use clap::Parser; use gix::{ + repository::Kind, sec::{self as git_sec, trust::DefaultForLevel}, state as git_state, Repository, ThreadSafeRepository, }; @@ -243,7 +244,7 @@ impl<'a> Context<'a> { .any(|env_var| self.get_env(env_var).is_some()) } - /// Returns true if 'detect_env_vars' is empty, + /// Returns true if `detect_env_vars` is empty, /// or if at least one environment variable is set and no negated environment variable is set pub fn detect_env_vars(&'a self, env_vars: &'a [&'a str]) -> bool { if env_vars.is_empty() { @@ -318,7 +319,10 @@ impl<'a> Context<'a> { let shared_repo = match ThreadSafeRepository::discover_with_environment_overrides_opts( &self.current_dir, - Default::default(), + gix::discover::upwards::Options { + match_ceiling_dir_or_error: false, + ..Default::default() + }, git_open_opts_map, ) { Ok(repo) => repo, @@ -335,7 +339,10 @@ impl<'a> Context<'a> { ); let branch = get_current_branch(&repository); - let remote = get_remote_repository_info(&repository, branch.as_deref()); + let remote = get_remote_repository_info( + &repository, + branch.as_ref().map(|name| name.as_ref()), + ); let path = repository.path().to_path_buf(); let fs_monitor_value_is_true = repository @@ -345,12 +352,13 @@ impl<'a> Context<'a> { Ok(Repo { repo: shared_repo, - branch, + branch: branch.map(|b| b.shorten().to_string()), workdir: repository.work_dir().map(PathBuf::from), path, state: repository.state(), remote, fs_monitor_value_is_true, + kind: repository.kind(), }) }) } @@ -358,7 +366,11 @@ impl<'a> Context<'a> { pub fn dir_contents(&self) -> Result<&DirContents, std::io::Error> { self.dir_contents.get_or_try_init(|| { let timeout = self.root_config.scan_timeout; - DirContents::from_path_with_timeout(&self.current_dir, Duration::from_millis(timeout)) + DirContents::from_path_with_timeout( + &self.current_dir, + Duration::from_millis(timeout), + self.root_config.follow_symlinks, + ) }) } @@ -368,7 +380,8 @@ impl<'a> Context<'a> { "bash" => Shell::Bash, "fish" => Shell::Fish, "ion" => Shell::Ion, - "powershell" | "pwsh" => Shell::PowerShell, + "pwsh" => Shell::Pwsh, + "powershell" => Shell::PowerShell, "zsh" => Shell::Zsh, "elvish" => Shell::Elvish, "tcsh" => Shell::Tcsh, @@ -479,11 +492,15 @@ pub struct DirContents { impl DirContents { #[cfg(test)] - fn from_path(base: &Path) -> Result { - Self::from_path_with_timeout(base, Duration::from_secs(30)) + fn from_path(base: &Path, follow_symlinks: bool) -> Result { + Self::from_path_with_timeout(base, Duration::from_secs(30), follow_symlinks) } - fn from_path_with_timeout(base: &Path, timeout: Duration) -> Result { + fn from_path_with_timeout( + base: &Path, + timeout: Duration, + follow_symlinks: bool, + ) -> Result { let start = Instant::now(); let mut folders: HashSet = HashSet::new(); @@ -501,7 +518,15 @@ impl DirContents { .filter_map(|(_, entry)| entry.ok()) .for_each(|entry| { let path = PathBuf::from(entry.path().strip_prefix(base).unwrap()); - if entry.path().is_dir() { + + let is_dir = match follow_symlinks { + true => entry.path().is_dir(), + false => fs::symlink_metadata(entry.path()) + .map(|m| m.is_dir()) + .unwrap_or(false), + }; + + if is_dir { folders.insert(path); } else { if !path.to_string_lossy().starts_with('.') { @@ -605,7 +630,8 @@ pub struct Repo { pub repo: ThreadSafeRepository, /// If `current_dir` is a git repository or is contained within one, - /// this is the current branch name of that repo. + /// this is the short name of the current branch name of that repo, + /// i.e. `main`. pub branch: Option, /// If `current_dir` is a git repository or is contained within one, @@ -624,6 +650,9 @@ pub struct Repo { /// Contains `true` if the value of `core.fsmonitor` is set to `true`. /// If not `true`, `fsmonitor` is explicitly disabled in git commands. fs_monitor_value_is_true: bool, + + // Kind of repository, work tree or bare + pub kind: Kind, } impl Repo { @@ -766,24 +795,21 @@ impl<'a> ScanAncestors<'a> { } } -fn get_current_branch(repository: &Repository) -> Option { - let name = repository.head_name().ok()??; - let shorthand = name.shorten(); - - Some(shorthand.to_string()) +fn get_current_branch(repository: &Repository) -> Option { + repository.head_name().ok()? } fn get_remote_repository_info( repository: &Repository, - branch_name: Option<&str>, + branch_name: Option<&gix::refs::FullNameRef>, ) -> Option { let branch_name = branch_name?; let branch = repository - .branch_remote_ref(branch_name) + .branch_remote_ref_name(branch_name, gix::remote::Direction::Fetch) .and_then(std::result::Result::ok) .map(|r| r.shorten().to_string()); let name = repository - .branch_remote_name(branch_name) + .branch_remote_name(branch_name.shorten(), gix::remote::Direction::Fetch) .map(|n| n.as_bstr().to_string()); Some(Remote { branch, name }) @@ -794,6 +820,7 @@ pub enum Shell { Bash, Fish, Ion, + Pwsh, PowerShell, Zsh, Elvish, @@ -897,10 +924,63 @@ mod tests { Ok(dir) } + #[test] + fn test_scan_dir_no_symlinks() -> Result<(), Box> { + #[cfg(not(target_os = "windows"))] + use std::os::unix::fs::symlink; + #[cfg(target_os = "windows")] + use std::os::windows::fs::symlink_dir as symlink; + + let d = testdir(&["file"])?; + fs::create_dir(d.path().join("folder"))?; + + symlink(d.path().join("folder"), d.path().join("link_to_folder"))?; + symlink(d.path().join("file"), d.path().join("link_to_file"))?; + + let dc_following_symlinks = DirContents::from_path(d.path(), true)?; + + assert!(ScanDir { + dir_contents: &dc_following_symlinks, + files: &["link_to_file"], + extensions: &[], + folders: &[], + } + .is_match()); + + assert!(ScanDir { + dir_contents: &dc_following_symlinks, + files: &[], + extensions: &[], + folders: &["link_to_folder"], + } + .is_match()); + + let dc_not_following_symlinks = DirContents::from_path(d.path(), false)?; + + assert!(ScanDir { + dir_contents: &dc_not_following_symlinks, + files: &["link_to_file"], + extensions: &[], + folders: &[], + } + .is_match()); + + assert!(!ScanDir { + dir_contents: &dc_not_following_symlinks, + files: &[], + extensions: &[], + folders: &["link_to_folder"], + } + .is_match()); + + Ok(()) + } + #[test] fn test_scan_dir() -> Result<(), Box> { let empty = testdir(&[])?; - let empty_dc = DirContents::from_path(empty.path())?; + let follow_symlinks = true; + let empty_dc = DirContents::from_path(empty.path(), follow_symlinks)?; assert!(!ScanDir { dir_contents: &empty_dc, @@ -912,7 +992,7 @@ mod tests { empty.close()?; let rust = testdir(&["README.md", "Cargo.toml", "src/main.rs"])?; - let rust_dc = DirContents::from_path(rust.path())?; + let rust_dc = DirContents::from_path(rust.path(), follow_symlinks)?; assert!(!ScanDir { dir_contents: &rust_dc, files: &["package.json"], @@ -923,7 +1003,7 @@ mod tests { rust.close()?; let java = testdir(&["README.md", "src/com/test/Main.java", "pom.xml"])?; - let java_dc = DirContents::from_path(java.path())?; + let java_dc = DirContents::from_path(java.path(), follow_symlinks)?; assert!(!ScanDir { dir_contents: &java_dc, files: &["package.json"], @@ -934,7 +1014,7 @@ mod tests { java.close()?; let node = testdir(&["README.md", "node_modules/lodash/main.js", "package.json"])?; - let node_dc = DirContents::from_path(node.path())?; + let node_dc = DirContents::from_path(node.path(), follow_symlinks)?; assert!(ScanDir { dir_contents: &node_dc, files: &["package.json"], @@ -945,7 +1025,7 @@ mod tests { node.close()?; let tarballs = testdir(&["foo.tgz", "foo.tar.gz"])?; - let tarballs_dc = DirContents::from_path(tarballs.path())?; + let tarballs_dc = DirContents::from_path(tarballs.path(), follow_symlinks)?; assert!(ScanDir { dir_contents: &tarballs_dc, files: &[], @@ -956,7 +1036,7 @@ mod tests { tarballs.close()?; let dont_match_ext = testdir(&["foo.js", "foo.ts"])?; - let dont_match_ext_dc = DirContents::from_path(dont_match_ext.path())?; + let dont_match_ext_dc = DirContents::from_path(dont_match_ext.path(), follow_symlinks)?; assert!(!ScanDir { dir_contents: &dont_match_ext_dc, files: &[], @@ -967,7 +1047,7 @@ mod tests { dont_match_ext.close()?; let dont_match_file = testdir(&["goodfile", "evilfile"])?; - let dont_match_file_dc = DirContents::from_path(dont_match_file.path())?; + let dont_match_file_dc = DirContents::from_path(dont_match_file.path(), follow_symlinks)?; assert!(!ScanDir { dir_contents: &dont_match_file_dc, files: &["goodfile", "!notfound", "!evilfile"], @@ -978,7 +1058,8 @@ mod tests { dont_match_file.close()?; let dont_match_folder = testdir(&["gooddir/somefile", "evildir/somefile"])?; - let dont_match_folder_dc = DirContents::from_path(dont_match_folder.path())?; + let dont_match_folder_dc = + DirContents::from_path(dont_match_folder.path(), follow_symlinks)?; assert!(!ScanDir { dir_contents: &dont_match_folder_dc, files: &[], diff --git a/src/init/starship.zsh b/src/init/starship.zsh index 01229be5b..2ca01052b 100644 --- a/src/init/starship.zsh +++ b/src/init/starship.zsh @@ -23,23 +23,22 @@ else } fi - # The two functions below follow the naming convention `prompt__` # for compatibility with Zsh's prompt system. See # https://github.com/zsh-users/zsh/blob/2876c25a28b8052d6683027998cc118fc9b50157/Functions/Prompts/promptinit#L155 # Runs before each new command line. prompt_starship_precmd() { - # Save the status, because commands in this pipeline will change $? + # Save the status, because subsequent commands in this function will change $? STARSHIP_CMD_STATUS=$? STARSHIP_PIPE_STATUS=(${pipestatus[@]}) - # Compute cmd_duration, if we have a time to consume, otherwise clear the - # previous duration + # Calculate duration if a command was executed if (( ${+STARSHIP_START_TIME} )); then __starship_get_time && (( STARSHIP_DURATION = STARSHIP_CAPTURED_TIME - STARSHIP_START_TIME )) unset STARSHIP_START_TIME + # Drop status and duration otherwise else - unset STARSHIP_DURATION + unset STARSHIP_DURATION STARSHIP_CMD_STATUS STARSHIP_PIPE_STATUS fi # Use length of jobstates array as number of jobs. Expansion fails inside @@ -47,7 +46,8 @@ prompt_starship_precmd() { STARSHIP_JOBS_COUNT=${#jobstates} } -# Runs after the user submits the command line, but before it is executed. +# Runs after the user submits the command line, but before it is executed and +# only if there's an actual command to run prompt_starship_preexec() { __starship_get_time && STARSHIP_START_TIME=$STARSHIP_CAPTURED_TIME } @@ -76,8 +76,6 @@ else zle -N zle-keymap-select starship_zle-keymap-select-wrapped; fi -__starship_get_time && STARSHIP_START_TIME=$STARSHIP_CAPTURED_TIME - export STARSHIP_SHELL="zsh" # Set up the session key that will be used to store logs @@ -89,7 +87,6 @@ VIRTUAL_ENV_DISABLE_PROMPT=1 setopt promptsubst -PROMPT='$(::STARSHIP:: prompt --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")' -RPROMPT='$(::STARSHIP:: prompt --right --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")' +PROMPT='$('::STARSHIP::' prompt --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")' +RPROMPT='$('::STARSHIP::' prompt --right --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")' PROMPT2="$(::STARSHIP:: prompt --continuation)" - diff --git a/src/main.rs b/src/main.rs index cc30950a4..1e22ce6cf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -188,7 +188,7 @@ fn main() { (_, _, true) => Target::Continuation, (_, _, _) => Target::Main, }; - print::prompt(properties, target) + print::prompt(properties, target); } Commands::Module { name, @@ -211,7 +211,7 @@ fn main() { let context = Context::default(); if let Some(name) = name { if let Some(value) = value { - configure::update_configuration(&context, &name, &value) + configure::update_configuration(&context, &name, &value); } } else if let Err(reason) = configure::edit_configuration(&context, None) { eprintln!("Could not edit configuration: {reason}"); @@ -222,7 +222,7 @@ fn main() { configure::print_configuration(&Context::default(), default, &name); } Commands::Toggle { name, value } => { - configure::toggle_configuration(&Context::default(), &name, &value) + configure::toggle_configuration(&Context::default(), &name, &value); } Commands::BugReport => bug_report::create(), Commands::Time => { diff --git a/src/module.rs b/src/module.rs index 26d46c976..0dcc0aad4 100644 --- a/src/module.rs +++ b/src/module.rs @@ -27,6 +27,7 @@ pub const ALL_MODULES: &[&str] = &[ "dart", "deno", "directory", + "direnv", "docker_context", "dotnet", "elixir", @@ -90,6 +91,7 @@ pub const ALL_MODULES: &[&str] = &[ "swift", "terraform", "time", + "typst", "username", "vagrant", "vcsh", diff --git a/src/modules/aws.rs b/src/modules/aws.rs index 0d837c2ce..fa455862f 100644 --- a/src/modules/aws.rs +++ b/src/modules/aws.rs @@ -97,7 +97,13 @@ fn get_aws_profile_and_region( context: &Context, aws_config: &AwsConfigFile, ) -> (Option, Option) { - let profile_env_vars = ["AWSU_PROFILE", "AWS_VAULT", "AWSUME_PROFILE", "AWS_PROFILE"]; + let profile_env_vars = [ + "AWSU_PROFILE", + "AWS_VAULT", + "AWSUME_PROFILE", + "AWS_PROFILE", + "AWS_SSO_PROFILE", + ]; let region_env_vars = ["AWS_REGION", "AWS_DEFAULT_REGION"]; let profile = profile_env_vars .iter() @@ -414,6 +420,20 @@ mod tests { assert_eq!(expected, actual); } + #[test] + fn profile_set_from_awsssocli() { + let actual = ModuleRenderer::new("aws") + .env("AWS_SSO_PROFILE", "astronauts-awsssocli") + .env("AWS_ACCESS_KEY_ID", "dummy") + .collect(); + let expected = Some(format!( + "on {}", + Color::Yellow.bold().paint("☁️ astronauts-awsssocli ") + )); + + assert_eq!(expected, actual); + } + #[test] fn profile_and_region_set() { let actual = ModuleRenderer::new("aws") @@ -668,7 +688,7 @@ credential_process = /opt/bin/awscreds-retriever let expiration_env_vars = ["AWS_SESSION_EXPIRATION", "AWS_CREDENTIAL_EXPIRATION"]; expiration_env_vars.iter().for_each(|env_var| { - let now_plus_half_hour: DateTime = chrono::DateTime::from_utc( + let now_plus_half_hour: DateTime = DateTime::from_naive_utc_and_offset( NaiveDateTime::from_timestamp_opt(chrono::Local::now().timestamp() + 1800, 0) .unwrap(), Utc, @@ -683,14 +703,21 @@ credential_process = /opt/bin/awscreds-retriever now_plus_half_hour.to_rfc3339_opts(SecondsFormat::Secs, true), ) .collect(); - let expected = Some(format!( - "on {}", - Color::Yellow - .bold() - .paint("☁️ astronauts (ap-northeast-2) [30m] ") - )); - assert_eq!(expected, actual); + let possible_values = [ + "30m2s", "30m1s", "30m", "29m59s", "29m58s", "29m57s", "29m56s", "29m55s", + ]; + let possible_values = possible_values.map(|duration| { + let segment_colored = format!("☁️ astronauts (ap-northeast-2) [{duration}] "); + Some(format!( + "on {}", + Color::Yellow.bold().paint(segment_colored) + )) + }); + assert!( + possible_values.contains(&actual), + "time is not in range: {actual:?}" + ); }); } @@ -702,7 +729,7 @@ credential_process = /opt/bin/awscreds-retriever use chrono::{DateTime, NaiveDateTime, Utc}; - let now_plus_half_hour: DateTime = chrono::DateTime::from_utc( + let now_plus_half_hour: DateTime = DateTime::from_naive_utc_and_offset( NaiveDateTime::from_timestamp_opt(chrono::Local::now().timestamp() + 1800, 0).unwrap(), Utc, ); @@ -723,46 +750,32 @@ aws_secret_access_key=dummy ) .unwrap(); - let actual = ModuleRenderer::new("aws") - .env("AWS_PROFILE", "astronauts") - .env("AWS_REGION", "ap-northeast-2") - .env( - "AWS_SHARED_CREDENTIALS_FILE", - credentials_path.to_string_lossy().as_ref(), - ) - .collect(); + let credentials_env_vars = ["AWS_SHARED_CREDENTIALS_FILE", "AWS_CREDENTIALS_FILE"]; + credentials_env_vars.iter().for_each(|env_var| { + let actual = ModuleRenderer::new("aws") + .env("AWS_PROFILE", "astronauts") + .env("AWS_REGION", "ap-northeast-2") + .env(env_var, credentials_path.to_string_lossy().as_ref()) + .collect(); - let actual_variant = ModuleRenderer::new("aws") - .env("AWS_PROFILE", "astronauts") - .env("AWS_REGION", "ap-northeast-2") - .env( - "AWS_CREDENTIALS_FILE", - credentials_path.to_string_lossy().as_ref(), - ) - .collect(); + // In principle, "30m" should be correct. However, bad luck in scheduling + // on shared runners may delay it. + let possible_values = [ + "30m2s", "30m1s", "30m", "29m59s", "29m58s", "29m57s", "29m56s", "29m55s", + ]; + let possible_values = possible_values.map(|duration| { + let segment_colored = format!("☁️ astronauts (ap-northeast-2) [{duration}] "); + Some(format!( + "on {}", + Color::Yellow.bold().paint(segment_colored) + )) + }); - assert_eq!( - actual, actual_variant, - "both AWS_SHARED_CREDENTIALS_FILE and AWS_CREDENTIALS_FILE should work" - ); - - // In principle, "30m" should be correct. However, bad luck in scheduling - // on shared runners may delay it. - let possible_values = [ - "30m2s", "30m1s", "30m", "29m59s", "29m58s", "29m57s", "29m56s", "29m55s", - ]; - let possible_values = possible_values.map(|duration| { - let segment_colored = format!("☁️ astronauts (ap-northeast-2) [{duration}] "); - Some(format!( - "on {}", - Color::Yellow.bold().paint(segment_colored) - )) + assert!( + possible_values.contains(&actual), + "time is not in range: {actual:?}" + ); }); - - assert!( - possible_values.contains(&actual), - "time is not in range: {actual:?}" - ); }); dir.close() @@ -789,7 +802,7 @@ aws_secret_access_key=dummy fn expiration_date_set_expired() { use chrono::{DateTime, NaiveDateTime, SecondsFormat, Utc}; - let now: DateTime = chrono::DateTime::from_utc( + let now: DateTime = DateTime::from_naive_utc_and_offset( NaiveDateTime::from_timestamp_opt(chrono::Local::now().timestamp() - 1800, 0).unwrap(), Utc, ); diff --git a/src/modules/c.rs b/src/modules/c.rs index b8aa3b0ec..3e520f4dc 100644 --- a/src/modules/c.rs +++ b/src/modules/c.rs @@ -47,7 +47,7 @@ pub fn module<'a>(context: &'a Context) -> Option> { } else { return None; }; - Some(c_compiler).map(Cow::Borrowed).map(Ok) + Some(Ok(Cow::Borrowed(c_compiler))) } "version" => { let c_compiler_info = &c_compiler_info.deref().as_ref()?.stdout; diff --git a/src/modules/direnv.rs b/src/modules/direnv.rs new file mode 100644 index 000000000..4816a7ebb --- /dev/null +++ b/src/modules/direnv.rs @@ -0,0 +1,406 @@ +use std::borrow::Cow; +use std::path::PathBuf; +use std::str::FromStr; + +use super::{Context, Module, ModuleConfig}; + +use crate::configs::direnv::DirenvConfig; +use crate::formatter::StringFormatter; + +/// Creates a module with the current direnv rc +pub fn module<'a>(context: &'a Context) -> Option> { + let mut module = context.new_module("direnv"); + let config = DirenvConfig::try_load(module.config); + + let direnv_applies = !config.disabled + && context + .try_begin_scan()? + .set_extensions(&config.detect_extensions) + .set_files(&config.detect_files) + .set_folders(&config.detect_folders) + .is_match(); + + if !direnv_applies { + return None; + } + + let direnv_status = &context.exec_cmd("direnv", &["status"])?.stdout; + let state = match DirenvState::from_str(direnv_status) { + Ok(s) => s, + Err(e) => { + log::warn!("{e}"); + + return None; + } + }; + + let parsed = StringFormatter::new(config.format).and_then(|formatter| { + formatter + .map_style(|variable| match variable { + "style" => Some(Ok(config.style)), + _ => None, + }) + .map(|variable| match variable { + "symbol" => Some(Ok(Cow::from(config.symbol))), + "rc_path" => Some(Ok(state.rc_path.to_string_lossy())), + "allowed" => Some(Ok(match state.allowed { + AllowStatus::Allowed => Cow::from(config.allowed_msg), + AllowStatus::NotAllowed => Cow::from(config.not_allowed_msg), + AllowStatus::Denied => Cow::from(config.denied_msg), + })), + "loaded" => state + .loaded + .then_some(config.loaded_msg) + .or(Some(config.unloaded_msg)) + .map(Cow::from) + .map(Ok), + _ => None, + }) + .parse(None, Some(context)) + }); + + module.set_segments(match parsed { + Ok(segments) => segments, + Err(e) => { + log::warn!("{e}"); + + return None; + } + }); + + Some(module) +} + +struct DirenvState { + pub rc_path: PathBuf, + pub allowed: AllowStatus, + pub loaded: bool, +} + +impl FromStr for DirenvState { + type Err = Cow<'static, str>; + + fn from_str(s: &str) -> Result { + let mut rc_path = PathBuf::new(); + let mut allowed = None; + let mut loaded = true; + + for line in s.lines() { + if let Some(path) = line.strip_prefix("Found RC path") { + rc_path = PathBuf::from_str(path.trim()).map_err(|e| Cow::from(e.to_string()))? + } else if let Some(value) = line.strip_prefix("Found RC allowed") { + allowed = Some(AllowStatus::from_str(value.trim())?); + } else if line.contains("No .envrc or .env loaded") { + loaded = false; + }; + } + + if rc_path.as_os_str().is_empty() || allowed.is_none() { + return Err(Cow::from("unknown direnv state")); + } + + Ok(Self { + rc_path, + allowed: allowed.unwrap(), + loaded, + }) + } +} + +#[derive(Debug)] +enum AllowStatus { + Allowed, + NotAllowed, + Denied, +} + +impl FromStr for AllowStatus { + type Err = Cow<'static, str>; + + fn from_str(s: &str) -> Result { + match s { + "0" | "true" => Ok(Self::Allowed), + "1" => Ok(Self::NotAllowed), + "2" | "false" => Ok(Self::Denied), + _ => Err(Cow::from("invalid allow status")), + } + } +} + +#[cfg(test)] +mod tests { + use crate::test::ModuleRenderer; + use crate::utils::CommandOutput; + use std::io; + use std::path::Path; + #[test] + fn folder_without_rc_files() { + let renderer = ModuleRenderer::new("direnv") + .config(toml::toml! { + [direnv] + disabled = false + }) + .cmd( + "direnv status", + Some(CommandOutput { + stdout: status_cmd_output_without_rc(), + stderr: String::default(), + }), + ); + + assert_eq!(None, renderer.collect()); + } + #[test] + fn folder_with_unloaded_rc_file_pre_2_33() -> io::Result<()> { + let dir = tempfile::tempdir()?; + let rc_path = dir.path().join(".envrc"); + + std::fs::File::create(&rc_path)?.sync_all()?; + + let renderer = ModuleRenderer::new("direnv") + .config(toml::toml! { + [direnv] + disabled = false + }) + .path(dir.path()) + .cmd( + "direnv status", + Some(CommandOutput { + stdout: status_cmd_output_with_rc(dir.path(), false, "0", true), + stderr: String::default(), + }), + ); + + assert_eq!( + Some(format!("direnv not loaded/allowed ")), + renderer.collect() + ); + + dir.close() + } + #[test] + fn folder_with_unloaded_rc_file() -> io::Result<()> { + let dir = tempfile::tempdir()?; + let rc_path = dir.path().join(".envrc"); + + std::fs::File::create(rc_path)?.sync_all()?; + + let renderer = ModuleRenderer::new("direnv") + .config(toml::toml! { + [direnv] + disabled = false + }) + .path(dir.path()) + .cmd( + "direnv status", + Some(CommandOutput { + stdout: status_cmd_output_with_rc(dir.path(), false, "0", false), + stderr: String::default(), + }), + ); + + assert_eq!( + Some("direnv not loaded/allowed ".to_string()), + renderer.collect() + ); + + dir.close() + } + #[test] + fn folder_with_loaded_rc_file_pre_2_33() -> io::Result<()> { + let dir = tempfile::tempdir()?; + let rc_path = dir.path().join(".envrc"); + + std::fs::File::create(&rc_path)?.sync_all()?; + + let renderer = ModuleRenderer::new("direnv") + .config(toml::toml! { + [direnv] + disabled = false + }) + .path(dir.path()) + .cmd( + "direnv status", + Some(CommandOutput { + stdout: status_cmd_output_with_rc(dir.path(), true, "0", true), + stderr: String::default(), + }), + ); + + assert_eq!(Some(format!("direnv loaded/allowed ")), renderer.collect()); + + dir.close() + } + #[test] + fn folder_with_loaded_rc_file() -> io::Result<()> { + let dir = tempfile::tempdir()?; + let rc_path = dir.path().join(".envrc"); + + std::fs::File::create(rc_path)?.sync_all()?; + + let renderer = ModuleRenderer::new("direnv") + .config(toml::toml! { + [direnv] + disabled = false + }) + .path(dir.path()) + .cmd( + "direnv status", + Some(CommandOutput { + stdout: status_cmd_output_with_rc(dir.path(), true, "0", false), + stderr: String::default(), + }), + ); + + assert_eq!( + Some("direnv loaded/allowed ".to_string()), + renderer.collect() + ); + + dir.close() + } + #[test] + fn folder_with_loaded_and_denied_rc_file_pre_2_33() -> io::Result<()> { + let dir = tempfile::tempdir()?; + let rc_path = dir.path().join(".envrc"); + + std::fs::File::create(&rc_path)?.sync_all()?; + + let renderer = ModuleRenderer::new("direnv") + .config(toml::toml! { + [direnv] + disabled = false + }) + .path(dir.path()) + .cmd( + "direnv status", + Some(CommandOutput { + stdout: status_cmd_output_with_rc(dir.path(), true, "2", true), + stderr: String::default(), + }), + ); + + assert_eq!(Some(format!("direnv loaded/denied ")), renderer.collect()); + + dir.close() + } + #[test] + fn folder_with_loaded_and_not_allowed_rc_file() -> io::Result<()> { + let dir = tempfile::tempdir()?; + let rc_path = dir.path().join(".envrc"); + + std::fs::File::create(&rc_path)?.sync_all()?; + + let renderer = ModuleRenderer::new("direnv") + .config(toml::toml! { + [direnv] + disabled = false + }) + .path(dir.path()) + .cmd( + "direnv status", + Some(CommandOutput { + stdout: status_cmd_output_with_rc(dir.path(), true, "1", false), + stderr: String::default(), + }), + ); + + assert_eq!( + Some(format!("direnv loaded/not allowed ")), + renderer.collect() + ); + + dir.close() + } + #[test] + fn folder_with_loaded_and_denied_rc_file() -> io::Result<()> { + let dir = tempfile::tempdir()?; + let rc_path = dir.path().join(".envrc"); + + std::fs::File::create(rc_path)?.sync_all()?; + + let renderer = ModuleRenderer::new("direnv") + .config(toml::toml! { + [direnv] + disabled = false + }) + .path(dir.path()) + .cmd( + "direnv status", + Some(CommandOutput { + stdout: status_cmd_output_with_rc(dir.path(), true, "2", false), + stderr: String::default(), + }), + ); + + assert_eq!( + Some("direnv loaded/denied ".to_string()), + renderer.collect() + ); + + dir.close() + } + fn status_cmd_output_without_rc() -> String { + String::from( + r"\ +direnv exec path /usr/bin/direnv +DIRENV_CONFIG /home/test/.config/direnv +bash_path /usr/bin/bash +disable_stdin false +warn_timeout 5s +whitelist.prefix [] +whitelist.exact map[] +No .envrc or .env loaded +No .envrc or .env found", + ) + } + fn status_cmd_output_with_rc( + dir: impl AsRef, + loaded: bool, + allowed: &str, + use_legacy_boolean_flags: bool, + ) -> String { + let rc_path = dir.as_ref().join(".envrc"); + let rc_path = rc_path.to_string_lossy(); + + let allowed_value = match (use_legacy_boolean_flags, allowed) { + (true, "0") => "true", + (true, ..) => "false", + (false, val) => val, + }; + + let loaded = if loaded { + format!( + r#"\ + Loaded RC path {rc_path} + Loaded watch: ".envrc" - 2023-04-30T09:51:04-04:00 + Loaded watch: "../.local/share/direnv/allow/abcd" - 2023-04-30T09:52:58-04:00 + Loaded RC allowed {allowed_value} + Loaded RC allowPath + "# + ) + } else { + String::from("No .envrc or .env loaded") + }; + + let state = allowed.to_string(); + + format!( + r#"\ +direnv exec path /usr/bin/direnv +DIRENV_CONFIG /home/test/.config/direnv +bash_path /usr/bin/bash +disable_stdin false +warn_timeout 5s +whitelist.prefix [] +whitelist.exact map[] +{loaded} +Found RC path {rc_path} +Found watch: ".envrc" - 2023-04-25T18:45:54-04:00 +Found watch: "../.local/share/direnv/allow/abcd" - 1969-12-31T19:00:00-05:00 +Found RC allowed {state} +Found RC allowPath /home/test/.local/share/direnv/allow/abcd +"# + ) + } +} diff --git a/src/modules/docker_context.rs b/src/modules/docker_context.rs index 1c30001a8..ad6c258a7 100644 --- a/src/modules/docker_context.rs +++ b/src/modules/docker_context.rs @@ -57,7 +57,7 @@ pub fn module<'a>(context: &'a Context) -> Option> { } }; - if ctx == "default" { + if ctx == "default" || ctx.starts_with("unix://") { return None; } @@ -293,6 +293,24 @@ mod tests { cfg_dir.close() } + #[test] + fn test_docker_host_env_with_unix_path() -> io::Result<()> { + let cfg_dir = tempfile::tempdir()?; + + let actual = ModuleRenderer::new("docker_context") + .env("DOCKER_HOST", "unix:///run/user/1001/podman/podman.sock") + .config(toml::toml! { + [docker_context] + only_with_files = false + }) + .collect(); + let expected = None; + + assert_eq!(expected, actual); + + cfg_dir.close() + } + #[test] fn test_docker_context_env() -> io::Result<()> { let cfg_dir = tempfile::tempdir()?; diff --git a/src/modules/dotnet.rs b/src/modules/dotnet.rs index e3c59008a..4539b4d58 100644 --- a/src/modules/dotnet.rs +++ b/src/modules/dotnet.rs @@ -599,13 +599,13 @@ mod tests { } fn make_csproj_with_tfm(tfm_element: &str, tfm: &str) -> String { - let json_text = r#" + let json_text = r" TFM_VALUE - "#; + "; json_text .replace("TFM_ELEMENT", tfm_element) .replace("TFM_VALUE", tfm) diff --git a/src/modules/fossil_metrics.rs b/src/modules/fossil_metrics.rs index 5ec97b6c1..45ceb2b40 100644 --- a/src/modules/fossil_metrics.rs +++ b/src/modules/fossil_metrics.rs @@ -287,10 +287,10 @@ mod tests { "{}{}", expect_added .map(|added| format!("{} ", expect_added_style.paint(format!("+{added}")))) - .unwrap_or(String::from("")), + .unwrap_or_default(), expect_deleted .map(|deleted| format!("{} ", expect_deleted_style.paint(format!("-{deleted}")))) - .unwrap_or(String::from("")), + .unwrap_or_default(), )); assert_eq!(expected, actual); } diff --git a/src/modules/git_status.rs b/src/modules/git_status.rs index e54ba7000..d1dd4c098 100644 --- a/src/modules/git_status.rs +++ b/src/modules/git_status.rs @@ -34,6 +34,11 @@ pub fn module<'a>(context: &'a Context) -> Option> { // Return None if not in git repository let repo = context.get_repo().ok()?; + if repo.kind.is_bare() { + log::debug!("This is a bare repository, git_status is not applicable"); + return None; + } + if let Some(git_status) = git_status_wsl(context, &config) { if git_status.is_empty() { return None; @@ -251,11 +256,12 @@ fn get_repo_status( fn get_stashed_count(repo: &context::Repo) -> Option { let repo = repo.open(); let reference = match repo.try_find_reference("refs/stash") { - Ok(Some(reference)) => reference, + // Only proceed if the found reference has the expected name (not tags/refs/stash etc.) + Ok(Some(reference)) if reference.name().as_bstr() == b"refs/stash".as_slice() => reference, // No stash reference found - Ok(None) => return Some(0), + Ok(_) => return Some(0), Err(err) => { - log::warn!("Error finding stash reference: {err}"); + log::debug!("Error finding stash reference: {err}"); return None; } }; @@ -267,7 +273,7 @@ fn get_stashed_count(repo: &context::Repo) -> Option { Some(0) } Err(err) => { - log::warn!("Error getting stash log: {err}"); + log::debug!("Error getting stash log: {err}"); None } } @@ -1166,6 +1172,21 @@ mod tests { repo_dir.close() } + #[test] + fn doesnt_generate_git_status_for_bare_repo() -> io::Result<()> { + let repo_dir = fixture_repo(FixtureProvider::GitBare)?; + + create_added(repo_dir.path())?; + + let actual = ModuleRenderer::new("git_status") + .path(repo_dir.path()) + .collect(); + + assert_eq!(None, actual); + + repo_dir.close() + } + fn ahead(repo_dir: &Path) -> io::Result<()> { File::create(repo_dir.join("readme.md"))?.sync_all()?; diff --git a/src/modules/kubernetes.rs b/src/modules/kubernetes.rs index c56514ba8..042f47734 100644 --- a/src/modules/kubernetes.rs +++ b/src/modules/kubernetes.rs @@ -21,7 +21,7 @@ fn get_current_kube_context_name(filename: path::PathBuf) -> Option { let contents = utils::read_file(filename).ok()?; let yaml_docs = YamlLoader::load_from_str(&contents).ok()?; - let conf = yaml_docs.get(0)?; + let conf = yaml_docs.first()?; conf["current-context"] .as_str() .filter(|s| !s.is_empty()) @@ -35,7 +35,7 @@ fn get_kube_ctx_components( let contents = utils::read_file(filename).ok()?; let yaml_docs = YamlLoader::load_from_str(&contents).ok()?; - let conf = yaml_docs.get(0)?; + let conf = yaml_docs.first()?; let contexts = conf["contexts"].as_vec()?; // Find the context with the name we're looking for @@ -118,16 +118,13 @@ pub fn module<'a>(context: &'a Context) -> Option> { .any(|v| !v.is_empty()); let is_kube_project = have_scan_config.then(|| { - context - .try_begin_scan() - .map(|scanner| { - scanner - .set_files(&config.detect_files) - .set_folders(&config.detect_folders) - .set_extensions(&config.detect_extensions) - .is_match() - }) - .unwrap_or(false) + context.try_begin_scan().map_or(false, |scanner| { + scanner + .set_files(&config.detect_files) + .set_folders(&config.detect_folders) + .set_extensions(&config.detect_extensions) + .is_match() + }) }); if !is_kube_project.unwrap_or(true) { diff --git a/src/modules/mod.rs b/src/modules/mod.rs index fe4f42305..57983cd1e 100644 --- a/src/modules/mod.rs +++ b/src/modules/mod.rs @@ -16,6 +16,7 @@ mod daml; mod dart; mod deno; mod directory; +mod direnv; mod docker_context; mod dotnet; mod elixir; @@ -89,6 +90,7 @@ mod zig; #[cfg(feature = "battery")] mod battery; +mod typst; #[cfg(feature = "battery")] pub use self::battery::{BatteryInfoProvider, BatteryInfoProviderImpl}; @@ -121,6 +123,7 @@ pub fn handle<'a>(module: &str, context: &'a Context) -> Option> { "dart" => dart::module(context), "deno" => deno::module(context), "directory" => directory::module(context), + "direnv" => direnv::module(context), "docker_context" => docker_context::module(context), "dotnet" => dotnet::module(context), "elixir" => elixir::module(context), @@ -185,6 +188,7 @@ pub fn handle<'a>(module: &str, context: &'a Context) -> Option> { "sudo" => sudo::module(context), "terraform" => terraform::module(context), "time" => time::module(context), + "typst" => typst::module(context), "crystal" => crystal::module(context), "username" => username::module(context), "vlang" => vlang::module(context), @@ -238,6 +242,7 @@ pub fn description(module: &str) -> &'static str { "dart" => "The currently installed version of Dart", "deno" => "The currently installed version of Deno", "directory" => "The current working directory", + "direnv" => "The currently applied direnv file", "docker_context" => "The current docker context", "dotnet" => "The relevant version of the .NET Core SDK for the current directory", "elixir" => "The currently installed versions of Elixir and OTP", @@ -303,6 +308,7 @@ pub fn description(module: &str) -> &'static str { "swift" => "The currently installed version of Swift", "terraform" => "The currently selected terraform workspace and version", "time" => "The current local time", + "typst" => "The current installed version of typst", "username" => "The active user's username", "vagrant" => "The currently installed version of Vagrant", "vcsh" => "The currently active VCSH repository", diff --git a/src/modules/nix_shell.rs b/src/modules/nix_shell.rs index d8666ee84..4d5cc9a11 100644 --- a/src/modules/nix_shell.rs +++ b/src/modules/nix_shell.rs @@ -23,7 +23,7 @@ impl NixShellType { }; if use_heuristic { - Self::in_new_nix_shell(context).map(|_| Unknown) + Self::in_new_nix_shell(context).map(|()| Unknown) } else { None } diff --git a/src/modules/openstack.rs b/src/modules/openstack.rs index 35c488bab..d5e59f63d 100644 --- a/src/modules/openstack.rs +++ b/src/modules/openstack.rs @@ -27,7 +27,7 @@ fn get_osp_project_from_config(context: &Context, osp_cloud: &str) -> Option Option Option { + let file_contents = context.read_file_from_pwd("DESCRIPTION")?; + let re = Regex::new(r"(?m)^Version:\s*(?P.*$)").unwrap(); + let caps = re.captures(&file_contents)?; + format_version(&caps["version"], config.version_format) +} + fn get_version(context: &Context, config: &PackageConfig) -> Option { let package_version_fn: Vec Option> = vec![ get_cargo_version, @@ -330,6 +337,7 @@ fn get_version(context: &Context, config: &PackageConfig) -> Option { get_sbt_version, get_daml_project_version, get_dart_pub_version, + get_rlang_version, ]; package_version_fn.iter().find_map(|f| f(context, config)) @@ -1402,6 +1410,19 @@ environment: project_dir.close() } + #[test] + fn test_extract_rlang_version() -> io::Result<()> { + let config_name = "DESCRIPTION"; + let config_content = " +Package: starship +Version: 1.0.0 +Title: Starship +"; + let project_dir = create_project_dir()?; + fill_config(&project_dir, config_name, Some(config_content))?; + expect_output(&project_dir, Some("v1.0.0"), None); + project_dir.close() + } fn create_project_dir() -> io::Result { tempfile::tempdir() } diff --git a/src/modules/pulumi.rs b/src/modules/pulumi.rs index 093014492..6df36dde4 100644 --- a/src/modules/pulumi.rs +++ b/src/modules/pulumi.rs @@ -285,8 +285,9 @@ mod tests { let project_file = PathBuf::from("/hello/Pulumi.yaml"); assert_eq!( get_pulumi_workspace(&context, name, &project_file), - Some("/home/sweet/home/.pulumi/workspaces/foobar-test-workspace.json") - .map(PathBuf::from) + Some(PathBuf::from( + "/home/sweet/home/.pulumi/workspaces/foobar-test-workspace.json" + )) ); } diff --git a/src/modules/python.rs b/src/modules/python.rs index d2b3cdec6..df4cfab5f 100644 --- a/src/modules/python.rs +++ b/src/modules/python.rs @@ -376,10 +376,10 @@ Python 3.7.9 (7e6e2bb30ac5fbdbd443619cae28c51d5c162a02, Nov 24 2020, 10:03:59) create_dir_all(dir.path().join("my_venv"))?; let mut venv_cfg = File::create(dir.path().join("my_venv").join("pyvenv.cfg"))?; venv_cfg.write_all( - br#" + br" home = something prompt = 'foo' - "#, + ", )?; venv_cfg.sync_all()?; @@ -403,10 +403,10 @@ prompt = 'foo' create_dir_all(dir.path().join("my_venv"))?; let mut venv_cfg = File::create(dir.path().join("my_venv").join("pyvenv.cfg"))?; venv_cfg.write_all( - br#" + br" home = something prompt = '(foo)' - "#, + ", )?; venv_cfg.sync_all()?; diff --git a/src/modules/rlang.rs b/src/modules/rlang.rs index a3902497f..5620e025e 100644 --- a/src/modules/rlang.rs +++ b/src/modules/rlang.rs @@ -133,9 +133,9 @@ https://www.gnu.org/licenses/."#; } #[test] - fn folder_with_rprofile_files() -> io::Result<()> { + fn folder_with_description_files() -> io::Result<()> { let dir = tempfile::tempdir()?; - File::create(dir.path().join(".Rprofile"))?.sync_all()?; + File::create(dir.path().join("DESCRIPTION"))?.sync_all()?; check_r_render(&dir); dir.close() } diff --git a/src/modules/rust.rs b/src/modules/rust.rs index 221111ea1..6544eba77 100644 --- a/src/modules/rust.rs +++ b/src/modules/rust.rs @@ -914,32 +914,32 @@ version = "12" }; } - static STABLE: &str = r#"rustc 1.40.0 (73528e339 2019-12-16) + static STABLE: &str = r"rustc 1.40.0 (73528e339 2019-12-16) binary: rustc commit-hash: 73528e339aae0f17a15ffa49a8ac608f50c6cf14 commit-date: 2019-12-16 host: x86_64-unknown-linux-gnu release: 1.40.0 LLVM version: 9.0 -"#; +"; - static BETA: &str = r#"rustc 1.41.0-beta.1 (eb3f7c2d3 2019-12-17) + static BETA: &str = r"rustc 1.41.0-beta.1 (eb3f7c2d3 2019-12-17) binary: rustc commit-hash: eb3f7c2d3aec576f47eba854cfbd3c1187b8a2a0 commit-date: 2019-12-17 host: x86_64-unknown-linux-gnu release: 1.41.0-beta.1 LLVM version: 9.0 -"#; +"; - static NIGHTLY: &str = r#"rustc 1.42.0-nightly (da3629b05 2019-12-29) + static NIGHTLY: &str = r"rustc 1.42.0-nightly (da3629b05 2019-12-29) binary: rustc commit-hash: da3629b05f8f1b425a738bfe9fe9aedd47c5417a commit-date: 2019-12-29 host: x86_64-unknown-linux-gnu release: 1.42.0-nightly LLVM version: 9.0 -"#; +"; test!( (STABLE, None) => Some(("v1.40.0", "x86_64-unknown-linux-gnu")), diff --git a/src/modules/shell.rs b/src/modules/shell.rs index c9b6df157..98502a266 100644 --- a/src/modules/shell.rs +++ b/src/modules/shell.rs @@ -20,6 +20,7 @@ pub fn module<'a>(context: &'a Context) -> Option> { Shell::Bash => Some(config.bash_indicator), Shell::Fish => Some(config.fish_indicator), Shell::Zsh => Some(config.zsh_indicator), + Shell::Pwsh => config.pwsh_indicator.or(Some(config.powershell_indicator)), Shell::PowerShell => Some(config.powershell_indicator), Shell::Ion => Some(config.ion_indicator), Shell::Elvish => Some(config.elvish_indicator), @@ -40,6 +41,7 @@ pub fn module<'a>(context: &'a Context) -> Option> { "fish_indicator" => Some(Ok(config.fish_indicator)), "zsh_indicator" => Some(Ok(config.zsh_indicator)), "powershell_indicator" => Some(Ok(config.powershell_indicator)), + "pwsh_indicator" => config.pwsh_indicator.map(Ok), "ion_indicator" => Some(Ok(config.ion_indicator)), "elvish_indicator" => Some(Ok(config.elvish_indicator)), "tcsh_indicator" => Some(Ok(config.tcsh_indicator)), @@ -200,6 +202,50 @@ mod tests { assert_eq!(expected, actual); } + #[test] + fn test_pwsh_default_format() { + let expected = Some(format!("{} ", Color::White.bold().paint("psh"))); + let actual = ModuleRenderer::new("shell") + .shell(Shell::Pwsh) + .config(toml::toml! { + [shell] + disabled = false + }) + .collect(); + + assert_eq!(expected, actual); + } + + #[test] + fn test_pwsh_custom_format() { + let expected = Some(format!("{} ", Color::Cyan.bold().paint("pwsh"))); + let actual = ModuleRenderer::new("shell") + .shell(Shell::Pwsh) + .config(toml::toml! { + [shell] + pwsh_indicator = "[pwsh](bold cyan)" + disabled = false + }) + .collect(); + + assert_eq!(expected, actual); + } + + #[test] + fn test_pwsh_custom_format_fallback() { + let expected = Some(format!("{} ", Color::Cyan.bold().paint("pwsh"))); + let actual = ModuleRenderer::new("shell") + .shell(Shell::Pwsh) + .config(toml::toml! { + [shell] + powershell_indicator = "[pwsh](bold cyan)" + disabled = false + }) + .collect(); + + assert_eq!(expected, actual); + } + #[test] fn test_ion_default_format() { let expected = Some(format!("{} ", Color::White.bold().paint("ion"))); diff --git a/src/modules/shlvl.rs b/src/modules/shlvl.rs index 48d22ec89..03e32728e 100644 --- a/src/modules/shlvl.rs +++ b/src/modules/shlvl.rs @@ -242,7 +242,7 @@ mod tests { disabled = false threshold = threshold }) - .env(SHLVL_ENV_VAR, format!("{}", shlvl)) + .env(SHLVL_ENV_VAR, format!("{shlvl}")) .collect() } diff --git a/src/modules/typst.rs b/src/modules/typst.rs new file mode 100644 index 000000000..a1c0ba4a0 --- /dev/null +++ b/src/modules/typst.rs @@ -0,0 +1,98 @@ +use super::{Context, Module, ModuleConfig}; + +use crate::configs::typst::TypstConfig; +use crate::formatter::{StringFormatter, VersionFormatter}; + +/// Creates a module with the current Typst version +pub fn module<'a>(context: &'a Context) -> Option> { + let mut module = context.new_module("typst"); + let config = TypstConfig::try_load(module.config); + + let is_typst_project = context + .try_begin_scan()? + .set_files(&config.detect_files) + .set_extensions(&config.detect_extensions) + .set_folders(&config.detect_folders) + .is_match(); + + if !is_typst_project { + return None; + } + + let parsed = StringFormatter::new(config.format).and_then(|formatter| { + formatter + .map_meta(|var, _| match var { + "symbol" => Some(config.symbol), + _ => None, + }) + .map_style(|variable| match variable { + "style" => Some(Ok(config.style)), + _ => None, + }) + .map(|variable| match variable { + "version" => { + let version = get_typst_config(context)?; + VersionFormatter::format_module_version( + module.get_name(), + &version, + config.version_format, + ) + .map(Ok) + } + _ => None, + }) + .parse(None, Some(context)) + }); + + module.set_segments(match parsed { + Ok(segments) => segments, + Err(error) => { + log::warn!("Error in module `typst`:\n{}", error); + return None; + } + }); + + Some(module) +} + +fn get_typst_config(context: &Context) -> Option { + context + .exec_cmd("typst", &["--version"])? + .stdout + .trim() + .strip_prefix("typst ") + .and_then(|version| version.split_whitespace().next().map(ToOwned::to_owned)) +} + +#[cfg(test)] +mod tests { + use crate::test::ModuleRenderer; + use nu_ansi_term::Color; + use std::fs::File; + use std::io; + #[test] + fn read_typst_not_present() -> io::Result<()> { + let dir = tempfile::tempdir()?; + + let actual = ModuleRenderer::new("typst").path(dir.path()).collect(); + + let expected = None; + assert_eq!(expected, actual); + dir.close() + } + + #[test] + fn read_typst_present() -> io::Result<()> { + let dir = tempfile::tempdir()?; + + File::create(dir.path().join("test.typ"))?.sync_all()?; + + let actual = ModuleRenderer::new("typst").path(dir.path()).collect(); + let expected = Some(format!( + "via {}", + Color::Rgb(0, 147, 167).bold().paint("t v0.10 ") + )); + assert_eq!(expected, actual); + dir.close() + } +} diff --git a/src/print.rs b/src/print.rs index 742dfdb98..78c3dd6cd 100644 --- a/src/print.rs +++ b/src/print.rs @@ -391,7 +391,7 @@ pub fn format_duration(duration: &Duration) -> String { /// Return the modules from $all that are not already in the list fn all_modules_uniq(module_list: &BTreeSet) -> Vec { let mut prompt_order: Vec = Vec::new(); - for module in PROMPT_ORDER.iter() { + for module in PROMPT_ORDER { if !module_list.contains(*module) { prompt_order.push(String::from(*module)) } @@ -452,7 +452,7 @@ fn load_formatter_and_modules<'a>(context: &'a Context) -> (StringFormatter<'a>, let modules = [&lf, &rf] .into_iter() .flatten() - .flat_map(|f| f.get_variables()) + .flat_map(VariableHolder::get_variables) .collect(); let main_formatter = match context.target { @@ -507,8 +507,10 @@ pub fn preset_command(name: Option, output: Option, list: bool) fn preset_list() -> String { Preset::value_variants() .iter() - .map(|v| format!("{}\n", v.0)) - .collect() + .fold(String::new(), |mut output, b| { + let _ = writeln!(output, "{}", b.0); + output + }) } #[cfg(test)] diff --git a/src/test/mod.rs b/src/test/mod.rs index dd26ea820..9cbb749d7 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -166,6 +166,7 @@ impl<'a> ModuleRenderer<'a> { pub enum FixtureProvider { Fossil, Git, + GitBare, Hg, Pijul, } @@ -229,6 +230,16 @@ pub fn fixture_repo(provider: FixtureProvider) -> io::Result { Ok(path) } + FixtureProvider::GitBare => { + let path = tempfile::tempdir()?; + gix::ThreadSafeRepository::init( + &path, + gix::create::Kind::Bare, + gix::create::Options::default(), + ) + .map_err(|err| io::Error::new(io::ErrorKind::Other, err))?; + Ok(path) + } FixtureProvider::Hg => { let path = tempfile::tempdir()?; diff --git a/src/utils.rs b/src/utils.rs index d4d68a812..7eaeba3f4 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -71,7 +71,7 @@ pub fn write_file, S: AsRef>(file_name: P, text: S) -> Resul }; match file.write_all(text.as_bytes()) { - Ok(_) => { + Ok(()) => { log::trace!("File {file_name:?} written successfully"); } Err(err) => { @@ -341,6 +341,11 @@ WebAssembly: unavailable stdout: String::from("default\n"), stderr: String::default(), }), + "typst --version" => Some(CommandOutput { + stdout: String::from("typst 0.10 (360cc9b9)"), + stderr: String::default(), + }), + "esy ocaml -vnum" => Some(CommandOutput { stdout: String::from("4.08.1\n"), stderr: String::default(),