Merge remote-tracking branch 'upstream/master' into flyctl

This commit is contained in:
Sharun 2024-09-11 22:25:19 -05:00
commit 8d3113ec82
No known key found for this signature in database
540 changed files with 15485 additions and 32673 deletions

View File

@ -14,7 +14,7 @@
],
"excludes": [
"CHANGELOG.md",
"docs/.vuepress/dist/**",
"docs/.vitepress/dist/**",
"**/node_modules",
"**/*-lock.json",
".github/*",
@ -25,9 +25,9 @@
"target/"
],
"plugins": [
"https://github.com/dprint/dprint-plugin-typescript/releases/download/0.88.7/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"
"https://github.com/dprint/dprint-plugin-typescript/releases/download/0.91.8/plugin.wasm",
"https://github.com/dprint/dprint-plugin-json/releases/download/0.19.3/plugin.wasm",
"https://github.com/dprint/dprint-plugin-markdown/releases/download/0.17.8/plugin.wasm",
"https://github.com/dprint/dprint-plugin-toml/releases/download/0.6.2/plugin.wasm"
]
}

View File

@ -94,7 +94,7 @@
"disabled": false,
"format": "via [$symbol($version )]($style)",
"style": "bold red",
"symbol": "🍞 ",
"symbol": "🥟 ",
"version_format": "v${raw}"
},
"allOf": [
@ -381,7 +381,7 @@
"format": "[$symbol$loaded/$allowed]($style) ",
"loaded_msg": "loaded",
"not_allowed_msg": "not allowed",
"style": "bold orange",
"style": "bold bright-yellow",
"symbol": "direnv ",
"unloaded_msg": "not loaded"
},
@ -681,6 +681,27 @@
}
]
},
"gleam": {
"default": {
"detect_extensions": [
"gleam"
],
"detect_files": [
"gleam.toml"
],
"detect_folders": [],
"disabled": false,
"format": "via [$symbol($version )]($style)",
"style": "bold #FFAFF3",
"symbol": "⭐ ",
"version_format": "v${raw}"
},
"allOf": [
{
"$ref": "#/definitions/GleamConfig"
}
]
},
"golang": {
"default": {
"detect_extensions": [
@ -835,6 +856,7 @@
},
"hostname": {
"default": {
"aliases": {},
"detect_env_vars": [],
"disabled": false,
"format": "[$ssh_symbol$hostname]($style) in ",
@ -945,6 +967,7 @@
"default": {
"context_aliases": {},
"contexts": [],
"detect_env_vars": [],
"detect_extensions": [],
"detect_files": [],
"detect_folders": [],
@ -1036,6 +1059,38 @@
}
]
},
"mojo": {
"default": {
"detect_extensions": [
"mojo",
"🔥"
],
"detect_files": [],
"detect_folders": [],
"disabled": false,
"format": "with [$symbol($version )]($style)",
"style": "bold 208",
"symbol": "🔥 "
},
"allOf": [
{
"$ref": "#/definitions/MojoConfig"
}
]
},
"nats": {
"default": {
"disabled": true,
"format": "[$symbol($name )]($style)",
"style": "bold purple",
"symbol": "✉️ "
},
"allOf": [
{
"$ref": "#/definitions/NatsConfig"
}
]
},
"nim": {
"default": {
"detect_extensions": [
@ -1141,6 +1196,25 @@
}
]
},
"odin": {
"default": {
"detect_extensions": [
"odin"
],
"detect_files": [],
"detect_folders": [],
"disabled": false,
"format": "via [$symbol($version )]($style)",
"show_commit": false,
"style": "bold bright-blue",
"symbol": "Ø "
},
"allOf": [
{
"$ref": "#/definitions/OdinConfig"
}
]
},
"opa": {
"default": {
"detect_extensions": [
@ -1179,6 +1253,8 @@
"format": "[$symbol]($style)",
"style": "bold white",
"symbols": {
"AIX": "➿ ",
"AlmaLinux": "💠 ",
"Alpaquita": "🔔 ",
"Alpine": "🏔️ ",
"Amazon": "🙂 ",
@ -1196,6 +1272,7 @@
"Gentoo": "🗜️ ",
"HardenedBSD": "🛡️ ",
"Illumos": "🐦 ",
"Kali": "🐉 ",
"Linux": "🐧 ",
"Mabox": "📦 ",
"Macos": "🍎 ",
@ -1213,10 +1290,13 @@
"RedHatEnterprise": "🎩 ",
"Redhat": "🎩 ",
"Redox": "🧪 ",
"RockyLinux": "💠 ",
"SUSE": "🦎 ",
"Solus": "⛵ ",
"Ubuntu": "🎯 ",
"Ultramarine": "🔷 ",
"Unknown": "❓ ",
"Void": " ",
"Windows": "🪟 ",
"openEuler": "🦉 ",
"openSUSE": "🦎 "
@ -1330,7 +1410,9 @@
"purs"
],
"detect_files": [
"spago.dhall"
"spago.dhall",
"spago.yaml",
"spago.lock"
],
"detect_folders": [],
"disabled": false,
@ -1347,6 +1429,9 @@
},
"python": {
"default": {
"detect_env_vars": [
"VIRTUAL_ENV"
],
"detect_extensions": [
"py"
],
@ -1379,6 +1464,27 @@
}
]
},
"quarto": {
"default": {
"detect_extensions": [
"qmd"
],
"detect_files": [
"_quarto.yml"
],
"detect_folders": [],
"disabled": false,
"format": "via [$symbol($version )]($style)",
"style": "bold #75AADB",
"symbol": "⨁ ",
"version_format": "v${raw}"
},
"allOf": [
{
"$ref": "#/definitions/QuartoConfig"
}
]
},
"raku": {
"default": {
"detect_extensions": [
@ -1731,6 +1837,8 @@
},
"username": {
"default": {
"aliases": {},
"detect_env_vars": [],
"disabled": false,
"format": "[$user]($style) in ",
"show_always": false,
@ -2105,7 +2213,7 @@
"type": "string"
},
"symbol": {
"default": "🍞 ",
"default": "🥟 ",
"type": "string"
},
"style": {
@ -2782,7 +2890,7 @@
"type": "string"
},
"style": {
"default": "bold orange",
"default": "bold bright-yellow",
"type": "string"
},
"disabled": {
@ -3546,6 +3654,57 @@
},
"additionalProperties": false
},
"GleamConfig": {
"type": "object",
"properties": {
"format": {
"default": "via [$symbol($version )]($style)",
"type": "string"
},
"version_format": {
"default": "v${raw}",
"type": "string"
},
"symbol": {
"default": "⭐ ",
"type": "string"
},
"style": {
"default": "bold #FFAFF3",
"type": "string"
},
"disabled": {
"default": false,
"type": "boolean"
},
"detect_extensions": {
"default": [
"gleam"
],
"type": "array",
"items": {
"type": "string"
}
},
"detect_files": {
"default": [
"gleam.toml"
],
"type": "array",
"items": {
"type": "string"
}
},
"detect_folders": {
"default": [],
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"GoConfig": {
"type": "object",
"properties": {
@ -3912,6 +4071,13 @@
"disabled": {
"default": false,
"type": "boolean"
},
"aliases": {
"default": {},
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"additionalProperties": false
@ -4176,6 +4342,13 @@
"type": "string"
}
},
"detect_env_vars": {
"default": [],
"type": "array",
"items": {
"type": "string"
}
},
"contexts": {
"default": [],
"type": "array",
@ -4379,6 +4552,74 @@
},
"additionalProperties": false
},
"MojoConfig": {
"type": "object",
"properties": {
"format": {
"default": "with [$symbol($version )]($style)",
"type": "string"
},
"symbol": {
"default": "🔥 ",
"type": "string"
},
"style": {
"default": "bold 208",
"type": "string"
},
"disabled": {
"default": false,
"type": "boolean"
},
"detect_extensions": {
"default": [
"mojo",
"🔥"
],
"type": "array",
"items": {
"type": "string"
}
},
"detect_files": {
"default": [],
"type": "array",
"items": {
"type": "string"
}
},
"detect_folders": {
"default": [],
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"NatsConfig": {
"type": "object",
"properties": {
"format": {
"default": "[$symbol($name )]($style)",
"type": "string"
},
"symbol": {
"default": "✉️ ",
"type": "string"
},
"style": {
"default": "bold purple",
"type": "string"
},
"disabled": {
"default": true,
"type": "boolean"
}
},
"additionalProperties": false
},
"NimConfig": {
"type": "object",
"properties": {
@ -4604,6 +4845,55 @@
},
"additionalProperties": false
},
"OdinConfig": {
"type": "object",
"properties": {
"format": {
"default": "via [$symbol($version )]($style)",
"type": "string"
},
"show_commit": {
"default": false,
"type": "boolean"
},
"symbol": {
"default": "Ø ",
"type": "string"
},
"style": {
"default": "bold bright-blue",
"type": "string"
},
"disabled": {
"default": false,
"type": "boolean"
},
"detect_extensions": {
"default": [
"odin"
],
"type": "array",
"items": {
"type": "string"
}
},
"detect_files": {
"default": [],
"type": "array",
"items": {
"type": "string"
}
},
"detect_folders": {
"default": [],
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"OpaConfig": {
"type": "object",
"properties": {
@ -4688,6 +4978,8 @@
},
"symbols": {
"default": {
"AIX": "➿ ",
"AlmaLinux": "💠 ",
"Alpaquita": "🔔 ",
"Alpine": "🏔️ ",
"Amazon": "🙂 ",
@ -4705,6 +4997,7 @@
"Gentoo": "🗜️ ",
"HardenedBSD": "🛡️ ",
"Illumos": "🐦 ",
"Kali": "🐉 ",
"Linux": "🐧 ",
"Mabox": "📦 ",
"Macos": "🍎 ",
@ -4722,10 +5015,13 @@
"RedHatEnterprise": "🎩 ",
"Redhat": "🎩 ",
"Redox": "🧪 ",
"RockyLinux": "💠 ",
"SUSE": "🦎 ",
"Solus": "⛵ ",
"Ubuntu": "🎯 ",
"Ultramarine": "🔷 ",
"Unknown": "❓ ",
"Void": " ",
"Windows": "🪟 ",
"openEuler": "🦉 ",
"openSUSE": "🦎 "
@ -4978,7 +5274,9 @@
},
"detect_files": {
"default": [
"spago.dhall"
"spago.dhall",
"spago.yaml",
"spago.lock"
],
"type": "array",
"items": {
@ -5068,6 +5366,15 @@
"items": {
"type": "string"
}
},
"detect_env_vars": {
"default": [
"VIRTUAL_ENV"
],
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
@ -5085,6 +5392,57 @@
}
]
},
"QuartoConfig": {
"type": "object",
"properties": {
"format": {
"default": "via [$symbol($version )]($style)",
"type": "string"
},
"version_format": {
"default": "v${raw}",
"type": "string"
},
"symbol": {
"default": "⨁ ",
"type": "string"
},
"style": {
"default": "bold #75AADB",
"type": "string"
},
"disabled": {
"default": false,
"type": "boolean"
},
"detect_extensions": {
"default": [
"qmd"
],
"type": "array",
"items": {
"type": "string"
}
},
"detect_files": {
"default": [
"_quarto.yml"
],
"type": "array",
"items": {
"type": "string"
}
},
"detect_folders": {
"default": [],
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"RakuConfig": {
"type": "object",
"properties": {
@ -5918,6 +6276,13 @@
"UsernameConfig": {
"type": "object",
"properties": {
"detect_env_vars": {
"default": [],
"type": "array",
"items": {
"type": "string"
}
},
"format": {
"default": "[$user]($style) in ",
"type": "string"
@ -5937,6 +6302,13 @@
"disabled": {
"default": false,
"type": "boolean"
},
"aliases": {
"default": {},
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"additionalProperties": false
@ -6197,6 +6569,10 @@
"ignore_timeout": {
"default": false,
"type": "boolean"
},
"unsafe_no_escape": {
"default": false,
"type": "boolean"
}
},
"additionalProperties": false

View File

@ -16,6 +16,12 @@
"semanticCommitType": "build",
"rangeStrategy": "bump",
"rebaseWhen": "conflicted",
"lockFileMaintenance": {
"enabled": true,
"extends": ["schedule:weekly"],
"groupName": "lockfile maintenance",
"automerge": true
},
"packageRules": [
// group updates to related packages
{
@ -52,14 +58,6 @@
"groupName": "npm",
"matchDatasources": ["npm"],
"extends": ["schedule:weekly"]
},
// Update (rust) lockfiles weekly
{
"matchDatasources": ["crate"],
"lockFileMaintenance": {
"enabled": true,
"extends": ["schedule:weekly"]
}
}
],
// custom regex update managers

View File

@ -24,19 +24,57 @@ jobs:
- name: Setup | Checkout
uses: actions/checkout@v4
- name: Install | Taplo
run: cargo install --debug --locked --version 0.8.1 taplo-cli
run: cargo install --debug --locked --version 0.9.0 taplo-cli
- name: Presets | Validate with schema
run: taplo lint --schema "file://${GITHUB_WORKSPACE}/.github/config-schema.json" docs/.vuepress/public/presets/toml/*.toml
run: taplo lint --schema "file://${GITHUB_WORKSPACE}/.github/config-schema.json" docs/public/presets/toml/*.toml
# If this is not a Crowdin PR, block changes to translated documentation
block-crowdin:
name: Block Translated Changes
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref != 'i18n_master' }}
steps:
- name: Prevent File Change
uses: xalvarez/prevent-file-change-action@v1.5.1
if: ${{ github.event.pull_request.head.ref != 'i18n_master' }}
- name: Setup | Checkout
uses: actions/checkout@v4
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
pattern: docs/[a-z][a-z][a-z]?-[A-Z][A-Z]?/.*
fetch-depth: 0
- name: Prevent File Change
uses: actions/github-script@v7
with:
script: |
const { execSync } = require('child_process');
const pattern = /^docs\/[a-z][a-z][a-z]?-[A-Z][A-Z]?\/.*$/;
const base = context.payload.pull_request.base.sha;
const head = context.payload.pull_request.head.sha;
const result = execSync(`git diff --name-only ${base} ${head}`).toString().split('\n');
for (const file of result) {
if (pattern.test(file)) {
core.setFailed(`To avoid conflicts, changes to the translated documentation are only allowed via Crowdin at https://translate.starship.rs.`);
break;
}
}
# Vitepress build
vitepress:
name: Vitepress [Build]
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v4
- name: Setup | Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: docs/package-lock.json
- name: Setup | Install dependencies
run: npm install
working-directory: docs
- name: Build | Build docs site
run: npm run build
working-directory: docs

View File

@ -10,9 +10,9 @@ jobs:
uses: actions/checkout@v4
- name: Setup | Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
cache: 'npm'
cache-dependency-path: docs/package-lock.json
@ -27,7 +27,7 @@ jobs:
- name: Publish
uses: netlify/actions/cli@master
with:
args: deploy --prod --dir=docs/.vuepress/dist
args: deploy --prod --dir=docs/.vitepress/dist
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}

View File

@ -56,11 +56,11 @@ jobs:
name: starship-arm-unknown-linux-musleabihf.tar.gz
- target: x86_64-apple-darwin
os: macOS-11
os: macos-latest
name: starship-x86_64-apple-darwin.tar.gz
- target: aarch64-apple-darwin
os: macOS-11
os: macos-latest
name: starship-aarch64-apple-darwin.tar.gz
- target: x86_64-pc-windows-msvc
@ -98,8 +98,7 @@ jobs:
- name: Setup | Install cargo-wix [Windows]
continue-on-error: true
# aarch64 is only supported in wix 4.0 development builds
if: matrix.os == 'windows-latest' && matrix.target != 'aarch64-pc-windows-msvc'
if: matrix.os == 'windows-latest'
run: cargo install --version 0.3.4 cargo-wix
env:
# cargo-wix does not require static crt
@ -119,11 +118,38 @@ jobs:
- name: Build | Installer [Windows]
continue-on-error: true
if: matrix.os == 'windows-latest' && matrix.target != 'aarch64-pc-windows-msvc'
if: matrix.os == 'windows-latest'
run: >
cargo wix -v --no-build --nocapture -I install/windows/main.wxs
--target ${{ matrix.target }}
--output target/wix/starship-${{ matrix.target }}.msi
--output target/${{ matrix.target }}/release/starship-${{ matrix.target }}.msi
- name: Sign | Upload [Windows]
continue-on-error: true
if: matrix.os == 'windows-latest'
id: unsigned-artifacts
uses: actions/upload-artifact@v4
with:
name: unsigned-${{ matrix.name }}
path: |
target/${{ matrix.target }}/release/starship.exe
target/${{ matrix.target }}/release/starship-${{ matrix.target }}.msi
- name: Sign | Sign [Windows]
continue-on-error: true
if: matrix.os == 'windows-latest'
uses: signpath/github-action-submit-signing-request@v0.4
with:
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
organization-id: '${{ vars.SIGNPATH_ORGANIZATION_ID }}'
project-slug: 'starship'
signing-policy-slug: 'test-signing'
github-artifact-id: '${{ steps.unsigned-artifacts.outputs.artifact-id }}'
wait-for-completion: false
# TODO use release-signing certificate:
# signing-policy-slug: 'release-signing'
# wait-for-completion: true
# output-artifact-directory: 'target/${{ matrix.target }}/release'
- name: Post Build | Prepare artifacts [Windows]
if: matrix.os == 'windows-latest'
@ -140,18 +166,18 @@ jobs:
cd -
- name: Release | Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: ${{ matrix.name }}
- name: Release | Upload installer artifacts [Windows]
continue-on-error: true
if: matrix.os == 'windows-latest' && matrix.target != 'aarch64-pc-windows-msvc'
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: starship-${{ matrix.target }}.msi
path: target/wix/starship-${{ matrix.target }}.msi
path: target/${{ matrix.target }}/release/starship-${{ matrix.target }}.msi
# Notarize starship binaries for MacOS and build notarized pkg installers
notarize_and_pkgbuild:
@ -215,9 +241,9 @@ jobs:
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
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
- name: Notarize | Build docs
run: |
@ -226,7 +252,7 @@ jobs:
npm run build
- name: Notarize | Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ matrix.name }}
path: artifacts
@ -238,7 +264,7 @@ jobs:
run: bash install/macos_packages/build_and_notarize.sh starship docs ${{ matrix.arch }} ${{ matrix.pkgname }}
- name: Notarize | Upload Notarized Flat Installer
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.pkgname }}
path: ${{ matrix.pkgname }}
@ -247,10 +273,11 @@ jobs:
run: tar czvf ${{ matrix.name }} starship
- name: Notarize | Upload Notarized Binary
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: ${{ matrix.name }}
overwrite: true
- name: Cleanup Secrets
if: ${{ always() }}
@ -265,7 +292,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup | Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
- name: Setup | Checksums
run: for file in starship-*/starship-*; do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
@ -276,7 +303,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build | Add Artifacts to Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: starship-*/starship-*
tag_name: ${{ needs.release_please.outputs.tag_name }}
@ -319,13 +346,22 @@ jobs:
needs: [release_please, github_build, upload_artifacts]
if: ${{ needs.release_please.outputs.release_created == 'true' }}
env:
URL_64: https://github.com/starship/starship/releases/download/${{ needs.release_please.outputs.tag_name }}/starship-x86_64-pc-windows-msvc.msi
URL_32: https://github.com/starship/starship/releases/download/${{ needs.release_please.outputs.tag_name }}/starship-i686-pc-windows-msvc.msi
URL_64: https://github.com/starship/starship/releases/download/${{ needs.release_please.outputs.tag_name }}/starship-x86_64-pc-windows-msvc
URL_32: https://github.com/starship/starship/releases/download/${{ needs.release_please.outputs.tag_name }}/starship-i686-pc-windows-msvc
URL_ARM: https://github.com/starship/starship/releases/download/${{ needs.release_please.outputs.tag_name }}/starship-aarch64-pc-windows-msvc
steps:
# Publishing will fail if the repo is too far behind the upstream
- run: gh repo sync matchai/winget-pkgs
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
- run: |
$version = '${{ needs.release_please.outputs.tag_name }}'.replace('v', '')
iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
./wingetcreate.exe update Starship.Starship -s -v $version -u $env:URL_64 $env:URL_32 -t ${{ secrets.GH_PAT }}
./wingetcreate.exe update Starship.Starship -s -v $version `
-u ${{ env.URL_64 }}.msi ${{ env.URL_64 }}.zip `
${{ env.URL_32 }}.msi ${{ env.URL_32 }}.zip `
${{ env.URL_ARM }}.msi ${{ env.URL_ARM }}.zip `
-t ${{ secrets.GH_PAT }}
choco_update:
name: Update Chocolatey Package
@ -336,7 +372,7 @@ jobs:
- name: Setup | Checkout
uses: actions/checkout@v4
- name: Setup | Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
- run: pwsh ./install/windows/choco/update.ps1
env:
STARSHIP_VERSION: ${{ needs.release_please.outputs.tag_name }}

View File

@ -24,6 +24,6 @@ jobs:
- name: Setup | Checkout
uses: actions/checkout@v4
- name: Test | Security Audit
uses: EmbarkStudios/cargo-deny-action@v1.5.5
uses: EmbarkStudios/cargo-deny-action@v2.0.1
with:
command: check ${{ matrix.checks }}

View File

@ -7,4 +7,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@v1.17.0
- uses: crate-ci/typos@v1.24.5

View File

@ -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.9.0
uses: reviewdog/action-suggester@v1.17.0
with:
tool_name: starship config-schema
filter_mode: nofilter
@ -201,7 +201,9 @@ jobs:
- name: Build | Installer [Windows]
continue-on-error: true
if: matrix.os == 'windows-latest' && matrix.rust == 'stable'
run: cargo wix --dbg-build -v --nocapture -I install/windows/main.wxs
run: >
cargo wix --dbg-build -v --nocapture -I install/windows/main.wxs
--output target/debug/starship-x86_64-pc-windows-msvc.msi
- name: Build | Chocolatey Package [Windows]
continue-on-error: true
@ -219,8 +221,32 @@ jobs:
env:
STARSHIP_VERSION: v1.2.3
- name: Sign | Upload Executable [Windows]
uses: actions/upload-artifact@v4
continue-on-error: true
id: unsigned-artifacts
if: matrix.os == 'windows-latest' && matrix.rust == 'stable' && github.event_name == 'push' && github.repository == 'starship/starship'
with:
name: unsigned-artifacts-dbg
path: |
target/debug/starship.exe
target/debug/starship-x86_64-pc-windows-msvc.msi
- name: Sign | Sign [Windows]
uses: signpath/github-action-submit-signing-request@v0.4
continue-on-error: true
if: matrix.os == 'windows-latest' && matrix.rust == 'stable' && github.event_name == 'push' && github.repository == 'starship/starship'
with:
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
organization-id: '${{ vars.SIGNPATH_ORGANIZATION_ID }}'
project-slug: 'starship'
github-artifact-id: '${{ steps.unsigned-artifacts.outputs.artifact-id }}'
signing-policy-slug: 'test-signing'
wait-for-completion: true
output-artifact-directory: target/debug
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
if: github.repository == 'starship/starship'
with:
token: ${{ secrets.CODECOV_TOKEN }}

3
.gitignore vendored
View File

@ -27,7 +27,8 @@ Cargo.lock
# Compiled files for documentation
docs/node_modules
docs/.vuepress/dist/
docs/.vitepress/dist/
docs/.vitepress/cache/
# Ignore pkg files within the install directory
install/**/*.pkg

View File

@ -1,5 +1,112 @@
# Changelog
## [1.20.1](https://github.com/starship/starship/compare/v1.20.0...v1.20.1) (2024-07-26)
### Bug Fixes
* **ci:** move to macos-latest image ([#6132](https://github.com/starship/starship/issues/6132)) ([c7a8ea7](https://github.com/starship/starship/commit/c7a8ea757033512b5723a39be71bdb91fdcfbdb1))
## [1.20.0](https://github.com/starship/starship/compare/v1.19.0...v1.20.0) (2024-07-26)
### Features
* **color:** add prev_fg and prev_bg as color specifiers based on the previous foreground/background colors respectively ([#6017](https://github.com/starship/starship/issues/6017)) ([9a3e87f](https://github.com/starship/starship/commit/9a3e87f2cbaa8ca4b8dea41f4f56ff297e94bb1a))
* **color:** add prevfg,prevbg as color specifiers based on the previous foreground/background colors respectively ([9a3e87f](https://github.com/starship/starship/commit/9a3e87f2cbaa8ca4b8dea41f4f56ff297e94bb1a))
* **gcloud:** Disabled gcloud module when active config hasn't been set ([#6039](https://github.com/starship/starship/issues/6039)) ([4d36d46](https://github.com/starship/starship/commit/4d36d463b91a245a62c357de308cad3cdec48edf))
* **purescript:** add support for spago-next configuration files ([#6036](https://github.com/starship/starship/issues/6036)) ([e028186](https://github.com/starship/starship/commit/e0281868c9d7801fc25f64f86ab8312d2a5a1794))
### Bug Fixes
* **direnv:** replace nonexistent "orange" color with "bright-yellow" ([#5969](https://github.com/starship/starship/issues/5969)) ([478d5cc](https://github.com/starship/starship/commit/478d5cccb6f7f4622dd681756cf004ba92c98607))
* **dotnet:** Remove duplicate v in dotnet version ([#6060](https://github.com/starship/starship/issues/6060)) ([52a89a5](https://github.com/starship/starship/commit/52a89a515ed44d861ea556a0bb70d6901660a9b5))
* improve non-msvc windows support by bumping stable dependencies ([#5989](https://github.com/starship/starship/issues/5989)) ([50a6b84](https://github.com/starship/starship/commit/50a6b846045899c88d95b063a6b939a6dcb72a5c))
* **k8s:** don't trigger if scan config is set but env vars are not ([#5979](https://github.com/starship/starship/issues/5979)) ([8c75822](https://github.com/starship/starship/commit/8c75822d4380e020ebd289a4ef06cd4d31ee5196))
* **preset:** fix typo in Open Policy Agent module format string ([#6118](https://github.com/starship/starship/issues/6118)) ([eba9748](https://github.com/starship/starship/commit/eba9748eb1bd9e1802d2a770eb0907cdb73292d6))
### Performance Improvements
* **k8s:** Improve performance of kubeconfig module ([#6032](https://github.com/starship/starship/issues/6032)) ([fae92b2](https://github.com/starship/starship/commit/fae92b29646f73bf1eb843fde80885c58480e85b))
## [1.19.0](https://github.com/starship/starship/compare/v1.18.2...v1.19.0) (2024-05-15)
### Features
* **container:** show name if available ([#5195](https://github.com/starship/starship/issues/5195)) ([3e3f18e](https://github.com/starship/starship/commit/3e3f18ef277c9bb3db9f60c964f280c7d981102c))
* **gleam:** Add Gleam module ([#5886](https://github.com/starship/starship/issues/5886)) ([34a8f7e](https://github.com/starship/starship/commit/34a8f7e62845fd66df3f6f9003cb850f2b0d9bc5))
* **k8s:** Add detect env vars option ([#4488](https://github.com/starship/starship/issues/4488)) ([e3b5dff](https://github.com/starship/starship/commit/e3b5dff3524608328de6ee3cbb390f8c640b0ce0))
* **nats:** Add NATS Context ([#5900](https://github.com/starship/starship/issues/5900)) ([5facd85](https://github.com/starship/starship/commit/5facd85da56d28e74878286923f148bc468f71c3))
* **odin:** Add Odin Lang module ([#5873](https://github.com/starship/starship/issues/5873)) ([335c514](https://github.com/starship/starship/commit/335c514e9ee5fa5bc8a8294b4804ddf198504b97))
* **username:** add aliases option ([#5855](https://github.com/starship/starship/issues/5855)) ([9c1eadd](https://github.com/starship/starship/commit/9c1eaddae154daed9e1d00faac414586f7920013))
### Bug Fixes
* **bash:** fix handling of the preserved DEBUG trap (used in Bash <= 4.3) ([#5908](https://github.com/starship/starship/issues/5908)) ([fe1a8df](https://github.com/starship/starship/commit/fe1a8df6fa5121cc83b288cf054a8ed16631d335))
* **bash:** use `eval` instead of a procsub for the POSIX mode ([#5020](https://github.com/starship/starship/issues/5020)) ([0f859e8](https://github.com/starship/starship/commit/0f859e8b61c8ada354f4ea4147fb8752dca02c51))
* **bash:** use eval instead of a procsub for the POSIX mode ([0f859e8](https://github.com/starship/starship/commit/0f859e8b61c8ada354f4ea4147fb8752dca02c51))
* **bun:** change default icon ([#5880](https://github.com/starship/starship/issues/5880)) ([be4e97c](https://github.com/starship/starship/commit/be4e97c2d9169cbf0bc30e271dd4ba07530dc46f))
* **scala:** use scala-cli first to avoid timeout ([2221a88](https://github.com/starship/starship/commit/2221a88f5ada124c657a265b878e37be47998766))
* **xonsh:** remove `| cat` workaround from xonsh init ([#5113](https://github.com/starship/starship/issues/5113)) ([de5b7f0](https://github.com/starship/starship/commit/de5b7f041a8c88ecf912b3be3b32d70f76518348))
### Performance Improvements
* **scala:** use scala-cli first to avoid timeout ([#5952](https://github.com/starship/starship/issues/5952)) ([2221a88](https://github.com/starship/starship/commit/2221a88f5ada124c657a265b878e37be47998766))
## [1.18.2](https://github.com/starship/starship/compare/v1.18.1...v1.18.2) (2024-03-29)
### Bug Fixes
* replace unmaintained crates `yaml-rust`, `dirs-next` ([#5887](https://github.com/starship/starship/issues/5887)) ([796a411](https://github.com/starship/starship/commit/796a411602c9ca4e5103c54247440f4efe892918))
### Reverts
* "build(deps): update rust crate gix to 0.61.1" ([#5878](https://github.com/starship/starship/issues/5878)) ([eb80dba](https://github.com/starship/starship/commit/eb80dbab99e38b5018aa3fb70b06ae9e4d793b24))
## [1.18.1](https://github.com/starship/starship/compare/v1.18.0...v1.18.1) (2024-03-24)
### Bug Fixes
* **deps:** update rust crate os_info to 3.8.2 ([#5870](https://github.com/starship/starship/issues/5870)) ([d421f63](https://github.com/starship/starship/commit/d421f63785f901caf222941cbfae7cb8c0feec74))
* replace all remaining paths referring to vuepress ([#5859](https://github.com/starship/starship/issues/5859)) ([d5861f9](https://github.com/starship/starship/commit/d5861f9f974147d307c319865890cbb3e50dbe5a))
## [1.18.0](https://github.com/starship/starship/compare/v1.17.1...v1.18.0) (2024-03-21)
### Features
* $gemset variable for Ruby module ([#5429](https://github.com/starship/starship/issues/5429)) ([938ea3c](https://github.com/starship/starship/commit/938ea3c40145af68d8e28b2ef0275531f1123202))
* **bash:** Support right prompt and transience ([#4902](https://github.com/starship/starship/issues/4902)) ([5ead13d](https://github.com/starship/starship/commit/5ead13d6aa6303c85c562f1b940048cc539667cd))
* **bash:** use PS0 for preexec hook ([#5735](https://github.com/starship/starship/issues/5735)) ([ae711c0](https://github.com/starship/starship/commit/ae711c0f332f4f24c843e59d6d5783e398e21b38))
* **direnv:** use JSON status with direnv >= 2.33.0 ([#5692](https://github.com/starship/starship/issues/5692)) ([482c7b7](https://github.com/starship/starship/commit/482c7b719fc304fcad5f3572c4551f8ff4179522))
* **docs:** move to vitepress ([#5785](https://github.com/starship/starship/issues/5785)) ([7485c90](https://github.com/starship/starship/commit/7485c90c9f7259c026a84dd0335f56860005315d))
* **install:** Add version option to install script ([f66bfd9](https://github.com/starship/starship/commit/f66bfd9435f215867681a699428bd882d8c63ce7))
* **install:** Add version option to install script ([#5728](https://github.com/starship/starship/issues/5728)) ([f66bfd9](https://github.com/starship/starship/commit/f66bfd9435f215867681a699428bd882d8c63ce7))
* **os:** add new os symbols ([#5849](https://github.com/starship/starship/issues/5849)) ([df65b21](https://github.com/starship/starship/commit/df65b2155f92c03d07cabbcee6c92104a878c963))
* **quarto:** Add Quarto module ([#5820](https://github.com/starship/starship/issues/5820)) ([0e49f04](https://github.com/starship/starship/commit/0e49f04a6b249090cf3703c5dac041a51e6bf530))
* **release:** add winget arm64 push & repo sync ([#5033](https://github.com/starship/starship/issues/5033)) ([aef1a3f](https://github.com/starship/starship/commit/aef1a3f275e7ec9095c4718ecf6a268abfe7794a))
* **username:** add detect_env_vars as option ([#5833](https://github.com/starship/starship/issues/5833)) ([b8a812b](https://github.com/starship/starship/commit/b8a812b93207da992ff8ae9f8b955bfa1252072b))
### Bug Fixes
* **bash:** Handle Unbound Variables Errors in Bash ([#4972](https://github.com/starship/starship/issues/4972)) ([7093d5c](https://github.com/starship/starship/commit/7093d5cd84967edba93c9ed412b07519664f6356))
* **bash:** improve integration with bash-preexec ([#5734](https://github.com/starship/starship/issues/5734)) ([2aa711c](https://github.com/starship/starship/commit/2aa711ccc7096437e21149b18d1384534bfbcc57))
* **character:** also handle vi edit mode in pwsh ([#5775](https://github.com/starship/starship/issues/5775)) ([0891ec2](https://github.com/starship/starship/commit/0891ec27a40421cd742a853885731aed63f412aa))
* **direnv:** update to work with direnv v2.33 ([#5657](https://github.com/starship/starship/issues/5657)) ([cec111a](https://github.com/starship/starship/commit/cec111affdaf0a52f72c398f8307cf7e19c7dd8d))
* **git_branch:** fall back to "HEAD" when there is no current branch ([#5768](https://github.com/starship/starship/issues/5768)) ([6a96e84](https://github.com/starship/starship/commit/6a96e84a15e3ea598356e4fcad23ac4b2690dd1e))
* **nu:** continuation prompt not being displayed correctly ([#5851](https://github.com/starship/starship/issues/5851)) ([d308e91](https://github.com/starship/starship/commit/d308e918ee014f4ca9976683e79e819afd8160f7))
* **status:** fix pipestatus width calculation ([#5036](https://github.com/starship/starship/issues/5036)) ([ab84043](https://github.com/starship/starship/commit/ab840439e326a80c53466c7b767d29be0112b9d2)), closes [#3162](https://github.com/starship/starship/issues/3162)
* **zsh:** improve starship binary path escaping ([#5574](https://github.com/starship/starship/issues/5574)) ([2bb57cf](https://github.com/starship/starship/commit/2bb57cf0cd6d53194d26f4be96dff5fa14942622))
## [1.17.1](https://github.com/starship/starship/compare/v1.17.0...v1.17.1) (2024-01-02)

View File

@ -251,7 +251,7 @@ Changes to documentation can be viewed in a rendered state from the GitHub PR pa
(go to the CI section at the bottom of the page and look for "deploy preview", then
click on "details"). If you want to view changes locally as well, follow these steps.
After cloning the project, you can do the following to run the VuePress website on your local machine:
After cloning the project, you can do the following to run the VitePress website on your local machine:
1. `cd` into the `/docs` directory.
2. Install the project dependencies:
@ -266,7 +266,7 @@ After cloning the project, you can do the following to run the VuePress website
npm run dev
```
Once setup is complete, you can refer to VuePress documentation on the actual implementation here: <https://vuepress.vuejs.org/guide/>.
Once setup is complete, you can refer to VitePress documentation on the actual implementation here: <https://vitepress.dev/guide/getting-started>.
## Git/GitHub workflow
@ -292,7 +292,7 @@ everyone remember what they are. Don't worry: most of them are quite simple!
appropriate--this is a bare minimum).
- [ ] Add the variable to the appropriate location in the "Default Prompt
Format" section of the documentation
- [ ] Add an appropriate choice of options to each preset in `docs/.vuepress/public/presets/toml`
- [ ] Add an appropriate choice of options to each preset in `docs/public/presets/toml`
- [ ] Update the config file schema by running `cargo run --features config-schema -- config-schema > .github/config-schema.json`
- [ ] Create configs structs/traits in `src/configs/<module>.rs` and add the
following:

1810
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
[package]
name = "starship"
version = "1.17.1"
version = "1.20.1"
authors = ["Starship Contributors"]
build = "build.rs"
categories = ["command-line-utilities"]
@ -15,7 +15,7 @@ include = [
"build.rs",
"LICENSE",
"/README.md",
"docs/.vuepress/public/presets/toml/",
"docs/public/presets/toml/",
".github/config-schema.json",
]
keywords = ["prompt", "shell", "bash", "fish", "zsh"]
@ -23,7 +23,7 @@ license = "ISC"
readme = "README.md"
repository = "https://github.com/starship/starship"
# Note: MSRV is only intended as a hint, and only the latest version is officially supported in starship.
rust-version = "1.65"
rust-version = "1.74"
description = """
The minimal, blazing-fast, and infinitely customizable prompt for any shell! 🌌
"""
@ -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.31", default-features = false, features = ["clock", "std", "wasmbind"] }
clap = { version = "4.4.13", features = ["derive", "cargo", "unicode"] }
clap_complete = "4.4.6"
dirs-next = "2.0.0"
dunce = "1.0.4"
gethostname = "0.4.3"
chrono = { version = "0.4.38", default-features = false, features = ["clock", "std", "wasmbind"] }
clap = { version = "4.5.17", features = ["derive", "cargo", "unicode"] }
clap_complete = "4.5.26"
dirs = "5.0.1"
dunce = "1.0.5"
gethostname = "0.5.0"
# default feature restriction addresses https://github.com/starship/starship/issues/4251
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"] }
gix = { version = "0.66.0", default-features = false, features = ["max-performance-safe", "revision"] }
gix-features = { version = "0.38.2", optional = true }
indexmap = { version = "2.5.0", features = ["serde"] }
log = { version = "0.4.22", 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.10.0", optional = true }
nu-ansi-term = "0.49.0"
notify-rust = { version = "4.11.3", optional = true }
nu-ansi-term = "0.50.1"
once_cell = "1.19.0"
open = "5.0.1"
open = "5.3.0"
# update os module config and tests when upgrading os_info
os_info = "3.7.0"
os_info = "3.8.2"
path-slash = "0.2.1"
pest = "2.7.6"
pest_derive = "2.7.6"
quick-xml = "0.31.0"
pest = "2.7.12"
pest_derive = "2.7.12"
quick-xml = "0.36.1"
rand = "0.8.5"
rayon = "1.8.0"
regex = { version = "1.10.2", default-features = false, features = ["perf", "std", "unicode-perl"] }
rust-ini = "0.20.0"
semver = "1.0.21"
serde = { version = "1.0.195", features = ["derive"] }
serde_json = "1.0.111"
rayon = "1.10.0"
regex = { version = "1.10.6", default-features = false, features = ["perf", "std", "unicode-perl"] }
rust-ini = "0.21.1"
semver = "1.0.23"
serde = { version = "1.0.210", features = ["derive"] }
serde_json = "1.0.128"
sha1 = "0.10.6"
shadow-rs = { version = "0.26.0", default-features = false }
shadow-rs = { version = "0.34.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.1"
starship-battery = { version = "0.10.0", optional = true }
strsim = "0.11.1"
systemstat = "=0.2.3"
terminal_size = "0.3.0"
toml = { version = "0.8.8", features = ["preserve_order"] }
toml_edit = "0.21.0"
unicode-segmentation = "1.10.1"
unicode-width = "0.1.11"
toml = { version = "0.8.19", features = ["preserve_order"] }
toml_edit = "0.22.20"
unicode-segmentation = "1.11.0"
unicode-width = "0.1.13"
urlencoding = "2.1.3"
versions = "6.0.0"
which = "5.0.0"
yaml-rust = "0.4.5"
versions = "6.3.2"
which = "6.0.3"
yaml-rust2 = "0.8.1"
process_control = { version = "4.0.3", features = ["crossbeam-channel"] }
process_control = { version = "4.2.2", features = ["crossbeam-channel"] }
guess_host_triple = "0.1.3"
guess_host_triple = "0.1.4"
home = "0.5.9"
shell-words = "1.1.0"
[dependencies.schemars]
version = "0.8.16"
version = "0.8.21"
optional = true
features = ["preserve_order", "indexmap2"]
@ -104,7 +104,7 @@ features = ["preserve_order", "indexmap2"]
deelevate = "0.2.0"
[target.'cfg(windows)'.dependencies.windows]
version = "0.48.0"
version = "0.58.0"
features = [
"Win32_Foundation",
"Win32_UI_Shell",
@ -114,18 +114,18 @@ features = [
]
[target.'cfg(not(windows))'.dependencies]
nix = { version = "0.27.1", default-features = false, features = ["feature", "fs", "user"] }
nix = { version = "0.29.0", default-features = false, features = ["feature", "fs", "user"] }
[build-dependencies]
shadow-rs = { version = "0.26.0", default-features = false }
dunce = "1.0.4"
shadow-rs = { version = "0.34.0", default-features = false }
dunce = "1.0.5"
[target.'cfg(windows)'.build-dependencies]
winres = "0.1.12"
[dev-dependencies]
mockall = "0.12"
tempfile = "3.9.0"
mockall = "0.13.0"
tempfile = "3.12.0"
[profile.release]
codegen-units = 1

View File

@ -433,9 +433,7 @@ Please check out these previous works that helped inspire the creation of starsh
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.
**Supporter Tier**
- [Appwrite](https://appwrite.io/)
- Free code signing provided by [SignPath.io], certificate by [SignPath Foundation]
<p align="center">
<br>
@ -462,6 +460,8 @@ This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE)
[OSS]: https://software.opensuse.org/package/starship
[pkgsrc]: https://pkgsrc.se/shells/starship
[scoop]: https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json
[SignPath Foundation]: https://signpath.org
[SignPath.io]: https://signpath.io
[termux]: https://github.com/termux/termux-packages/tree/master/packages/starship
[void linux packages]: https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship
[winget]: https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/Starship/Starship

View File

@ -19,8 +19,8 @@ fn main() -> SdResult<()> {
}
fn gen_presets_hook(mut file: &File) -> SdResult<()> {
println!("cargo:rerun-if-changed=docs/.vuepress/public/presets/toml");
let paths = fs::read_dir("docs/.vuepress/public/presets/toml")?;
println!("cargo:rerun-if-changed=docs/public/presets/toml");
let paths = fs::read_dir("docs/public/presets/toml")?;
let mut sortedpaths = paths.collect::<io::Result<Vec<_>>>()?;
sortedpaths.sort_by_key(std::fs::DirEntry::path);

View File

@ -1,20 +1,17 @@
[advisories]
vulnerability = "deny"
unmaintained = "warn"
yanked = "warn"
notice = "warn"
version = 2
# A list of advisory IDs to ignore. Note that ignored advisories will still
# output a note when they are encountered.
ignore = [
# "RUSTSEC-0000-0000",
# { id = "RUSTSEC-0000-0000", reason = "" },
]
[licenses]
# The lint level for crates which do not have a detectable license
unlicensed = "deny"
version = 2
# List of explicitly allowed licenses
allow = [
"Apache-2.0 WITH LLVM-exception",
@ -27,6 +24,7 @@ allow = [
"MIT",
"MPL-2.0",
"Unicode-DFS-2016",
"Unicode-3.0",
"Unlicense",
"WTFPL",
"Zlib",

View File

@ -1,98 +1,346 @@
import { defineConfig, SidebarConfigArray } from "vuepress/config";
import { defineConfig } from "vitepress";
const sidebar = (lang, override = {}): SidebarConfigArray =>
const sidebar = (lang: string | undefined, override = {}) =>
[
"", // "Home", which should always have a override
"guide", // README, which should always have a override
{ page: "guide", text: "Guide" }, // README, which should always have a override
// Overrides for any page below is an inconsistency between the sidebar title and page title
"installing",
"config",
"advanced-config",
"faq",
"presets",
].map(page => {
{ page: "installing", text: "Installation" },
{ page: "config", text: "Configuration" },
{ page: "advanced-config", text: "Advanced Configuration" },
{ page: "faq", text: "FAQ" },
{ page: "presets", text: "Presets" },
].map(item => {
let path = "/";
if (lang) {
path += `${lang}/`;
}
if (page) {
path += `${page}/`;
if (item.page) {
path += `${item.page}/`;
}
// If no override is set for current page, let VuePress fallback to page title
return page in override ? [path, override[page]] : path;
// If no override is set for current page, let VitePress fallback to page title
return { link: path, text: override?.[item.page] ?? item.text };
});
module.exports = defineConfig({
const editLinkPattern = 'https://github.com/starship/starship/edit/master/docs/:path';
export default defineConfig({
locales: {
"/": {
root: {
label: "English",
lang: "en-US",
title: "Starship",
description: "The minimal, blazing-fast, and infinitely customizable prompt for any shell!",
themeConfig: {
// Custom navbar values
nav: [{ text: "Configuration", link: "/config/"}],
// Custom sidebar values
sidebar: sidebar("", {
guide: "Guide",
}),
// Enable edit links
editLink: {
text: "Edit this page on GitHub",
pattern: editLinkPattern,
},
"/de-DE/": {
}
},
"de-DE": {
label: "Deutsch",
lang: "de-DE",
title: "Starship",
description: "Minimale, super schnelle und unendlich anpassbare Prompt für jede Shell!",
themeConfig: {
// text for the language dropdown
langMenuLabel: "Sprachen",
returnToTopLabel: "Zurück zum Seitenanfang",
sidebarMenuLabel: "Menü",
nav: [{ text: "Konfiguration", link: "/de-DE/config/" }],
// Custom sidebar values
sidebar: sidebar("de-DE", {
guide: "Anleitung",
installing: "Erweiterte Installation",
faq: "Häufig gestellte Fragen",
presets: "Konfigurations-Beispiele",
}),
editLink: {
text: "Bearbeite diese Seite auf GitHub",
pattern: editLinkPattern,
},
"/es-ES/": {
}
},
"es-ES": {
label: "Español",
lang: "es-ES",
title: "Starship",
description:
"¡El prompt minimalista, ultrarápido e infinitamente personalizable para cualquier intérprete de comandos!",
themeConfig: {
// text for the language dropdown
langMenuLabel: "Idiomas",
returnToTopLabel: "Volver arriba",
sidebarMenuLabel: "Menú",
// Custom navbar values
nav: [{ text: "Configuración", link: "/es-ES/config/" }],
// Custom sidebar values
sidebar: sidebar("es-ES", {
guide: "Guía",
installing: "Instalación avanzada",
faq: "Preguntas frecuentes",
presets: "Ajustes predeterminados",
}),
editLink: {
text: "Edita esta página en GitHub",
pattern: editLinkPattern,
},
"/fr-FR/": {
},
},
"fr-FR": {
label: "Français",
lang: "fr-FR",
title: "Starship",
description: "L'invite minimaliste, ultra-rapide et personnalisable à l'infini pour n'importe quel shell !",
themeConfig: {
// text for the language dropdown
langMenuLabel: "Langues",
returnToTopLabel: "Retour en haut",
// Custom navbar values
nav: [{ text: "Configuration", link: "/fr-FR/config/" }],
// Custom sidebar values
sidebar: sidebar("fr-FR", {
guide: "Guide",
installing: "Installation avancée",
}),
editLink: {
text: "Éditez cette page sur GitHub",
pattern: editLinkPattern,
},
"/id-ID/": {
},
},
"id-ID": {
label: "Bahasa Indonesia",
lang: "id-ID",
title: "Starship",
description: "Prompt yang minimal, super cepat, dan dapat disesuaikan tanpa batas untuk shell apa pun!",
themeConfig: {
// text for the language dropdown
langMenuLabel: "Languages",
returnToTopLabel: "Kembali ke atas",
// Custom navbar values
nav: [{ text: "Konfigurasi", link: "/id-ID/config/" }],
// Custom sidebar values
sidebar: sidebar("id-ID", {
guide: "Petunjuk",
installing: "Advanced Installation",
faq: "Pertanyaan Umum",
presets: "Prasetel",
}),
editLink: {
text: "Sunting halaman ini di Github",
pattern: editLinkPattern,
},
"/it-IT/": {
},
},
"it-IT": {
label: "Italiano",
lang: "it-IT",
title: "Starship",
description: "Il prompt minimalista, super veloce e infinitamente personalizzabile per qualsiasi shell!",
themeConfig: {
// text for the language dropdown
langMenuLabel: "Languages",
returnToTopLabel: "Torna all'inizio",
// Custom navbar values
nav: [{ text: "Configuration", link: "/it-IT/config/" }],
// Custom sidebar values
sidebar: sidebar("it-IT", {
guide: "Guide",
installing: "Installazione Avanzata",
}),
editLink: {
text: "Modifica questa pagina in Github",
pattern: editLinkPattern,
},
"/ja-JP/": {
},
},
"ja-JP": {
label: "日本語",
lang: "ja-JP",
title: "Starship",
description: "シェル用の最小限の、非常に高速で、無限にカスタマイズ可能なプロンプトです!",
themeConfig: {
// text for the language dropdown
langMenuLabel: "言語",
returnToTopLabel: "ページの先頭へ",
sidebarMenuLabel: "メニュー",
// Custom navbar values
nav: [{ text: "設定", link: "/ja-JP/config/" }],
// Custom sidebar values
sidebar: sidebar("ja-JP", {
guide: "ガイド",
installing: "高度なインストール",
}),
editLink: {
text: "GitHub で編集する",
pattern: editLinkPattern,
},
"/pt-BR/": {
},
},
"pt-BR": {
label: "Português do Brasil",
lang: "pt-BR",
title: "Starship",
description:
"O prompt minimalista, extremamente rápido e infinitamente personalizável para qualquer shell!",
themeConfig: {
// text for the language dropdown
langMenuLabel: "Languages",
returnToTopLabel: "Voltar ao topo",
// Custom navbar values
nav: [{ text: "Configuração", link: "/pt-BR/config/" }],
// Custom sidebar values
sidebar: sidebar("pt-BR", {
guide: "Guia",
installing: "Instalação avançada",
faq: "Perguntas frequentes",
presets: "Predefinições",
}),
editLink: {
text: "Edite esta página no Github",
pattern: editLinkPattern,
},
"/ru-RU/": {
},
},
"ru-RU": {
label: "Русский",
lang: "ru-RU",
title: "Starship",
description: "Минималистичная, быстрая и бесконечно настраиваемая командная строка для любой оболочки!",
themeConfig: {
// text for the language dropdown
langMenuLabel: "Языки",
returnToTopLabel: "Наверх",
sidebarMenuLabel: "Меню",
// Custom navbar values
nav: [{ text: "Настройка", link: "/ru-RU/config/" }],
// Custom sidebar values
sidebar: sidebar("ru-RU", {
guide: "Руководство",
installing: "Advanced Installation",
config: "Настройка",
"advanced-config": "Расширенная Настройка",
faq: "Часто Задаваемые Вопросы",
}),
editLink: {
text: "Редактировать эту страницу на GitHub",
pattern: editLinkPattern,
},
"/uk-UA/": {
},
},
"uk-UA": {
label: "Українська",
lang: "uk-UA",
title: "Starship",
description: "Простий, супер швидкий та безмежно адаптивний командний рядок для будь-якої оболонки!",
themeConfig: {
// text for the language dropdown
langMenuLabel: "Мови",
returnToTopLabel: "Догори",
sidebarMenuLabel: "Меню",
// Custom navbar values
nav: [{ text: "Налаштування", link: "/uk-UA/config/" }],
// Custom sidebar values
sidebar: sidebar("uk-UA", {
guide: "Керівництво",
installing: "Розширене встановлення",
config: "Налаштування",
"advanced-config": "Розширені налаштування",
faq: "Часті питання",
presets: "Шаблони",
}),
editLink: {
text: "Редагувати цю сторінку на GitHub",
pattern: editLinkPattern,
},
"/vi-VN/": {
},
},
"vi-VN": {
label: "Tiếng Việt",
lang: "vi-VN",
title: "Starship",
description: "Nhỏ gọn, cực nhanh, và khả năng tuỳ chỉnh vô hạn prompt cho bất kì shell nào!",
themeConfig: {
// text for the language dropdown
langMenuLabel: "Ngôn ngữ",
returnToTopLabel: "Quay lại đầu trang",
// Custom navbar values
nav: [{ text: "Cấu hình", link: "/vi-VN/config/" }],
// Custom sidebar values
sidebar: sidebar("vi-VN", {
guide: "Hướng dẫn",
installing: "Cài đặt nâng cao",
faq: "Các hỏi thường gặp",
}),
editLink: {
text: "Chỉnh sửa trang này trên GitHub",
pattern: editLinkPattern,
},
"/zh-CN/": {
},
},
"zh-CN": {
label: "简体中文",
lang: "zh-CN",
title: "Starship",
description: "轻量级、反应迅速,可定制的高颜值终端!",
themeConfig: {
// text for the language dropdown
langMenuLabel: "语言",
returnToTopLabel: "返回顶部",
sidebarMenuLabel: "目录",
// Custom navbar values
nav: [{ text: "配置", link: "/zh-CN/config/" }],
// Custom sidebar values
sidebar: sidebar("zh-CN", {
guide: "指南",
installing: "高级安装",
config: "配置",
"advanced-config": "高级配置",
faq: "常见问题",
presets: "社区配置分享",
}),
editLink: {
text: "在 GitHub 上修改此页",
pattern: editLinkPattern,
},
"/zh-TW/": {
},
},
"zh-TW": {
label: "繁體中文",
lang: "zh-TW",
title: "Starship",
description: "適合任何 shell 的最小、極速、無限客製化的提示字元!",
themeConfig: {
// text for the language dropdown
langMenuLabel: "語言",
returnToTopLabel: "返回頂部",
sidebarMenuLabel: "目錄",
// Custom navbar values
nav: [{ text: "設定", link: "/zh-TW/config/" }],
// Custom sidebar values
sidebar: sidebar("zh-TW", {
guide: "指引",
installing: "進階安裝",
}),
editLink: {
text: "在 GitHub 上修改此頁面",
pattern: editLinkPattern,
},
},
},
},
// prettier-ignore
@ -120,7 +368,7 @@ module.exports = defineConfig({
[
"script",
{
async: true,
async: '',
src: "https://www.googletagmanager.com/gtag/js?id=G-N3M0VJ9NL6",
},
],
@ -130,245 +378,41 @@ module.exports = defineConfig({
"window.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\ngtag('config', 'G-N3M0VJ9NL6');",
],
],
evergreen: true,
theme: "default-prefers-color-scheme",
sitemap: {
hostname: 'https://starship.rs'
},
vite: {
resolve: {
preserveSymlinks: true
}
},
cleanUrls: true,
markdown: {
theme: "github-dark"
},
ignoreDeadLinks: [
/\/toml\/.*/,
],
// VitePress doesn't support README.md as index files
// Rewrite README.md to index.md at different levels
rewrites: {
"README.md": "index.md",
":c0/README.md": ":c0/index.md",
":c0/:c1/README.md": ":c0/:c1/index.md",
":c0/:c1/:c2/README.md": ":c0/:c1/:c2/index.md",
":c0/:c1/:c2/:c3/README.md": ":c0/:c1/:c2/:c3/index.md",
},
themeConfig: {
logo: "/icon.png",
// the GitHub repo path
repo: "starship/starship",
// the label linking to the repo
repoLabel: "GitHub",
// if your docs are not at the root of the repo:
docsDir: "docs",
// defaults to false, set to true to enable
editLinks: true,
socialLinks: [
{ icon: 'github', link: 'https://github.com/starship/starship' },
],
// enables Algolia DocSearch
algolia: {
apiKey: "44118471f56286dcda7db941a043370d",
indexName: "starship",
appId: "M3XUO3SQOR",
},
locales: {
"/": {
// text for the language dropdown
selectText: "Languages",
// label for this locale in the language dropdown
label: "English",
// Custom text for edit link. Defaults to "Edit this page"
editLinkText: "Edit this page on GitHub",
// Custom navbar values
nav: [{ text: "Configuration", link: "/config/" }],
// Custom sidebar values
sidebar: sidebar("", {
guide: "Guide",
}),
},
"/de-DE/": {
// text for the language dropdown
selectText: "Sprachen",
// label for this locale in the language dropdown
label: "Deutsch",
// Custom text for edit link. Defaults to "Edit this page"
editLinkText: "Bearbeite diese Seite auf GitHub",
// Custom navbar values
nav: [{ text: "Konfiguration", link: "/de-DE/config/" }],
// Custom sidebar values
sidebar: sidebar("de-DE", {
guide: "Anleitung",
installing: "Erweiterte Installation",
faq: "Häufig gestellte Fragen",
presets: "Konfigurations-Beispiele",
}),
},
"/es-ES/": {
// text for the language dropdown
selectText: "Idiomas",
// label for this locale in the language dropdown
label: "Español",
// Custom text for edit link. Defaults to "Edit this page"
editLinkText: "Edita esta página en GitHub",
// Custom navbar values
nav: [{ text: "Configuración", link: "/es-ES/config/" }],
// Custom sidebar values
sidebar: sidebar("es-ES", {
guide: "Guía",
installing: "Instalación avanzada",
faq: "Preguntas frecuentes",
presets: "Ajustes predeterminados",
}),
},
"/fr-FR/": {
// text for the language dropdown
selectText: "Langues",
// label for this locale in the language dropdown
label: "Français",
// Custom text for edit link. Defaults to "Edit this page"
editLinkText: "Éditez cette page sur GitHub",
// Custom navbar values
nav: [{ text: "Configuration", link: "/fr-FR/config/" }],
// Custom sidebar values
sidebar: sidebar("fr-FR", {
guide: "Guide",
installing: "Installation avancée",
}),
},
"/id-ID/": {
// text for the language dropdown
selectText: "Languages",
// label for this locale in the language dropdown
label: "Bahasa Indonesia",
// Custom text for edit link. Defaults to "Edit this page"
editLinkText: "Sunting halaman ini di Github",
// Custom navbar values
nav: [{ text: "Konfigurasi", link: "/id-ID/config/" }],
// Custom sidebar values
sidebar: sidebar("id-ID", {
guide: "Petunjuk",
installing: "Advanced Installation",
faq: "Pertanyaan Umum",
presets: "Prasetel",
}),
},
"/it-IT/": {
// text for the language dropdown
selectText: "Languages",
// label for this locale in the language dropdown
label: "Italiano",
// Custom text for edit link. Defaults to "Edit this page"
editLinkText: "Modifica questa pagina in Github",
// Custom navbar values
nav: [{ text: "Configuration", link: "/it-IT/config/" }],
// Custom sidebar values
sidebar: sidebar("it-IT", {
guide: "Guide",
installing: "Installazione Avanzata",
}),
},
"/ja-JP/": {
// text for the language dropdown
selectText: "言語",
// label for this locale in the language dropdown
label: "日本語",
// Custom text for edit link. Defaults to "Edit this page"
editLinkText: "GitHub で編集する",
// Custom navbar values
nav: [{ text: "設定", link: "/ja-JP/config/" }],
// Custom sidebar values
sidebar: sidebar("ja-JP", {
guide: "ガイド",
installing: "高度なインストール",
}),
},
"/pt-BR/": {
// text for the language dropdown
selectText: "Languages",
// label for this locale in the language dropdown
label: "Português do Brasil",
// Custom text for edit link. Defaults to "Edit this page"
editLinkText: "Edite esta página no Github",
// Custom navbar values
nav: [{ text: "Configuração", link: "/pt-BR/config/" }],
// Custom sidebar values
sidebar: sidebar("pt-BR", {
guide: "Guia",
installing: "Instalação avançada",
faq: "Perguntas frequentes",
presets: "Predefinições",
}),
},
"/ru-RU/": {
// text for the language dropdown
selectText: "Языки",
// label for this locale in the language dropdown
label: "Русский",
// Custom text for edit link. Defaults to "Edit this page"
editLinkText: "Редактировать эту страницу на GitHub",
// Custom navbar values
nav: [{ text: "Настройка", link: "/ru-RU/config/" }],
// Custom sidebar values
sidebar: sidebar("ru-RU", {
guide: "Руководство",
installing: "Advanced Installation",
config: "Настройка",
"advanced-config": "Расширенная Настройка",
faq: "Часто Задаваемые Вопросы",
}),
},
"/uk-UA/": {
// text for the language dropdown
selectText: "Мови",
// label for this locale in the language dropdown
label: "Українська",
// Custom text for edit link. Defaults to "Edit this page"
editLinkText: "Редагувати цю сторінку на GitHub",
// Custom navbar values
nav: [{ text: "Налаштування", link: "/uk-UA/config/" }],
// Custom sidebar values
sidebar: sidebar("uk-UA", {
guide: "Керівництво",
installing: "Розширене встановлення",
config: "Налаштування",
"advanced-config": "Розширені налаштування",
faq: "Часті питання",
presets: "Шаблони",
}),
},
"/vi-VN/": {
// text for the language dropdown
selectText: "Ngôn ngữ",
// label for this locale in the language dropdown
label: "Tiếng Việt",
// Custom text for edit link. Defaults to "Edit this page"
editLinkText: "Chỉnh sửa trang này trên GitHub",
// Custom navbar values
nav: [{ text: "Cấu hình", link: "/vi-VN/config/" }],
// Custom sidebar values
sidebar: sidebar("vi-VN", {
guide: "Hướng dẫn",
installing: "Cài đặt nâng cao",
faq: "Các hỏi thường gặp",
}),
},
"/zh-TW/": {
// text for the language dropdown
selectText: "語言",
// label for this locale in the language dropdown
label: "繁體中文",
// Custom text for edit link. Defaults to "Edit this page"
editLinkText: "在 GitHub 上修改此頁面",
// Custom navbar values
nav: [{ text: "設定", link: "/zh-TW/config/" }],
// Custom sidebar values
sidebar: sidebar("zh-TW", {
guide: "指引",
installing: "進階安裝",
}),
},
"/zh-CN/": {
// text for the language dropdown
selectText: "语言",
// label for this locale in the language dropdown
label: "简体中文",
// Custom text for edit link. Defaults to "Edit this page"
editLinkText: "在 GitHub 上修改此页",
// Custom navbar values
nav: [{ text: "配置", link: "/zh-CN/config/" }],
// Custom sidebar values
sidebar: sidebar("zh-CN", {
guide: "指南",
installing: "高级安装",
presets: "社区配置分享",
}),
},
},
},
plugins: [
[
"vuepress-plugin-sitemap",
{
hostname: "https://starship.rs",
},
],
["vuepress-plugin-code-copy", true],
],
}
});

View File

@ -0,0 +1,112 @@
.VPHero .container {
flex-direction: column;
text-align: center !important;
gap: 10px;
}
.VPHero .image {
order: 0;
margin: 0;
}
.VPHero .image-container {
transform: none;
height: auto;
display: flex;
justify-content: center;
}
@media (max-width: 640px) {
.VPHero .image-container {
max-width: 320px;
width: auto;
}
}
.VPHero .image img {
width: 100%;
max-height: 130px;
max-width: none;
position: static;
transform: none;
}
.VPHero .image img.uwu {
max-height: 290px;
max-width: 80vw;
}
.VPHero .container .actions {
justify-content: center !important;
}
.VPHero .main {
margin: 0 auto;
}
.demo-video {
max-width: 700px;
width: 100%;
margin: 50px auto;
border-radius: 6px;
}
.action-button {
background-color: #dd0b78 !important;
border-bottom: #c6096b !important;
}
p[align="center"] img {
display: inline-block;
}
p[align="center"] img[height="20"] {
height: 20px;
}
@font-face {
font-family: 'Nerd Font';
src: url("/nerd-font.woff2") format("woff2");
font-weight: 400;
font-style: normal;
unicode-range: U+e000-f8ff, U+f0000-fffff, U+100000-10ffff;
}
code {
overflow-wrap: break-word;
}
.vp-doc [class*='language-']>button.copy {
top: unset;
bottom: 12px;
}
:root {
--vp-font-family-mono: 'Nerd Font', source-code-pro, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
--vp-c-brand-1: #9b0854;
--vp-c-brand-2: #f31186;
--vp-c-brand-3: #dd0b78;
--vp-c-brand-soft: rgba(221, 11, 120, 0.14);
/* The following colors were extracted from the dark variant of the default VitePress theme
* Styled variables from: https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css#L319-L362
*/
--vp-code-block-bg: #282c34;
--vp-code-color: #282c34;
--vp-code-block-divider-color: #000;
--vp-code-lang-color: rgba(235, 235, 245, 0.38);
--vp-code-line-highlight-color: rgba(101, 117, 133, 0.16);
--vp-code-line-number-color: rgba(235, 235, 245, 0.38);
--vp-code-copy-code-border-color: #2e2e32;
--vp-code-copy-code-bg: #202127;
--vp-code-copy-code-hover-border-color: #2e2e32;
--vp-code-copy-code-hover-bg: #1b1b1f;
--vp-code-copy-code-active-text: rgba(235, 235, 245, 0.6);
}
.dark {
--vp-c-brand-1: #ff70cd;
--vp-c-brand-2: #ff14ad;
--vp-c-brand-3: #ff33b8;
--vp-c-brand-soft: rgba(255, 51, 184, 0.14);
--vp-code-color: #fff;
}

View File

@ -0,0 +1,4 @@
import DefaultTheme from "vitepress/theme";
import "./index.css";
export default DefaultTheme;

View File

@ -1 +0,0 @@
../../../.github/config-schema.json

View File

@ -1 +0,0 @@
../../../media/icon.png

View File

@ -1 +0,0 @@
../../../install/install.sh

View File

@ -1 +0,0 @@
../../../media/logo.png

View File

@ -1 +0,0 @@
../../../media/logo.svg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 KiB

View File

@ -1,284 +0,0 @@
format = """
$cmd_duration\
$hostname\
$localip\
$shlvl\
$shell\
$env_var\
$username\
$sudo\
$character\
"""
right_format = """
$singularity\
$kubernetes\
$directory\
$vcsh\
$fossil_branch\
$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\
$vlang\
$vagrant\
$zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
$gcloud\
$openstack\
$azure\
$crystal\
$custom\
$jobs\
$status\
$os\
$container\
$battery\
$time\
"""
add_newline = true
[character]
format = "$symbol "
success_symbol = "[◉](bold italic bright-yellow)"
error_symbol = "[⊘](italic purple)"
[env_var.VIMSHELL] # vim subshell
format = "[$env_value]($style)"
style = 'green italic'
[sudo]
format = "[$symbol]($style)"
style = "italic bright-purple"
symbol = "◇┈"
disabled = false
[username]
style_user = "yellow bold"
style_root = "purple bold italic"
format = "[$user]($style) ▻ "
disabled = false
[directory]
home_symbol = "⌂"
truncation_length = 2
truncation_symbol = "▦ "
read_only = " ■"
style = "italic blue"
format = ' [$path]($style)[$read_only]($read_only_style)'
[cmd_duration]
min_time = 500
format = "[$duration ](italic bright-yellow)"
[jobs]
format = "[ $symbol$number]($style)"
style = "white"
symbol = "[▶ ](blue italic)"
[localip]
ssh_only = true
format = " ◯[$localipv4](bold magenta)"
disabled = false
[time]
disabled = false
format = "[ $time]($style)"
time_format = "%R"
utc_time_offset = "local"
style = "dimmed white"
[battery]
format = "[ $percentage $symbol]($style)"
full_symbol = "[█](italic green)"
charging_symbol = "[↑](italic green)"
discharging_symbol = "[↓](italic)"
unknown_symbol = "[░](italic)"
empty_symbol = "[▃](italic red)"
[[battery.display]]
threshold = 40
style = "dimmed yellow"
[[battery.display]]
threshold = 70
style = "dimmed white"
[git_branch]
format = "[ $symbol $branch(:$remote_branch)]($style)"
symbol = "[◬](bold bright-blue)"
style = "bold italic bright-blue"
[git_status]
style = "italic bright-blue"
format = """([⎪$ahead_behind$staged$modified$untracked$renamed$deleted$conflicted$stashed⎥]($style))"""
conflicted = "[◪◦](italic bright-magenta)"
ahead = "[▲│[${count}](bold white)│](italic green)"
behind = "[▽│[${count}](bold white)│](italic red)"
diverged = "[◇ ▲┤[${ahead_count}](regular white)│▽┤[${behind_count}](regular white)│](italic bright-magenta)"
untracked = "[◌◦](italic bright-yellow)"
stashed = "[◦◫◦](italic white)"
modified = "[●◦](italic yellow)"
staged = "[■┤[$count](bold white)│](italic bright-cyan)"
renamed = "[◎◦](italic bright-blue)"
deleted = "[✕](italic red)"
[deno]
format = " deno [∫ $version](blue italic)"
version_format = "${major}.${minor}"
[lua]
format = " lua [${symbol}${version}]($style)"
symbol = "⨀ "
style = "italic bright-yellow"
[nodejs]
format = " node [◫ ($version)](italic bright-green)"
detect_files = ["package-lock.json", "yarn.lock"]
version_format = "${major}.${minor}"
[python]
format = " py [${symbol}${version}]($style)"
symbol = "[⌉](italic bright-blue)⌊ "
version_format = "${major}.${minor}"
style = "italic bright-yellow"
[ruby]
format = " rb [${symbol}${version}]($style)"
symbol = "◆ "
version_format = "${major}.${minor}"
style = "italic red"
[rust]
format = " rs [$symbol$version]($style)"
symbol = "⊃ "
version_format = "${major}.${minor}"
style = "italic red"
[package]
format = " pkg [$symbol$version]($style)"
version_format = "${major}.${minor}"
symbol = "◫ "
style = "bright-yellow italic"
[swift]
format = " sw [${symbol}${version}]($style)"
symbol = "◁ "
style = "italic bright-red"
version_format = "${major}.${minor}"
[aws]
format = " aws [$symbol $profile $region]($style)"
style = "italic blue"
symbol = "▲ "
[buf]
symbol = "■ "
format = " buf [$symbol $version $buf_version]($style)"
[c]
symbol = "∁ "
format = " c [$symbol($version(-$name))]($style)"
[conda]
symbol = "◯ "
format = " conda [$symbol$environment]($style)"
[dart]
symbol = "◁◅ "
format = " dart [$symbol($version )]($style)"
[docker_context]
symbol = "◧ "
format = " docker [$symbol$context]($style)"
[elixir]
symbol = "△ "
format = " exs [$symbol $version OTP $otp_version ]($style)"
[elm]
symbol = "◩ "
format = " elm [$symbol($version )]($style)"
[golang]
symbol = "∩ "
format = " go [$symbol($version )]($style)"
[haskell]
symbol = "❯λ "
format = " hs [$symbol($version )]($style)"
[java]
symbol = " "
format = " java [${symbol}(${version} )]($style)"
[julia]
symbol = "◎ "
format = " jl [$symbol($version )]($style)"
[memory_usage]
symbol = "▪▫▪ "
format = " mem [${ram}( ${swap})]($style)"
[nim]
symbol = "▴▲▴ "
format = " nim [$symbol($version )]($style)"
[nix_shell]
symbol = "⊛ "
format = " nix [$symbol$state $name]($style)"
[spack]
symbol = "◇ "
format = " spack [$symbol$environment]($style)"

View File

@ -1,38 +0,0 @@
.home .hero img
max-width: 500px !important
min-width: 300px
width: 100%
.center
margin 0 auto;
width: 80%
.demo-video
width: 100%
margin: 50px 0
border-radius: 6px
.hero
margin: 150px 25px 70px
.action-button
background-color: #dd0b78 !important
border-bottom: #c6096b !important
@font-face
font-family: 'Nerd Font';
src: url("/nerd-font.woff2") format("woff2");
font-weight: 400;
font-style: normal
code
font-family: 'Nerd Font', source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
overflow-wrap: break-word
@media (prefers-color-scheme: light)
:root
--languageTextColor: rgba(255,255,255,0.4)
.code-copy
position: absolute
right: 0
bottom: 1px

View File

@ -1,6 +0,0 @@
$accentColor = #DD0B78
$accentDarkColor = #ff33b8
$textColor = #2c3e50
$borderColor = #eaecef
$codeBgLightColor = #282c34
$preTextLightColor = #fff

View File

@ -1,10 +1,13 @@
---
home: true
heroImage: /logo.svg
heroText: null
tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell!
actionText: Get Started →
actionLink: ./guide/
layout: home
hero:
image: /logo.svg
text: null
tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell!
actions:
- theme: brand
text: Get Started →
link: ./guide/
features:
- title: Compatibility First
details: Works on the most common shells on the most common operating systems. Use it everywhere!
@ -19,12 +22,24 @@ 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.
---
<div class="center">
<video class="demo-video" muted autoplay loop playsinline>
<script setup>
import { onMounted } from 'vue'
onMounted(() => {
const urlParams = new URLSearchParams(window.location.search)
if (urlParams.has('uwu') || urlParams.has('kawaii')) {
const img = document.querySelector('.VPHero .VPImage.image-src')
img.classList.add('uwu')
img.src = '/logo-uwu.png'
img.alt = 'Kawaii Starship Logo by @sawaratsuki1004'
}
})
</script>
<video class="demo-video" muted autoplay loop playsinline>
<source src="/demo.webm" type="video/webm">
<source src="/demo.mp4" type="video/mp4">
</video>
</div>
</video>
### Prerequisites
@ -51,6 +66,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
```sh
brew install starship
```
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
@ -143,6 +159,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
:::
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
```sh
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu

View File

@ -106,6 +106,41 @@ starship init fish | source
enable_transience
```
## TransientPrompt and TransientRightPrompt in Bash
The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework at v0.4 or higher allows you to replace
the previous-printed prompt with custom strings. This is useful in cases where all
the prompt information is not always needed. To enable this, put this in `~/.bashrc`
`bleopt prompt_ps1_transient=<value>`:
The \<value\> here is a colon-separated list of `always`, `same-dir` and `trim`.
When `prompt_ps1_final` is empty and the option `prompt_ps1_transient` has a non-empty \<value\>,
the prompt specified by `PS1` is erased on leaving the current command line.
If \<value\> contains a field `trim`, only the last line of multiline `PS1` is
preserved and the other lines are erased. Otherwise, the command line will be
redrawn as if `PS1=` is specified. When a field `same-dir` is contained in
\<value\> and the current working directory is different from the final directory of
the previous command line, this option `prompt_ps1_transient` is ignored.
Make the following changes to your `~/.blerc` (or in `~/.config/blesh/init.sh`) to customize what gets displayed on
the left and on the right:
- To customize what the left side of input gets replaced with, configure the
`prompt_ps1_final` Ble.sh option. For example, to display Starship's `character`
module here, you would do
```bash
bleopt prompt_ps1_final='$(starship module character)'
```
- To customize what the right side of input gets replaced with, configure the
`prompt_rps1_final` Ble.sh option. For example, to display
the time at which the last command was started here, you would do
```bash
bleopt prompt_rps1_final='$(starship module time)'
```
## Custom pre-prompt and pre-execution Commands in Cmd
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands
@ -259,9 +294,11 @@ in `format` is also supported in `right_format`. The `$all` variable will only c
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).
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.
`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash.
Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework v0.4 or higher should be installed in order to use right prompt in bash.
### Example
@ -300,7 +337,7 @@ Note: Continuation prompts are only available in the following shells:
```toml
# ~/.config/starship.toml
# A continuation prompt that displays two filled in arrows
# A continuation prompt that displays two filled-in arrows
continuation_prompt = '▶▶ '
```
@ -321,7 +358,9 @@ Style strings are a list of words, separated by whitespace. The words are not ca
- `<color>`
- `none`
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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.
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future.
`<color>` can also be set to `prev_fg` or `prev_bg` which evaluates to the previous item's foreground or background color respectively if available or `none` otherwise.
`inverted` 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.
@ -338,6 +377,6 @@ If multiple colors are specified for foreground/background, the last one in the
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
- 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
- `strikethrough` is not supported by the default macOS Terminal.app.

View File

@ -1,10 +1,14 @@
---
home: true
heroImage: /logo.svg
heroText:
tagline: التخصيص البسيط و السريع و الغير محدود لي ال"shell"!
actionText: البدء مع Starship ←
actionLink: ./guide/
layout: home
hero:
image: /logo.svg
text:
tagline: التخصيص البسيط و السريع و الغير محدود لي ال"shell"!
actions:
-
theme: brand
text: البدء مع Starship ←
link: ./guide/
features:
-
title: التوافق أولاً
@ -21,12 +25,24 @@ 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.
---
<div class="center">
<video class="demo-video" muted autoplay loop playsinline>
<script setup>
import { onMounted } from 'vue'
onMounted(() => {
const urlParams = new URLSearchParams(window.location.search)
if (urlParams.has('uwu') || urlParams.has('kawaii')) {
const img = document.querySelector('.VPHero .VPImage.image-src')
img.classList.add('uwu')
img.src = '/logo-uwu.png'
img.alt = 'Kawaii Starship Logo by @sawaratsuki1004'
}
})
</script>
<video class="demo-video" muted autoplay loop playsinline>
<source src="/demo.webm" type="video/webm">
<source src="/demo.mp4" type="video/mp4">
</video>
</div>
</video>
### المتطلبات الأساسية
@ -55,6 +71,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
```sh
brew install starship
```
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
@ -154,6 +171,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
:::
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
```sh
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu

View File

@ -80,6 +80,26 @@ starship init fish | source
enable_transience
```
## TransientPrompt and TransientRightPrompt in Bash
The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework at v0.4 or higher allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=<value>`:
The \<value\> here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and the option `prompt_ps1_transient` has a non-empty \<value\>, the prompt specified by `PS1` is erased on leaving the current command line. If \<value\> contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in \<value\> and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored.
Make the following changes to your `~/.blerc` (or in `~/.config/blesh/init.sh`) to customize what gets displayed on the left and on the right:
- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do
```bash
bleopt prompt_ps1_final='$(starship module character)'
```
- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do
```bash
bleopt prompt_rps1_final='$(starship module time)'
```
## 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:
@ -203,9 +223,11 @@ Invoke-Expression (&starship init powershell)
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).
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.
`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash.
Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework v0.4 or higher should be installed in order to use right prompt in bash.
### مثال
@ -244,7 +266,7 @@ Note: Continuation prompts are only available in the following shells:
```toml
# ~/.config/starship.toml
# A continuation prompt that displays two filled in arrows
# A continuation prompt that displays two filled-in arrows
continuation_prompt = '▶▶ '
```
@ -265,7 +287,7 @@ Style strings are a list of words, separated by whitespace. The words are not ca
- `<color>`
- `none`
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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.
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `<color>` can also be set to `prev_fg` or `prev_bg` which evaluates to the previous item's foreground or background color respectively if available or `none` otherwise. `inverted` 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.
@ -279,6 +301,6 @@ If multiple colors are specified for foreground/background, the last one in the
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
- 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
- `strikethrough` is not supported by the default macOS Terminal.app.

View File

@ -158,7 +158,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri
#### 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/).
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
@ -198,14 +198,14 @@ This is the list of prompt-wide configuration options.
### Options
| Option | الافتراضي | الوصف |
| ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ----------------- | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `right_format` | `''` | See [Enable Right Prompt](/advanced-config/#enable-right-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. |
| `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
@ -281,6 +281,7 @@ $elixir\
$elm\
$erlang\
$fennel\
$gleam\
$golang\
$guix_shell\
$haskell\
@ -300,6 +301,7 @@ $php\
$pulumi\
$purescript\
$python\
$quarto\
$raku\
$rlang\
$red\
@ -323,6 +325,7 @@ $aws\
$gcloud\
$openstack\
$azure\
$nats\
$direnv\
$env_var\
$crystal\
@ -543,7 +546,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
```
@ -600,7 +603,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. |
| `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. |
@ -617,7 +620,9 @@ The `bun` module shows the currently installed version of the [bun](https://bun.
*: This variable can only be used as a part of a style string
### مثال
### Examples
#### Customize the format
```toml
# ~/.config/starship.toml
@ -626,6 +631,15 @@ The `bun` module shows the currently installed version of the [bun](https://bun.
format = 'via [🍔 $version](bold green) '
```
#### Replace Node.js
You can override the `detect_files` property of [the nodejs module](#nodejs) in your config so as to only show the bun runtime:
```
[nodejs]
detect_files = ['package.json', '.node-version', '!bunfig.toml', '!bun.lockb']
```
## 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.
@ -1165,6 +1179,7 @@ The `direnv` module shows the status of the current rc file if one is present. T
| `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. |
@ -1887,7 +1902,7 @@ The following variables can be used in `format`:
| Variable | الوصف |
| -------------- | ------------------------------------------------------------------------------------------------------------- |
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$typechanged$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. |
@ -1953,6 +1968,44 @@ Use Windows Starship executable on Windows paths in WSL
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
```
## Gleam
The `gleam` module shows the currently installed version of [Gleam](https://gleam.run/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `gleam.toml` file
- The current directory contains a file with the `.gleam` extension
### 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` | `'⭐ '` | A format string representing the symbol of Gleam. |
| `detect_extensions` | `['gleam']` | Which extensions should trigger this module. |
| `detect_files` | `['gleam.toml']` | Which filenames should trigger this module. |
| `style` | `'bold #FFAFF3'` | The style for the module. |
| `disabled` | `false` | Disables the `gleam` module. |
### Variables
| Variable | مثال | الوصف |
| --------- | -------- | ------------------------------------ |
| version | `v1.0.0` | The version of `gleam` |
| 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
### مثال
```toml
# ~/.config/starship.toml
[gleam]
format = 'via [⭐ $version](bold red) '
```
## 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:
@ -2127,7 +2180,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
| `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. |
| `symbol` | `'⌘ '` | A format string representing the symbol of Haxe. |
| `style` | `'bold fg:202'` | The style for the module. |
| `disabled` | `false` | Disables the `haxe` module. |
@ -2431,7 +2484,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
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.
When the module is enabled it will always be active, unless any of `detect_env_vars`, `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 or one of the environmatal variable has been set.
:::
@ -2453,6 +2506,7 @@ The `context_aliases` and `user_aliases` options are deprecated. Use `contexts`
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `detect_env_vars` | `[]` | Which environmental variables should trigger this module |
| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Disables the `kubernetes` module. |
@ -2755,6 +2809,35 @@ truncation_length = 4
truncation_symbol = ''
```
## NATS
The `nats` module shows the name of the current [NATS](https://nats.io) context.
### Options
| Option | الافتراضي | الوصف |
| ---------- | -------------------------- | ------------------------------------------------------------ |
| `symbol` | `'✉️ '` | The symbol used before the NATS context (defaults to empty). |
| `style` | `'bold purple'` | The style for the module. |
| `format` | `'[$symbol$name]($style)'` | The format for the module. |
| `disabled` | `false` | Disables the `nats` module. |
### Variables
| Variable | مثال | الوصف |
| --------- | ----------- | ------------------------------------ |
| name | `localhost` | The name of the NATS context |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
### مثال
```toml
[nats]
format = '[$symbol]($style)'
style = 'bold purple'
```
## 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:
@ -2930,6 +3013,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
format = 'via [🐪 $version]($style) '
```
## Odin
The 'odin' module shows the currently installed version of [Odin](https://odin-lang.org/). By default the module will be shown if the current directory contains a `.odin` file.
### Options
| Option | الافتراضي | الوصف |
| ------------------- | ------------------------------------ | ----------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `show_commit` | `false` | Shows the commit as part of the version. |
| `symbol` | `'Ø '` | The symbol used before displaying the version of Zig. |
| `style` | `'bold bright-blue'` | The style for the module. |
| `disabled` | `false` | Disables the `odin` module. |
| `detect_extensions` | `['odin']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
### Variables
| Variable | مثال | الوصف |
| --------- | ------------- | ------------------------------------ |
| version | `dev-2024-03` | The version of `odin` |
| 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
### مثال
```toml
# ~/.config/starship.toml
[odin]
format = 'via [󰹩 ($version )]($style)'
show_commit = true
```
## 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.
@ -3031,7 +3151,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
```toml
# This is the default symbols table.
[os.symbols]
AIX = "➿ "
Alpaquita = "🔔 "
AlmaLinux = "💠 "
Alpine = "🏔️ "
Amazon = "🙂 "
Android = "🤖 "
@ -3048,6 +3170,7 @@ Garuda = "🦅 "
Gentoo = "🗜️ "
HardenedBSD = "🛡️ "
Illumos = "🐦 "
Kali = "🐉 "
Linux = "🐧 "
Mabox = "📦 "
Macos = "🍎 "
@ -3066,11 +3189,14 @@ Pop = "🍭 "
Raspbian = "🍓 "
Redhat = "🎩 "
RedHatEnterprise = "🎩 "
RockyLinux = "💠 "
Redox = "🧪 "
Solus = "⛵ "
SUSE = "🦎 "
Ubuntu = "🎯 "
Ultramarine = "🔷 "
Unknown = "❓ "
Void = " "
Windows = "🪟 "
```
@ -3315,17 +3441,19 @@ format = '[$symbol$stack]($style) '
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 `spago.yaml` file
- The current directory contains a `spago.lock` file
- The current directory contains a file with the `.purs` extension
### 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` | `'<=> '` | 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_files` | `['spago.dhall', 'spago.yaml', 'spago.lock']` | 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. |
@ -3355,7 +3483,7 @@ The `python` module shows the currently installed version of [Python](https://ww
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:
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
@ -3427,16 +3555,37 @@ python_binary = 'python3'
detect_extensions = []
```
```toml
# ~/.config/starship.toml
## Quarto
[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']
```
The `quarto` module shows the current installed version of Quarto used in a project.
By default, the module will be shown if any of the following conditions are met:
- The current directory contains a `_quarto.yml` file
- The current directory contains any `*.qmd` 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` | `'⨁ '` | A format string representing the symbol of Quarto |
| `style` | `'bold #75AADB'` | The style for the module. |
| `detect_extensions` | `['.qmd']` | Which extensions should trigger this module. |
| `detect_files` | `['_quarto.yml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `quarto` module. |
### Variables
| Variable | مثال | الوصف |
| --------- | --------- | ------------------------------------ |
| version | `1.4.549` | The version of `quarto` |
| 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
## R
@ -3584,10 +3733,11 @@ Starship gets the current Ruby version by running `ruby -v`.
### Variables
| Variable | مثال | الوصف |
| --------- | -------- | ------------------------------------ |
| --------- | -------- | ------------------------------------------- |
| version | `v2.5.1` | The version of `ruby` |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
| gemset | `test` | Optional, gets the current RVM gemset name. |
*: This variable can only be used as a part of a style string
@ -3770,7 +3920,7 @@ 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`.
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 preceding characters are provided by `shlvl`.
```toml
# ~/.config/starship.toml
@ -4156,12 +4306,12 @@ By default, the module will be shown if any of the following conditions are met:
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `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 |
| `symbol` | `'t '` | A format string representing the symbol of Typst |
| `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. |
| `disabled` | `false` | Disables the `typst` module. |
### Variables
@ -4182,6 +4332,7 @@ The `username` module shows active user's username. The module will be shown if
- 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
- The array `detect_env_vars` contains at least the name of one environment variable, that is set
::: tip
@ -4192,12 +4343,14 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
### Options
| Option | الافتراضي | الوصف |
| ------------- | ----------------------- | ------------------------------------------- |
| ----------------- | ----------------------- | --------------------------------------------------------- |
| `style_root` | `'bold red'` | The style used when the user is root/admin. |
| `style_user` | `'bold yellow'` | The style used for non-root users. |
| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
| `format` | `'[$user]($style) in '` | The format for the module. |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
| `aliases` | `{}` | Translate system usernames to something else |
### Variables
@ -4208,6 +4361,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
### مثال
#### Always show the hostname
```toml
# ~/.config/starship.toml
@ -4217,6 +4372,18 @@ style_root = 'black bold'
format = 'user: [$user]($style) '
disabled = false
show_always = true
aliases = { "corpuser034g" = "matchai" }
```
#### Hide the hostname in remote tmux sessions
```toml
# ~/.config/starship.toml
[hostname]
ssh_only = false
detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
disabled = false
```
## Vagrant
@ -4393,9 +4560,9 @@ The order in which custom modules are shown can be individually set by including
:::
::: warning Command output is printed unescaped to the prompt
::: warning If `unsafe_no_escape` is enabled or prior to starship v1.20 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.
Whatever output the command generates is printed unmodified in the prompt. This means if the output contains shell-specific interpretable sequences, they could be interpreted on display. Depending on the shell, this can mean that e.g. strings enclosed by backticks are executed by the shell. Such sequences are usually 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).
@ -4410,6 +4577,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt
| `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) |
| `الوصف` | `'<custom module>'` | The description of the module that is shown when running `starship explain`. |
| `unsafe_no_escape` | `false` | When set, command output is not escaped of characters that could be interpreted by the shell. |
| `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. |

View File

@ -58,7 +58,7 @@ 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.
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?
@ -72,7 +72,7 @@ You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs ca
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.
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that is to blame.
```sh
env STARSHIP_LOG=trace starship timings
@ -123,7 +123,7 @@ 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`.
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 directory 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.

View File

@ -431,9 +431,7 @@ If you're looking to further customize Starship:
Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website.
**Supporter Tier**
- [Appwrite](https://appwrite.io/)
- Free code signing provided by [SignPath.io](https://signpath.io), certificate by [SignPath Foundation](https://signpath.org)
<p align="center">
<br>

View File

@ -1,19 +1,19 @@
# التثبيت المتقدم
# Advanced Installation
To install starship, you need to do two things:
لثتبيت starship تحتاج للقيام بشيئين هما:
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
1. ثبت ملفات **starship** على جهازك
1. تنبيه موجه الأوامر بإن يقوم بجعل سطر الأوامر ل starship وذلك بتعديل كود الإبتداء
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
For most users, the instructions on [the main page](../guide/#🚀-installation) will work great. لكن، من أجل الاستخدام المتقدم، هناك حاجة لتوجيهات أخرى.
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!
هناك العديد من الحالات التي لا تلبي المعلومات في ملف README.md احتياجها ولذلك هذه بعض إرشادات التثبيت الإضافية مقدمة من مجتمع starship. إذا كانت لديك ملاحظة وقمت بحلها ولم تجد هذا الحل لها ضمن الحلول التالية، الرجاء أضفها هنا!
## [Chocolatey](https://chocolatey.org)
### المتطلبات الأساسية
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
إذهب إلى [ صفحة تثبيت Chocolatey ](https://chocolatey.org/install) و اتبع الإرشادات لتثبيت البرنامج.
### التثبيت
@ -39,25 +39,25 @@ curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /data/data/com.term
### التثبيت
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:
يمكن تثبيت starship في Funtoo linux باستخدام [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)
## [Nix](https://wiki.nixos.org/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)
#### بشكل تصريحي، من أجل مستخدم واحد، عبر [home-manager](https://github.com/nix-community/home-manager)
Enable the `programs.starship` module in your `home.nix` file, and add your settings
مكن كود`programs.starship` في ملف`home.nix` و أضف إلى الإعدادات الإعدادات التالية
```nix
{
@ -78,15 +78,15 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett
}
```
then run
ثم بعد ذلك شغل
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
#### بشكل تصريحي، لعدة مستخدمين
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
أضف `pkgs.starship` إلى `environment.systemPackages` في `configuration.nix`, بعد ذلك شغل
```sh
sudo nixos-rebuild switch

View File

@ -1,10 +1,10 @@
# Migrating to v0.45.0
# الإنتقال إلى النسخة 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.
النسخة 0.45.0 سوف تستمر في تقديم تحديثات جذرية حتى الوصول للنسخة المستقرة 1.0.0. لقد قمنا بتغييرات رئيسية لكيفية إعداد سطر الأوامر، وذلك يسمح بطيف أكبر من قابلية التخصيص.
This guide is intended to walk you through the breaking changes.
هذا الدليل هو جولة خلال التغييرات الرئيسية التي قمنا بها.
## `prompt_order` has been replaced by a root-level `format`
## `prompt_order`تم استبداله بتنسيق root-level ``
Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship.

View File

@ -69,3 +69,9 @@ This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/t
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)
## [Jetpack](./jetpack.md)
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.
[![Screenshot of Jetpack preset](/presets/img/jetpack.png "Click to view Jetpack preset")](./jetpack)

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#bracketed-segments)
[Return to Presets](./#bracketed-segments)
# Bracketed Segments Preset
@ -14,4 +14,4 @@ starship preset bracketed-segments -o ~/.config/starship.toml
[Click to download TOML](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml
<<< @/public/presets/toml/bracketed-segments.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#gruvbox-rainbow)
[Return to Presets](./#gruvbox-rainbow)
# Gruvbox Rainbow Preset
@ -18,4 +18,4 @@ starship preset gruvbox-rainbow -o ~/.config/starship.toml
[Click to download TOML](/presets/toml/gruvbox-rainbow.toml)
<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
<<< @/public/presets/toml/gruvbox-rainbow.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#jetpack)
[Return to Presets](./#jetpack)
# Jetpack Preset
@ -21,4 +21,4 @@ starship preset jetpack -o ~/.config/starship.toml
[Click to download TOML](/presets/toml/jetpack.toml)
<<< @/.vuepress/public/presets/toml/jetpack.toml
<<< @/public/presets/toml/jetpack.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#nerd-font-symbols)
[Return to Presets](./#nerd-font-symbols)
# Nerd Font Symbols Preset
@ -18,4 +18,4 @@ 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
<<< @/public/presets/toml/nerd-font-symbols.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#no-empty-icons)
[Return to Presets](./#no-empty-icons)
# No Empty Icons Preset
@ -14,4 +14,4 @@ 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
<<< @/public/presets/toml/no-empty-icons.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#no-nerd-fonts)
[Return to Presets](./#no-nerd-fonts)
# No Nerd Fonts Preset
@ -16,4 +16,4 @@ 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
<<< @/public/presets/toml/no-nerd-font.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#no-runtime-versions)
[Return to Presets](./#no-runtime-versions)
# No Runtime Versions Preset
@ -14,4 +14,4 @@ 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
<<< @/public/presets/toml/no-runtime-versions.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#pastel-powerline)
[Return to Presets](./#pastel-powerline)
# Pastel Powerline Preset
@ -18,4 +18,4 @@ starship preset pastel-powerline -o ~/.config/starship.toml
[Click to download TOML](/presets/toml/pastel-powerline.toml)
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml
<<< @/public/presets/toml/pastel-powerline.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#plain-text-symbols)
[Return to Presets](./#plain-text-symbols)
## Plain Text Symbols Preset
@ -14,4 +14,4 @@ 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
<<< @/public/presets/toml/plain-text-symbols.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#pure)
[Return to Presets](./#pure)
# Pure Preset
@ -14,4 +14,4 @@ starship preset pure-preset -o ~/.config/starship.toml
[Click to download TOML](/presets/toml/pure-preset.toml)
<<< @/.vuepress/public/presets/toml/pure-preset.toml
<<< @/public/presets/toml/pure-preset.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#pastel-powerline)
[Return to Presets](./#pastel-powerline)
# Tokyo Night Preset
@ -18,4 +18,4 @@ starship preset tokyo-night -o ~/.config/starship.toml
[Click to download TOML](/presets/toml/tokyo-night.toml)
<<< @/.vuepress/public/presets/toml/tokyo-night.toml
<<< @/public/presets/toml/tokyo-night.toml

View File

@ -1,10 +1,14 @@
---
home: true
heroImage: /logo.svg
heroText:
tagline: আপনার টার্মিনাল এর জন্য একটি সহজ, প্রচণ্ড দ্রুত এবং অশেষভাবে কাস্টমাইজ করার মতো সুবিধাসম্পন্ন একটি প্রম্প্ট!
actionText: Get Started →
actionLink: ./guide/
layout: home
hero:
image: /logo.svg
text:
tagline: আপনার টার্মিনাল এর জন্য একটি সহজ, প্রচণ্ড দ্রুত এবং অশেষভাবে কাস্টমাইজ করার মতো সুবিধাসম্পন্ন একটি প্রম্প্ট!
actions:
-
theme: brand
text: Get Started →
link: ./guide/
features:
-
title: Compatibility First
@ -21,12 +25,24 @@ 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.
---
<div class="center">
<video class="demo-video" muted autoplay loop playsinline>
<script setup>
import { onMounted } from 'vue'
onMounted(() => {
const urlParams = new URLSearchParams(window.location.search)
if (urlParams.has('uwu') || urlParams.has('kawaii')) {
const img = document.querySelector('.VPHero .VPImage.image-src')
img.classList.add('uwu')
img.src = '/logo-uwu.png'
img.alt = 'Kawaii Starship Logo by @sawaratsuki1004'
}
})
</script>
<video class="demo-video" muted autoplay loop playsinline>
<source src="/demo.webm" type="video/webm">
<source src="/demo.mp4" type="video/mp4">
</video>
</div>
</video>
### পূর্বশর্ত
@ -55,6 +71,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
```sh
brew install starship
```
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
@ -154,6 +171,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
:::
আপনার Nushell env ফাইলের (Nushell এ `$nu.env-path` কমান্ডটি রান করে ফাইলটি খুঁজে বের করুন) শেষে নিম্নলিখিত লাইনগুলি যোগ করুন:
```sh
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu

View File

@ -80,6 +80,26 @@ starship init fish | source
enable_transience
```
## TransientPrompt and TransientRightPrompt in Bash
The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework at v0.4 or higher allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=<value>`:
The \<value\> here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and the option `prompt_ps1_transient` has a non-empty \<value\>, the prompt specified by `PS1` is erased on leaving the current command line. If \<value\> contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in \<value\> and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored.
Make the following changes to your `~/.blerc` (or in `~/.config/blesh/init.sh`) to customize what gets displayed on the left and on the right:
- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do
```bash
bleopt prompt_ps1_final='$(starship module character)'
```
- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do
```bash
bleopt prompt_rps1_final='$(starship module time)'
```
## 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:
@ -203,9 +223,11 @@ Invoke-Expression (&starship init powershell)
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).
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.
`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash.
Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework v0.4 or higher should be installed in order to use right prompt in bash.
### Example
@ -244,7 +266,7 @@ Note: Continuation prompts are only available in the following shells:
```toml
# ~/.config/starship.toml
# A continuation prompt that displays two filled in arrows
# A continuation prompt that displays two filled-in arrows
continuation_prompt = '▶▶ '
```
@ -265,7 +287,7 @@ Style strings are a list of words, separated by whitespace. The words are not ca
- `<color>`
- `none`
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` 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.
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `<color>` can also be set to `prev_fg` or `prev_bg` which evaluates to the previous item's foreground or background color respectively if available or `none` otherwise. `inverted` 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.
@ -279,6 +301,6 @@ If multiple colors are specified for foreground/background, the last one in the
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
- 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
- `strikethrough` is not supported by the default macOS Terminal.app.

View File

@ -158,7 +158,7 @@ For example:
#### 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/).
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
@ -198,14 +198,14 @@ 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) |
| `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. |
| `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
@ -281,6 +281,7 @@ $elixir\
$elm\
$erlang\
$fennel\
$gleam\
$golang\
$guix_shell\
$haskell\
@ -300,6 +301,7 @@ $php\
$pulumi\
$purescript\
$python\
$quarto\
$raku\
$rlang\
$red\
@ -323,6 +325,7 @@ $aws\
$gcloud\
$openstack\
$azure\
$nats\
$direnv\
$env_var\
$crystal\
@ -543,7 +546,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
```
@ -600,7 +603,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. |
| `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. |
@ -617,7 +620,9 @@ The `bun` module shows the currently installed version of the [bun](https://bun.
*: This variable can only be used as a part of a style string
### Example
### Examples
#### Customize the format
```toml
# ~/.config/starship.toml
@ -626,6 +631,15 @@ The `bun` module shows the currently installed version of the [bun](https://bun.
format = 'via [🍔 $version](bold green) '
```
#### Replace Node.js
You can override the `detect_files` property of [the nodejs module](#nodejs) in your config so as to only show the bun runtime:
```
[nodejs]
detect_files = ['package.json', '.node-version', '!bunfig.toml', '!bun.lockb']
```
## 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.
@ -1165,6 +1179,7 @@ The `direnv` module shows the status of the current rc file if one is present. T
| `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. |
@ -1887,7 +1902,7 @@ The following variables can be used in `format`:
| Variable | Description |
| -------------- | ------------------------------------------------------------------------------------------------------------- |
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$typechanged$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. |
@ -1953,6 +1968,44 @@ Use Windows Starship executable on Windows paths in WSL
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
```
## Gleam
The `gleam` module shows the currently installed version of [Gleam](https://gleam.run/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `gleam.toml` file
- The current directory contains a file with the `.gleam` 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 Gleam. |
| `detect_extensions` | `['gleam']` | Which extensions should trigger this module. |
| `detect_files` | `['gleam.toml']` | Which filenames should trigger this module. |
| `style` | `'bold #FFAFF3'` | The style for the module. |
| `disabled` | `false` | Disables the `gleam` module. |
### Variables
| Variable | Example | Description |
| --------- | -------- | ------------------------------------ |
| version | `v1.0.0` | The version of `gleam` |
| 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
[gleam]
format = 'via [⭐ $version](bold red) '
```
## 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:
@ -2127,7 +2180,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
| `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. |
| `symbol` | `'⌘ '` | A format string representing the symbol of Haxe. |
| `style` | `'bold fg:202'` | The style for the module. |
| `disabled` | `false` | Disables the `haxe` module. |
@ -2431,7 +2484,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
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.
When the module is enabled it will always be active, unless any of `detect_env_vars`, `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 or one of the environmatal variable has been set.
:::
@ -2453,6 +2506,7 @@ The `context_aliases` and `user_aliases` options are deprecated. Use `contexts`
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `detect_env_vars` | `[]` | Which environmental variables should trigger this module |
| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Disables the `kubernetes` module. |
@ -2755,6 +2809,35 @@ truncation_length = 4
truncation_symbol = ''
```
## NATS
The `nats` module shows the name of the current [NATS](https://nats.io) context.
### Options
| Option | Default | Description |
| ---------- | -------------------------- | ------------------------------------------------------------ |
| `symbol` | `'✉️ '` | The symbol used before the NATS context (defaults to empty). |
| `style` | `'bold purple'` | The style for the module. |
| `format` | `'[$symbol$name]($style)'` | The format for the module. |
| `disabled` | `false` | Disables the `nats` module. |
### Variables
| Variable | Example | Description |
| --------- | ----------- | ------------------------------------ |
| name | `localhost` | The name of the NATS context |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
### Example
```toml
[nats]
format = '[$symbol]($style)'
style = 'bold purple'
```
## 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:
@ -2930,6 +3013,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
format = 'via [🐪 $version]($style) '
```
## Odin
The 'odin' module shows the currently installed version of [Odin](https://odin-lang.org/). By default the module will be shown if the current directory contains a `.odin` file.
### Options
| Option | Default | Description |
| ------------------- | ------------------------------------ | ----------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `show_commit` | `false` | Shows the commit as part of the version. |
| `symbol` | `'Ø '` | The symbol used before displaying the version of Zig. |
| `style` | `'bold bright-blue'` | The style for the module. |
| `disabled` | `false` | Disables the `odin` module. |
| `detect_extensions` | `['odin']` | 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 | `dev-2024-03` | The version of `odin` |
| 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
[odin]
format = 'via [󰹩 ($version )]($style)'
show_commit = true
```
## 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.
@ -3031,7 +3151,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
```toml
# This is the default symbols table.
[os.symbols]
AIX = "➿ "
Alpaquita = "🔔 "
AlmaLinux = "💠 "
Alpine = "🏔️ "
Amazon = "🙂 "
Android = "🤖 "
@ -3048,6 +3170,7 @@ Garuda = "🦅 "
Gentoo = "🗜️ "
HardenedBSD = "🛡️ "
Illumos = "🐦 "
Kali = "🐉 "
Linux = "🐧 "
Mabox = "📦 "
Macos = "🍎 "
@ -3066,11 +3189,14 @@ Pop = "🍭 "
Raspbian = "🍓 "
Redhat = "🎩 "
RedHatEnterprise = "🎩 "
RockyLinux = "💠 "
Redox = "🧪 "
Solus = "⛵ "
SUSE = "🦎 "
Ubuntu = "🎯 "
Ultramarine = "🔷 "
Unknown = "❓ "
Void = " "
Windows = "🪟 "
```
@ -3315,17 +3441,19 @@ format = '[$symbol$stack]($style) '
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 `spago.yaml` file
- The current directory contains a `spago.lock` 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_files` | `['spago.dhall', 'spago.yaml', 'spago.lock']` | 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. |
@ -3355,7 +3483,7 @@ The `python` module shows the currently installed version of [Python](https://ww
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:
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
@ -3427,16 +3555,37 @@ python_binary = 'python3'
detect_extensions = []
```
```toml
# ~/.config/starship.toml
## Quarto
[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']
```
The `quarto` module shows the current installed version of Quarto used in a project.
By default, the module will be shown if any of the following conditions are met:
- The current directory contains a `_quarto.yml` file
- The current directory contains any `*.qmd` 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 Quarto |
| `style` | `'bold #75AADB'` | The style for the module. |
| `detect_extensions` | `['.qmd']` | Which extensions should trigger this module. |
| `detect_files` | `['_quarto.yml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `quarto` module. |
### Variables
| Variable | Example | Description |
| --------- | --------- | ------------------------------------ |
| version | `1.4.549` | The version of `quarto` |
| 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
## R
@ -3584,10 +3733,11 @@ Starship gets the current Ruby version by running `ruby -v`.
### 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` |
| gemset | `test` | Optional, gets the current RVM gemset name. |
*: This variable can only be used as a part of a style string
@ -3770,7 +3920,7 @@ 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`.
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 preceding characters are provided by `shlvl`.
```toml
# ~/.config/starship.toml
@ -4156,12 +4306,12 @@ By default, the module will be shown if any of the following conditions are met:
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `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 |
| `symbol` | `'t '` | A format string representing the symbol of Typst |
| `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. |
| `disabled` | `false` | Disables the `typst` module. |
### Variables
@ -4182,6 +4332,7 @@ The `username` module shows active user's username. The module will be shown if
- 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
- The array `detect_env_vars` contains at least the name of one environment variable, that is set
::: tip
@ -4192,12 +4343,14 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
### 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. |
| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
| `format` | `'[$user]($style) in '` | The format for the module. |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
| `aliases` | `{}` | Translate system usernames to something else |
### Variables
@ -4208,6 +4361,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
### Example
#### Always show the hostname
```toml
# ~/.config/starship.toml
@ -4217,6 +4372,18 @@ style_root = 'black bold'
format = 'user: [$user]($style) '
disabled = false
show_always = true
aliases = { "corpuser034g" = "matchai" }
```
#### Hide the hostname in remote tmux sessions
```toml
# ~/.config/starship.toml
[hostname]
ssh_only = false
detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
disabled = false
```
## Vagrant
@ -4393,9 +4560,9 @@ The order in which custom modules are shown can be individually set by including
:::
::: warning Command output is printed unescaped to the prompt
::: warning If `unsafe_no_escape` is enabled or prior to starship v1.20 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.
Whatever output the command generates is printed unmodified in the prompt. This means if the output contains shell-specific interpretable sequences, they could be interpreted on display. Depending on the shell, this can mean that e.g. strings enclosed by backticks are executed by the shell. Such sequences are usually 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).
@ -4410,6 +4577,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt
| `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` | `'<custom module>'` | The description of the module that is shown when running `starship explain`. |
| `unsafe_no_escape` | `false` | When set, command output is not escaped of characters that could be interpreted by the shell. |
| `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. |

View File

@ -58,7 +58,7 @@ 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.
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?
@ -72,7 +72,7 @@ You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs ca
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.
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that is to blame.
```sh
env STARSHIP_LOG=trace starship timings
@ -123,7 +123,7 @@ 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`.
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 directory 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.

View File

@ -431,9 +431,7 @@ eval "$(starship init zsh)"
[একজন স্পনসর হয়ে](https://github.com/sponsors/starship) এই প্রোজেক্টটিকে আর্থিক ভাবে সহায়তা করুন । আপনার নাম অথবা লোগো নিম্নে দেখা যাবে আপনার ওয়েবসাইট এর লিঙ্ক সহ ।
**সমর্থক স্তর**
- [Appwrite](https://appwrite.io/)
- Free code signing provided by [SignPath.io](https://signpath.io), certificate by [SignPath Foundation](https://signpath.org)
<p align="center">
<br>

View File

@ -5,7 +5,7 @@ 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.
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!
@ -45,7 +45,7 @@ On Funtoo Linux, starship can be installed from [core-kit](https://github.com/fu
emerge app-shells/starship
```
## [Nix](https://nixos.wiki/wiki/Nix)
## [Nix](https://wiki.nixos.org/wiki/Nix)
### Getting the Binary

View File

@ -69,3 +69,9 @@ This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/t
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)
## [Jetpack](./jetpack.md)
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.
[![Screenshot of Jetpack preset](/presets/img/jetpack.png "Click to view Jetpack preset")](./jetpack)

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#bracketed-segments)
[Return to Presets](./#bracketed-segments)
# Bracketed Segments Preset
@ -14,4 +14,4 @@ starship preset bracketed-segments -o ~/.config/starship.toml
[Click to download TOML](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml
<<< @/public/presets/toml/bracketed-segments.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#gruvbox-rainbow)
[Return to Presets](./#gruvbox-rainbow)
# Gruvbox Rainbow Preset
@ -18,4 +18,4 @@ starship preset gruvbox-rainbow -o ~/.config/starship.toml
[Click to download TOML](/presets/toml/gruvbox-rainbow.toml)
<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
<<< @/public/presets/toml/gruvbox-rainbow.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#jetpack)
[Return to Presets](./#jetpack)
# Jetpack Preset
@ -21,4 +21,4 @@ starship preset jetpack -o ~/.config/starship.toml
[Click to download TOML](/presets/toml/jetpack.toml)
<<< @/.vuepress/public/presets/toml/jetpack.toml
<<< @/public/presets/toml/jetpack.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#nerd-font-symbols)
[Return to Presets](./#nerd-font-symbols)
# Nerd Font Symbols Preset
@ -18,4 +18,4 @@ 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
<<< @/public/presets/toml/nerd-font-symbols.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#no-empty-icons)
[Return to Presets](./#no-empty-icons)
# No Empty Icons Preset
@ -14,4 +14,4 @@ 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
<<< @/public/presets/toml/no-empty-icons.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#no-nerd-fonts)
[Return to Presets](./#no-nerd-fonts)
# No Nerd Fonts Preset
@ -16,4 +16,4 @@ 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
<<< @/public/presets/toml/no-nerd-font.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#no-runtime-versions)
[Return to Presets](./#no-runtime-versions)
# No Runtime Versions Preset
@ -14,4 +14,4 @@ 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
<<< @/public/presets/toml/no-runtime-versions.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#pastel-powerline)
[Return to Presets](./#pastel-powerline)
# Pastel Powerline Preset
@ -18,4 +18,4 @@ starship preset pastel-powerline -o ~/.config/starship.toml
[Click to download TOML](/presets/toml/pastel-powerline.toml)
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml
<<< @/public/presets/toml/pastel-powerline.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#plain-text-symbols)
[Return to Presets](./#plain-text-symbols)
## Plain Text Symbols Preset
@ -14,4 +14,4 @@ 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
<<< @/public/presets/toml/plain-text-symbols.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#pure)
[Return to Presets](./#pure)
# Pure Preset
@ -14,4 +14,4 @@ starship preset pure-preset -o ~/.config/starship.toml
[Click to download TOML](/presets/toml/pure-preset.toml)
<<< @/.vuepress/public/presets/toml/pure-preset.toml
<<< @/public/presets/toml/pure-preset.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#pastel-powerline)
[Return to Presets](./#pastel-powerline)
# Tokyo Night Preset
@ -18,4 +18,4 @@ starship preset tokyo-night -o ~/.config/starship.toml
[Click to download TOML](/presets/toml/tokyo-night.toml)
<<< @/.vuepress/public/presets/toml/tokyo-night.toml
<<< @/public/presets/toml/tokyo-night.toml

View File

@ -1,10 +1,14 @@
---
home: true
heroImage: /logo.svg
heroText:
tagline: promptـێکی سوکەڵە، خێرا، و بێسنور دڵخوازکراو بۆ هەر شێڵێک!
actionText: دەستپێبکە ←
actionLink: ./guide/
layout: home
hero:
image: /logo.svg
text:
tagline: promptـێکی سوکەڵە، خێرا، و بێسنور دڵخوازکراو بۆ هەر شێڵێک!
actions:
-
theme: brand
text: دەستپێبکە ←
link: ./guide/
features:
-
title: سەرەتا گونجان
@ -21,12 +25,24 @@ metaTitle: "Starship: یەکێ لە Promptـە شێڵ نەناسەکان"
description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و بێسنور دڵخوازکراوەکان بۆ هەر شێڵێک! ئەو زانیارییانە پشان دەدات کە پێویستە، لەوکاتەیا بە ئارامی و سوکەڵەیی ئەمێنێتەوە. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell.'
---
<div class="center">
<video class="demo-video" muted autoplay loop playsinline>
<script setup>
import { onMounted } from 'vue'
onMounted(() => {
const urlParams = new URLSearchParams(window.location.search)
if (urlParams.has('uwu') || urlParams.has('kawaii')) {
const img = document.querySelector('.VPHero .VPImage.image-src')
img.classList.add('uwu')
img.src = '/logo-uwu.png'
img.alt = 'Kawaii Starship Logo by @sawaratsuki1004'
}
})
</script>
<video class="demo-video" muted autoplay loop playsinline>
<source src="/demo.webm" type="video/webm">
<source src="/demo.mp4" type="video/mp4">
</video>
</div>
</video>
### پێشمەرجەکان
@ -55,6 +71,7 @@ description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و ب
```sh
brew install starship
```
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
@ -154,6 +171,7 @@ description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و ب
:::
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
```sh
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu

View File

@ -80,6 +80,26 @@ starship init fish | source
enable_transience
```
## TransientPrompt and TransientRightPrompt in Bash
The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework at v0.4 or higher allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=<value>`:
The \<value\> here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and the option `prompt_ps1_transient` has a non-empty \<value\>, the prompt specified by `PS1` is erased on leaving the current command line. If \<value\> contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in \<value\> and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored.
Make the following changes to your `~/.blerc` (or in `~/.config/blesh/init.sh`) to customize what gets displayed on the left and on the right:
- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do
```bash
bleopt prompt_ps1_final='$(starship module character)'
```
- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do
```bash
bleopt prompt_rps1_final='$(starship module time)'
```
## 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:
@ -203,9 +223,11 @@ Invoke-Expression (&starship init powershell)
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).
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.
`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash.
Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework v0.4 or higher should be installed in order to use right prompt in bash.
### نموونە
@ -244,7 +266,7 @@ Note: Continuation prompts are only available in the following shells:
```toml
# ~/.config/starship.toml
# A continuation prompt that displays two filled in arrows
# A continuation prompt that displays two filled-in arrows
continuation_prompt = '▶▶ '
```
@ -265,7 +287,7 @@ Style strings are a list of words, separated by whitespace. The words are not ca
- `<color>`
- `هیچ`
کە `<color>` دیاریکەری ڕەنگێکە (لە ژێرەوە باسکراوە). `fg:<color>` و `<color>` لە ئێستادا هەمان شت ئەکەن، بەڵام ئەمە ڕەنگە لە داهاتووا بگۆڕێت. `inverted` ڕەنگی پاشبنەما و پێشبنەما ئەگۆڕێتەوە. ڕیزبەندی ووشەکان لە زنجیرەکەدا گرنگ نییە.
کە `<color>` دیاریکەری ڕەنگێکە (لە ژێرەوە باسکراوە). `fg:<color>` و `<color>` لە ئێستادا هەمان شت ئەکەن، بەڵام ئەمە ڕەنگە لە داهاتووا بگۆڕێت. `<color>` can also be set to `prev_fg` or `prev_bg` which evaluates to the previous item's foreground or background color respectively if available or `none` otherwise. `inverted` ڕەنگی پاشبنەما و پێشبنەما ئەگۆڕێتەوە. ڕیزبەندی ووشەکان لە زنجیرەکەدا گرنگ نییە.
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.
@ -279,6 +301,6 @@ If multiple colors are specified for foreground/background, the last one in the
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
- 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
- `strikethrough` is not supported by the default macOS Terminal.app.

View File

@ -158,7 +158,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri
#### 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/).
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
@ -198,14 +198,14 @@ 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) |
| `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. |
| `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
@ -281,6 +281,7 @@ $elixir\
$elm\
$erlang\
$fennel\
$gleam\
$golang\
$guix_shell\
$haskell\
@ -300,6 +301,7 @@ $php\
$pulumi\
$purescript\
$python\
$quarto\
$raku\
$rlang\
$red\
@ -323,6 +325,7 @@ $aws\
$gcloud\
$openstack\
$azure\
$nats\
$direnv\
$env_var\
$crystal\
@ -543,7 +546,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
```
@ -600,7 +603,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. |
| `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. |
@ -617,7 +620,9 @@ The `bun` module shows the currently installed version of the [bun](https://bun.
*: This variable can only be used as a part of a style string
### نموونە
### Examples
#### Customize the format
```toml
# ~/.config/starship.toml
@ -626,6 +631,15 @@ The `bun` module shows the currently installed version of the [bun](https://bun.
format = 'via [🍔 $version](bold green) '
```
#### Replace Node.js
You can override the `detect_files` property of [the nodejs module](#nodejs) in your config so as to only show the bun runtime:
```
[nodejs]
detect_files = ['package.json', '.node-version', '!bunfig.toml', '!bun.lockb']
```
## 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.
@ -1165,6 +1179,7 @@ The `direnv` module shows the status of the current rc file if one is present. T
| `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. |
@ -1887,7 +1902,7 @@ The following variables can be used in `format`:
| گۆڕاو | Description |
| -------------- | ------------------------------------------------------------------------------------------------------------- |
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$typechanged$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. |
@ -1953,6 +1968,44 @@ Use Windows Starship executable on Windows paths in WSL
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
```
## Gleam
The `gleam` module shows the currently installed version of [Gleam](https://gleam.run/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `gleam.toml` file
- The current directory contains a file with the `.gleam` 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 Gleam. |
| `detect_extensions` | `['gleam']` | Which extensions should trigger this module. |
| `detect_files` | `['gleam.toml']` | Which filenames should trigger this module. |
| `style` | `'bold #FFAFF3'` | The style for the module. |
| `disabled` | `false` | Disables the `gleam` module. |
### Variables
| گۆڕاو | نموونە | Description |
| --------- | -------- | ------------------------------------ |
| version | `v1.0.0` | The version of `gleam` |
| 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
### نموونە
```toml
# ~/.config/starship.toml
[gleam]
format = 'via [⭐ $version](bold red) '
```
## 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:
@ -2127,7 +2180,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
| `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. |
| `symbol` | `'⌘ '` | A format string representing the symbol of Haxe. |
| `style` | `'bold fg:202'` | The style for the module. |
| `disabled` | `false` | Disables the `haxe` module. |
@ -2431,7 +2484,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
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.
When the module is enabled it will always be active, unless any of `detect_env_vars`, `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 or one of the environmatal variable has been set.
:::
@ -2453,6 +2506,7 @@ The `context_aliases` and `user_aliases` options are deprecated. Use `contexts`
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `detect_env_vars` | `[]` | Which environmental variables should trigger this module |
| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Disables the `kubernetes` module. |
@ -2755,6 +2809,35 @@ truncation_length = 4
truncation_symbol = ''
```
## NATS
The `nats` module shows the name of the current [NATS](https://nats.io) context.
### Options
| Option | Default | Description |
| ---------- | -------------------------- | ------------------------------------------------------------ |
| `symbol` | `'✉️ '` | The symbol used before the NATS context (defaults to empty). |
| `style` | `'bold purple'` | The style for the module. |
| `format` | `'[$symbol$name]($style)'` | The format for the module. |
| `disabled` | `false` | Disables the `nats` module. |
### Variables
| گۆڕاو | نموونە | Description |
| --------- | ----------- | ------------------------------------ |
| name | `localhost` | The name of the NATS context |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
### نموونە
```toml
[nats]
format = '[$symbol]($style)'
style = 'bold purple'
```
## 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:
@ -2930,6 +3013,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
format = 'via [🐪 $version]($style) '
```
## Odin
The 'odin' module shows the currently installed version of [Odin](https://odin-lang.org/). By default the module will be shown if the current directory contains a `.odin` file.
### Options
| Option | Default | Description |
| ------------------- | ------------------------------------ | ----------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `show_commit` | `false` | Shows the commit as part of the version. |
| `symbol` | `'Ø '` | The symbol used before displaying the version of Zig. |
| `style` | `'bold bright-blue'` | The style for the module. |
| `disabled` | `false` | Disables the `odin` module. |
| `detect_extensions` | `['odin']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
### Variables
| گۆڕاو | نموونە | Description |
| --------- | ------------- | ------------------------------------ |
| version | `dev-2024-03` | The version of `odin` |
| 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
### نموونە
```toml
# ~/.config/starship.toml
[odin]
format = 'via [󰹩 ($version )]($style)'
show_commit = true
```
## 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.
@ -3031,7 +3151,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
```toml
# This is the default symbols table.
[os.symbols]
AIX = "➿ "
Alpaquita = "🔔 "
AlmaLinux = "💠 "
Alpine = "🏔️ "
Amazon = "🙂 "
Android = "🤖 "
@ -3048,6 +3170,7 @@ Garuda = "🦅 "
Gentoo = "🗜️ "
HardenedBSD = "🛡️ "
Illumos = "🐦 "
Kali = "🐉 "
Linux = "🐧 "
Mabox = "📦 "
Macos = "🍎 "
@ -3066,11 +3189,14 @@ Pop = "🍭 "
Raspbian = "🍓 "
Redhat = "🎩 "
RedHatEnterprise = "🎩 "
RockyLinux = "💠 "
Redox = "🧪 "
Solus = "⛵ "
SUSE = "🦎 "
Ubuntu = "🎯 "
Ultramarine = "🔷 "
Unknown = "❓ "
Void = " "
Windows = "🪟 "
```
@ -3315,17 +3441,19 @@ format = '[$symbol$stack]($style) '
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 `spago.yaml` file
- The current directory contains a `spago.lock` 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_files` | `['spago.dhall', 'spago.yaml', 'spago.lock']` | 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. |
@ -3355,7 +3483,7 @@ The `python` module shows the currently installed version of [Python](https://ww
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:
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
@ -3427,16 +3555,37 @@ python_binary = 'python3'
detect_extensions = []
```
```toml
# ~/.config/starship.toml
## Quarto
[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']
```
The `quarto` module shows the current installed version of Quarto used in a project.
By default, the module will be shown if any of the following conditions are met:
- The current directory contains a `_quarto.yml` file
- The current directory contains any `*.qmd` 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 Quarto |
| `style` | `'bold #75AADB'` | The style for the module. |
| `detect_extensions` | `['.qmd']` | Which extensions should trigger this module. |
| `detect_files` | `['_quarto.yml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `quarto` module. |
### Variables
| گۆڕاو | نموونە | Description |
| --------- | --------- | ------------------------------------ |
| version | `1.4.549` | The version of `quarto` |
| 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
## R
@ -3584,10 +3733,11 @@ Starship gets the current Ruby version by running `ruby -v`.
### Variables
| گۆڕاو | نموونە | Description |
| --------- | -------- | ------------------------------------ |
| --------- | -------- | ------------------------------------------- |
| version | `v2.5.1` | The version of `ruby` |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
| gemset | `test` | Optional, gets the current RVM gemset name. |
*: This variable can only be used as a part of a style string
@ -3770,7 +3920,7 @@ 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`.
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 preceding characters are provided by `shlvl`.
```toml
# ~/.config/starship.toml
@ -4156,12 +4306,12 @@ By default, the module will be shown if any of the following conditions are met:
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `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 |
| `symbol` | `'t '` | A format string representing the symbol of Typst |
| `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. |
| `disabled` | `false` | Disables the `typst` module. |
### Variables
@ -4182,6 +4332,7 @@ The `username` module shows active user's username. The module will be shown if
- 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
- The array `detect_env_vars` contains at least the name of one environment variable, that is set
::: tip
@ -4192,12 +4343,14 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
### 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. |
| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
| `format` | `'[$user]($style) in '` | The format for the module. |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
| `aliases` | `{}` | Translate system usernames to something else |
### Variables
@ -4208,6 +4361,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
### نموونە
#### Always show the hostname
```toml
# ~/.config/starship.toml
@ -4217,6 +4372,18 @@ style_root = 'black bold'
format = 'user: [$user]($style) '
disabled = false
show_always = true
aliases = { "corpuser034g" = "matchai" }
```
#### Hide the hostname in remote tmux sessions
```toml
# ~/.config/starship.toml
[hostname]
ssh_only = false
detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
disabled = false
```
## Vagrant
@ -4393,9 +4560,9 @@ The order in which custom modules are shown can be individually set by including
:::
::: warning Command output is printed unescaped to the prompt
::: warning If `unsafe_no_escape` is enabled or prior to starship v1.20 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.
Whatever output the command generates is printed unmodified in the prompt. This means if the output contains shell-specific interpretable sequences, they could be interpreted on display. Depending on the shell, this can mean that e.g. strings enclosed by backticks are executed by the shell. Such sequences are usually 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).
@ -4410,6 +4577,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt
| `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` | `'<custom module>'` | The description of the module that is shown when running `starship explain`. |
| `unsafe_no_escape` | `false` | When set, command output is not escaped of characters that could be interpreted by the shell. |
| `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. |

View File

@ -58,7 +58,7 @@ 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.
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?
@ -72,7 +72,7 @@ You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs ca
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.
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that is to blame.
```sh
env STARSHIP_LOG=trace starship timings
@ -123,7 +123,7 @@ 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`.
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 directory 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.

View File

@ -427,9 +427,7 @@ If you're looking to further customize Starship:
Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website.
**Supporter Tier**
- [Appwrite](https://appwrite.io/)
- Free code signing provided by [SignPath.io](https://signpath.io), certificate by [SignPath Foundation](https://signpath.org)
<p align="center">
<br>

View File

@ -5,7 +5,7 @@ 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.
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!
@ -45,7 +45,7 @@ On Funtoo Linux, starship can be installed from [core-kit](https://github.com/fu
emerge app-shells/starship
```
## [Nix](https://nixos.wiki/wiki/Nix)
## [Nix](https://wiki.nixos.org/wiki/Nix)
### Getting the Binary

View File

@ -69,3 +69,9 @@ This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/t
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)
## [Jetpack](./jetpack.md)
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.
[![Screenshot of Jetpack preset](/presets/img/jetpack.png "Click to view Jetpack preset")](./jetpack)

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#bracketed-segments)
[Return to Presets](./#bracketed-segments)
# Bracketed Segments Preset
@ -14,4 +14,4 @@ starship preset bracketed-segments -o ~/.config/starship.toml
[Click to download TOML](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml
<<< @/public/presets/toml/bracketed-segments.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#gruvbox-rainbow)
[Return to Presets](./#gruvbox-rainbow)
# Gruvbox Rainbow Preset
@ -18,4 +18,4 @@ starship preset gruvbox-rainbow -o ~/.config/starship.toml
[Click to download TOML](/presets/toml/gruvbox-rainbow.toml)
<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
<<< @/public/presets/toml/gruvbox-rainbow.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#jetpack)
[Return to Presets](./#jetpack)
# Jetpack Preset
@ -21,4 +21,4 @@ starship preset jetpack -o ~/.config/starship.toml
[Click to download TOML](/presets/toml/jetpack.toml)
<<< @/.vuepress/public/presets/toml/jetpack.toml
<<< @/public/presets/toml/jetpack.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#nerd-font-symbols)
[Return to Presets](./#nerd-font-symbols)
# Nerd Font Symbols Preset
@ -18,4 +18,4 @@ 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
<<< @/public/presets/toml/nerd-font-symbols.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#no-empty-icons)
[Return to Presets](./#no-empty-icons)
# No Empty Icons Preset
@ -14,4 +14,4 @@ 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
<<< @/public/presets/toml/no-empty-icons.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#no-nerd-fonts)
[Return to Presets](./#no-nerd-fonts)
# No Nerd Fonts Preset
@ -16,4 +16,4 @@ 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
<<< @/public/presets/toml/no-nerd-font.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#no-runtime-versions)
[Return to Presets](./#no-runtime-versions)
# No Runtime Versions Preset
@ -14,4 +14,4 @@ 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
<<< @/public/presets/toml/no-runtime-versions.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#pastel-powerline)
[Return to Presets](./#pastel-powerline)
# Pastel Powerline Preset
@ -18,4 +18,4 @@ starship preset pastel-powerline -o ~/.config/starship.toml
[Click to download TOML](/presets/toml/pastel-powerline.toml)
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml
<<< @/public/presets/toml/pastel-powerline.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#plain-text-symbols)
[Return to Presets](./#plain-text-symbols)
## Plain Text Symbols Preset
@ -14,4 +14,4 @@ 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
<<< @/public/presets/toml/plain-text-symbols.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#pure)
[Return to Presets](./#pure)
# Pure Preset
@ -14,4 +14,4 @@ starship preset pure-preset -o ~/.config/starship.toml
[Click to download TOML](/presets/toml/pure-preset.toml)
<<< @/.vuepress/public/presets/toml/pure-preset.toml
<<< @/public/presets/toml/pure-preset.toml

View File

@ -1,4 +1,4 @@
[Return to Presets](./README.md#pastel-powerline)
[Return to Presets](./#pastel-powerline)
# Tokyo Night Preset
@ -18,4 +18,4 @@ starship preset tokyo-night -o ~/.config/starship.toml
[Click to download TOML](/presets/toml/tokyo-night.toml)
<<< @/.vuepress/public/presets/toml/tokyo-night.toml
<<< @/public/presets/toml/tokyo-night.toml

View File

@ -164,7 +164,7 @@ For example:
#### 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/).
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
@ -211,14 +211,14 @@ 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) |
| `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. |
| `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
@ -296,6 +296,7 @@ $elixir\
$elm\
$erlang\
$fennel\
$gleam\
$golang\
$guix_shell\
$haskell\
@ -315,6 +316,7 @@ $php\
$pulumi\
$purescript\
$python\
$quarto\
$raku\
$rlang\
$red\
@ -338,6 +340,7 @@ $aws\
$gcloud\
$openstack\
$azure\
$nats\
$direnv\
$env_var\
$crystal\
@ -570,17 +573,14 @@ 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
```
## 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.
The `buf` module shows the currently installed version of [Buf](https://buf.build). By default, the module is shown if 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
@ -628,7 +628,7 @@ By default the module will be shown if any of the following conditions are met:
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `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. |
| `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. |
@ -645,7 +645,9 @@ By default the module will be shown if any of the following conditions are met:
*: This variable can only be used as a part of a style string
### Example
### Examples
#### Customize the format
```toml
# ~/.config/starship.toml
@ -654,6 +656,15 @@ By default the module will be shown if any of the following conditions are met:
format = 'via [🍔 $version](bold green) '
```
#### Replace Node.js
You can override the `detect_files` property of [the nodejs module](#nodejs) in your config so as to only show the bun runtime:
```
[nodejs]
detect_files = ['package.json', '.node-version', '!bunfig.toml', '!bun.lockb']
```
## C
The `c` module shows some information about your C compiler. By default
@ -893,6 +904,7 @@ The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) e
::: tip
This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`.
If you use [pixi](https://pixi.sh), you can disable pixi's prompt modifier by running `pixi config set change-ps1 false`.
:::
@ -1160,7 +1172,7 @@ it would have been `nixpkgs/pkgs`.
| `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.
prefixes or development directories of Java. Note that this will disable the fish style PWD.
```toml
[directory.substitutions]
@ -2002,7 +2014,7 @@ You can disable the module or use the `windows_starship` option to use a Windows
| `staged` | `'+'` | The format of `staged` |
| `renamed` | `'»'` | The format of `renamed` |
| `deleted` | `'✘'` | The format of `deleted` |
| `typechanged` | `""` | The format of `typechange` |
| `typechanged` | `""` | The format of `typechanged` |
| `style` | `'bold red'` | The style for the module. |
| `ignore_submodules` | `false` | Ignore changes to submodules. |
| `disabled` | `false` | Disables the `git_status` module. |
@ -2014,7 +2026,7 @@ The following variables can be used in `format`:
| Variable | Description |
| -------------- | ------------------------------------------------------------------------------------------------------------- |
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$typechanged$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. |
@ -2023,7 +2035,7 @@ The following variables can be used in `format`:
| `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. |
| `typechanged` | Displays `typechanged` 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
@ -2080,6 +2092,45 @@ Use Windows Starship executable on Windows paths in WSL
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
```
## Gleam
The `gleam` module shows the currently installed version of [Gleam](https://gleam.run/).
By default the module will be shown if any of the following conditions are met:
- The current directory contains a `gleam.toml` file
- The current directory contains a file with the `.gleam` 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 Gleam. |
| `detect_extensions` | `['gleam']` | Which extensions should trigger this module. |
| `detect_files` | `['gleam.toml']` | Which filenames should trigger this module. |
| `style` | `'bold #FFAFF3'` | The style for the module. |
| `disabled` | `false` | Disables the `gleam` module. |
### Variables
| Variable | Example | Description |
| -------- | -------- | ------------------------------------ |
| version | `v1.0.0` | The version of `gleam` |
| 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
[gleam]
format = 'via [⭐ $version](bold red) '
```
## Go
The `golang` module shows the currently installed version of [Go](https://golang.org/).
@ -2258,7 +2309,7 @@ By default the module will be shown if any of the following conditions are met:
| `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. |
| `symbol` | `'⌘ '` | A format string representing the symbol of Haxe. |
| `style` | `'bold fg:202'` | The style for the module. |
| `disabled` | `false` | Disables the `haxe` module. |
@ -2336,6 +2387,7 @@ The `hostname` module shows the system hostname.
| `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. |
| `aliases` | `{}` | Translate system hostnames to something else. If `trim_at` is specified, only the first part will be matched and replaced. |
### Variables
@ -2372,6 +2424,14 @@ detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
disabled = false
```
#### Replace the hostname with a nickname
```toml
# ~/.config/starship.toml
[hostname]
aliases = { "Max's MacBook Pro" = "home" }
```
## Java
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/).
@ -2583,8 +2643,9 @@ 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.
`detect_env_vars`, `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 or one of the environmatal variable has been set.
:::
@ -2607,6 +2668,7 @@ and `user_alias` options instead.
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `detect_env_vars` | `[]` | Which environmental variables should trigger this module |
| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Disables the `kubernetes` module. |
@ -2917,6 +2979,70 @@ truncation_length = 4
truncation_symbol = ''
```
## Mojo
The `mojo` module shows the current version of [Mojo programming language](https://www.modular.com/mojo) installed
### Options
| Option | Default | Description |
| ------------------- | ------------------------------------- | ------------------------------------------------------ |
| `format` | `'with [$symbol($version )]($style)'` | The format for the module. |
| `symbol` | `'🔥 '` | The symbol used before displaying the version of Mojo. |
| `style` | `'bold 208'` | The style for the module. |
| `disabled` | `false` | Disables the `mojo` module. |
| `detect_extensions` | `['mojo', '🔥']` | 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 | `24.4.0` | The version of `mojo` |
| 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
[mojo]
format = 'via [mojo ($version )($hash )]($style)'
```
## NATS
The `nats` module shows the name of the current [NATS](https://nats.io) context.
### Options
| Option | Default | Description |
| ---------- | -------------------------- | ------------------------------------------------------------ |
| `symbol` | `'✉️ '` | The symbol used before the NATS context (defaults to empty). |
| `style` | `'bold purple'` | The style for the module. |
| `format` | `'[$symbol$name]($style)'` | The format for the module. |
| `disabled` | `false` | Disables the `nats` module. |
### Variables
| Variable | Example | Description |
| -------- | ----------- | ------------------------------------ |
| name | `localhost` | The name of the NATS context |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
### Example
```toml
[nats]
format = '[$symbol]($style)'
style = 'bold purple'
```
## Nim
The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/).
@ -3017,12 +3143,12 @@ By default the module will be shown if any of the following conditions are met:
### 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_files` | `['package.json', '.node-version', '.nvmrc']` | 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. |
@ -3096,6 +3222,43 @@ By default the module will be shown if any of the following conditions are met:
format = 'via [🐪 $version]($style) '
```
## Odin
The 'odin' module shows the currently installed version of [Odin](https://odin-lang.org/). By default the module will be shown if the current directory contains a `.odin` file.
### Options
| Option | Default | Description |
| ------------------- | ------------------------------------ | ----------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `show_commit` | `false` | Shows the commit as part of the version. |
| `symbol` | `'Ø '` | The symbol used before displaying the version of Zig. |
| `style` | `'bold bright-blue'` | The style for the module. |
| `disabled` | `false` | Disables the `odin` module. |
| `detect_extensions` | `['odin']` | 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 | `dev-2024-03` | The version of `odin` |
| 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
[odin]
format = 'via [󰹩 ($version )]($style)'
show_commit = true
```
## Open Policy Agent
The `opa` module shows the currently installed version of the OPA tool.
@ -3206,7 +3369,9 @@ If you would like an operating system to be added, feel free to open a [feature
```toml
# This is the default symbols table.
[os.symbols]
AIX = "➿ "
Alpaquita = "🔔 "
AlmaLinux = "💠 "
Alpine = "🏔️ "
Amazon = "🙂 "
Android = "🤖 "
@ -3223,6 +3388,7 @@ Garuda = "🦅 "
Gentoo = "🗜️ "
HardenedBSD = "🛡️ "
Illumos = "🐦 "
Kali = "🐉 "
Linux = "🐧 "
Mabox = "📦 "
Macos = "🍎 "
@ -3241,11 +3407,14 @@ Pop = "🍭 "
Raspbian = "🍓 "
Redhat = "🎩 "
RedHatEnterprise = "🎩 "
RockyLinux = "💠 "
Redox = "🧪 "
Solus = "⛵ "
SUSE = "🦎 "
Ubuntu = "🎯 "
Ultramarine = "🔷 "
Unknown = "❓ "
Void = " "
Windows = "🪟 "
```
@ -3500,17 +3669,19 @@ The `purescript` module shows the currently installed version of [PureScript](ht
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 `spago.yaml` file
- The current directory contains a `spago.lock` 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_files` | `['spago.dhall', 'spago.yaml', 'spago.lock']` | 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. |
@ -3542,7 +3713,7 @@ current [Python virtual environment](https://docs.python.org/tutorial/venv.html)
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:
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
@ -3568,6 +3739,7 @@ By default the module will be shown if any of the following conditions are met:
| `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 |
| `detect_env_vars` | `["VIRTUAL_ENV"]` | Which environmental variables should trigger this module |
| `disabled` | `false` | Disables the `python` module. |
::: tip
@ -3624,16 +3796,37 @@ python_binary = 'python3'
detect_extensions = []
```
```toml
# ~/.config/starship.toml
## Quarto
[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']
```
The `quarto` module shows the current installed version of Quarto used in a project.
By default, the module will be shown if any of the following conditions are met:
- The current directory contains a `_quarto.yml` file
- The current directory contains any `*.qmd` 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 Quarto |
| `style` | `'bold #75AADB'` | The style for the module. |
| `detect_extensions` | `['.qmd']` | Which extensions should trigger this module. |
| `detect_files` | `['_quarto.yml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `quarto` module. |
### Variables
| Variable | Example | Description |
| -------- | --------- | ------------------------------------ |
| version | `1.4.549` | The version of `quarto` |
| 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
## R
@ -3785,10 +3978,11 @@ Starship gets the current Ruby version by running `ruby -v`.
### 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` |
| gemset | `test` | Optional, gets the current RVM gemset name. |
*: This variable can only be used as a part of a style string
@ -3977,7 +4171,7 @@ 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`.
status code and preceding characters are provided by `shlvl`.
```toml
# ~/.config/starship.toml
@ -4375,12 +4569,12 @@ By default, the module will be shown if any of the following conditions are met:
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `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 |
| `symbol` | `'t '` | A format string representing the symbol of Typst |
| `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. |
| `disabled` | `false` | Disables the `typst` module. |
### Variables
@ -4402,6 +4596,7 @@ The module will be shown if any of the following conditions are met:
- 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
- The array `detect_env_vars` contains at least the name of one environment variable, that is set
::: tip
@ -4414,12 +4609,14 @@ 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. |
| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
| `format` | `'[$user]($style) in '` | The format for the module. |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
| `aliases` | `{}` | Translate system usernames to something else. |
### Variables
@ -4430,6 +4627,8 @@ these variables, one workaround is to set one of them with a dummy value.
### Example
#### Always show the username
```toml
# ~/.config/starship.toml
@ -4439,6 +4638,7 @@ style_root = 'black bold'
format = 'user: [$user]($style) '
disabled = false
show_always = true
aliases = { "corpuser034g" = "matchai" }
```
## Vagrant
@ -4622,11 +4822,12 @@ If you have an interesting example not covered there, feel free to share it ther
:::
::: warning Command output is printed unescaped to the prompt
::: warning If `unsafe_no_escape` is enabled or prior to starship v1.20 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,
contains shell-specific interpretable sequences, they could be interpreted on display.
Depending on the shell, this can mean that e.g. strings enclosed by backticks are executed by the shell.
Such sequences are usually 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.
@ -4644,6 +4845,7 @@ Format strings can also contain shell specific prompt sequences, e.g.
| `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` | `'<custom module>'` | The description of the module that is shown when running `starship explain`. |
| `unsafe_no_escape` | `false` | When set, command output is not escaped of characters that could be interpreted by the shell. |
| `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. |

View File

@ -1,10 +1,14 @@
---
home: true
heroImage: /logo.svg
heroText:
tagline: Minimale, super schnelle und unendlich anpassbare Prompt für jede Shell!
actionText: Loslegen →
actionLink: ./de-DE/guide/
layout: home
hero:
image: /logo.svg
text:
tagline: Der minimalistische, super schnelle und unendlich anpassbare Prompt für jede Shell!
actions:
-
theme: brand
text: Loslegen →
link: ./de-DE/guide/
features:
-
title: Kompatibel
@ -21,12 +25,24 @@ metaTitle: "Starship: Cross-Shell Prompt"
description: Starship ist eine minimale, super schnelle, und extrem anpassbare Prompt für jede Shell! Sie zeigt die Information, die man benötigt an, während sie schnell und minimal bleibt. Schnell-Installation verfügbar für Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, und PowerShell.
---
<div class="center">
<video class="demo-video" muted autoplay loop playsinline>
<script setup>
import { onMounted } from 'vue'
onMounted(() => {
const urlParams = new URLSearchParams(window.location.search)
if (urlParams.has('uwu') || urlParams.has('kawaii')) {
const img = document.querySelector('.VPHero .VPImage.image-src')
img.classList.add('uwu')
img.src = '/logo-uwu.png'
img.alt = 'Kawaii Starship Logo by @sawaratsuki1004'
}
})
</script>
<video class="demo-video" muted autoplay loop playsinline>
<source src="/demo.webm" type="video/webm">
<source src="/demo.mp4" type="video/mp4">
</video>
</div>
</video>
### Voraussetzungen
@ -45,7 +61,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
curl -sS https://starship.rs/install.sh | sh
```
Um Starship selbst zu aktualisieren, führe das Skript oben erneut aus. Die vorhandene Version wird ersetzt, ohne das deine Konfiguration von Starship verloren geht.
Führe das Skript oben erneut aus, um Starship selbst zu aktualisieren. Die vorhandene Version wird ersetzt, ohne dass deine Starship-Konfiguration verloren geht.
#### Installation mithilfe eines Paket-Managers
@ -55,6 +71,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
```sh
brew install starship
```
Mit [Winget](https://github.com/microsoft/winget-cli):
```powershell
@ -66,7 +83,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
#### Bash
Trage folgendes am Ende der `~/.bashrc` ein:
Füge dies ans Ende von `~/.bashrc`:
```sh
# ~/.bashrc
@ -99,7 +116,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
#### Powershell
Trage das folgende am Ende von `Microsoft.PowerShell_profile.ps1` ein. Du kannst den Speicherort dieser Datei überprüfen, indem du die `$PROFILE` Variable in PowerShell abfragst. Der Pfat lautet normalerweise `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` unter Windows und `~/.config/powershell/Microsoft.PowerShell_profile.ps1` auf -Nix.
Füge das Folgende ans Ende von `Microsoft.PowerShell_profile.ps1` an. Du kannst den Speicherort dieser Datei überprüfen, indem du die `$PROFILE` Variable in PowerShell abfragst. Normalerweise ist der Pfad `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` oder `~/.config/powershell/Microsoft.PowerShell_profile.ps1` auf -Nix.
```sh
Invoke-Expression (&starship init powershell)
@ -153,7 +170,8 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
:::
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
Füge folgendes zum Ende deiner Nushell env Datei hinzu (finde sie, indem du `$nu.env-path` in Nushell ausführst):
```sh
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu

View File

@ -1,6 +1,6 @@
# Erweiterte Konfiguration
Auch wenn Starship eine vielseitige Shell ist, reichen manche Konfigurationen in der `starship.toml` nicht aus, um erweiterte Einstellungen vorzunehmen. Diese Seite beschreibt einige fortgeschrittene Konfigurationen für Starship.
Auch wenn Starship eine vielseitige Shell ist, reichen manche Konfigurationen in der `starship.toml` nicht aus, um manche Sachen zu erreichen. Diese Seite beschreibt einige fortgeschrittene Konfigurationen für Starship.
::: warning
@ -10,7 +10,7 @@ Die hier beschriebenen Konfigurationen werden sich mit kommenden Updates von Sta
## 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`.
Es ist möglich, die zuvor geprintete Prompt mit einem benutzerdefinierten String zu ersetzen. Das ist in Fällen nützlich, in denen nicht immer die ganze Information der Prompt gebraucht wird. Führe `Enable-TransientPrompt` in deiner Shell-Session aus, um dieses Verhalten zu aktivieren. Füge das Statement in dein `$PROFILE` ein, um diese Funktion dauerhaft zu aktivieren. 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
@ -26,7 +26,7 @@ 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 <value>` where \<value\> can be one of:
Clink allows you to replace the previous-printed prompt with custom strings. Das ist in Fällen nützlich, in denen nicht immer die ganze Information der Prompt gebraucht wird. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
- `always`: always replace the previous prompt
- `same_dir`: replace the previous prompt only if the working directory is same
@ -56,7 +56,7 @@ 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`.
Es ist möglich, die zuvor geprintete Prompt mit einem benutzerdefinierten String zu ersetzen. Das ist in Fällen nützlich, in denen nicht immer die ganze Information der Prompt gebraucht wird. 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.
@ -80,6 +80,26 @@ starship init fish | source
enable_transience
```
## TransientPrompt and TransientRightPrompt in Bash
The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework at v0.4 or higher allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=<value>`:
The \<value\> here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and the option `prompt_ps1_transient` has a non-empty \<value\>, the prompt specified by `PS1` is erased on leaving the current command line. If \<value\> contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in \<value\> and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored.
Make the following changes to your `~/.blerc` (or in `~/.config/blesh/init.sh`) to customize what gets displayed on the left and on the right:
- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do
```bash
bleopt prompt_ps1_final='$(starship module character)'
```
- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do
```bash
bleopt prompt_rps1_final='$(starship module time)'
```
## 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:
@ -129,7 +149,7 @@ eval $(starship init bash)
set +o functrace
```
## Custom pre-prompt and pre-execution Commands in PowerShell
## Benutzerdefinierte Pre-Prompt- und Pre-Execution-Befehle 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`. Starship bietet daher die begrenzte Möglichkeit, eigene Funktionen in das prompt rendering Verfahren einzufügen:
@ -203,9 +223,11 @@ Invoke-Expression (&starship init powershell)
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).
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.
`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash.
Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework v0.4 or higher should be installed in order to use right prompt in bash.
### Beispiel
@ -244,7 +266,7 @@ Hinweis: Fortsetzungs-Prompts sind nur für folgende Shells verfügbar:
```toml
# ~/.config/starship.toml
# Ein Fortsetzungs-Prompt der 2 ausgefüllte Pfeile darstellt
# A continuation prompt that displays two filled-in arrows
continuation_prompt = '▶▶ '
```
@ -265,7 +287,7 @@ Stil-Zeichenketten sind eine Liste von Wörtern, getrennt durch Leerzeichen. Die
- `<color>`
- `keins`
wobei `<color>` eine Farbspezifikation ist (siehe unten). `fg:<color>` und `<color>` tun derzeit dasselbe, das kann sich in Zukunft aber ändern. `inverted` tauscht Hinter- und Vordergrundfarben. Die Reihenfolge der Wörter in der Liste spielt keine Rolle.
wobei `<color>` eine Farbspezifikation ist (siehe unten). `fg:<color>` und `<color>` tun derzeit dasselbe, das kann sich in Zukunft aber ändern. `<color>` can also be set to `prev_fg` or `prev_bg` which evaluates to the previous item's foreground or background color respectively if available or `none` otherwise. `inverted` tauscht Hinter- und Vordergrundfarben. Die Reihenfolge der Wörter in der Liste spielt keine Rolle.
`none` überschreibt alle anderen Tokens in einem String wenn es nicht ein Teil einer `bg:` Zeichenkette ist, so dass z.B. über die Zeichenkette `fg:red none fg:blue` kein Styling mehr anzeigt wird. `bg:none` setzt den Hintergrund auf die Standardfarbe, so `fg:red bg:none` entspricht `rot` oder `fg:red` und `bg:green fg:red bg:none` entspricht auch `fg:red` oder `rot`. In der Zukunft könnte die Unterstützung von `none` in Verbindung mit anderen Tokens fallen gelassen werden.
@ -279,6 +301,6 @@ Wenn mehrere Farben für Vordergrund oder Hintergrund angegeben werden, hat die
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
- 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
- `strikethrough` is not supported by the default macOS Terminal.app.

View File

@ -1,6 +1,6 @@
# Konfiguration
Um mit der Konfiguration von Starship zu beginnen, muss eine leere Datei in diesem Pfad erstellt werden: `~/.config/starship.toml`.
Um mit der Konfiguration von Starship zu beginnen, musst du die folgende Datei erstellen: `~/.config/starship.toml`.
```sh
mkdir -p ~/.config && touch ~/.config/starship.toml
@ -9,24 +9,25 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
Die gesamte Konfiguration von Starship erfolgt in dieser [TOML](https://github.com/toml-lang/toml)-Datei:
```toml
# Get editor completions based on the config schema
# Editor Vervollständigungen basierend auf dem Konfigurations-Schema erhalten
"$schema" = 'https://starship.rs/config-schema.json'
# Inserts a blank line between shell prompts
# Fügt eine Leerzeile zwischen den Eingabeaufforderungen ein
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'
# Ersetzt das '' Zeichen in der Prompt mit '➜'
[character] # Der name des Moduls das wir ändern ist 'character'
success_symbol = '[➜](bold green)' # Der 'success_symbol' Teil wird auf '➜' mit der farbe 'bold green' gesetzt
# Disable the package module, hiding it from the prompt completely
# Deaktiviert das "package" Modul, damit es in der Eingabeaufforderung nicht mehr zu sehen ist
[package]
disabled = true
```
### Config File Location
### Ort der Konfigurationsdatei
Die voreingestellte Konfigurations-Datei kann mit der `STARSHIP_CONFIG` Umgebungsvariable verändert werden. Hier z. Bsp. für die BASH shell, hinzuzufügen zur ~/. bashrc:
Du kannst die voreingestellte Konfigurations-Datei mit der `STARSHIP_CONFIG` Umgebungsvariable verändern:
```sh
export STARSHIP_CONFIG=~/example/non/default/path/starship.toml
@ -38,7 +39,7 @@ export STARSHIP_CONFIG=~/example/non/default/path/starship.toml
$ENV:STARSHIP_CONFIG = "$HOME\example\non\default\path\starship.toml"
```
Or for Cmd (Windows) would be adding this line to your `starship.lua`:
Oder für Cmd (Windows) diese Zeile (wieder zur `starship.lua`):
```lua
os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\starship.toml')
@ -46,7 +47,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star
### Protokollierung
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. Das kann jedoch durch die Nutzung der `STARSHIP_CACHE` Umgebungsvariable verändert werden:
Standardmäßig protokolliert Starship Warnungen und Fehler in einer Datei names `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, wobei der session key zu der Instanz deines Terminals korrespondiert. Das kann jedoch durch die Nutzung der `STARSHIP_CACHE` Umgebungsvariable verändert werden:
```sh
export STARSHIP_CACHE=~/.starship/cache
@ -58,7 +59,7 @@ export STARSHIP_CACHE=~/.starship/cache
$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
```
Or for Cmd (Windows) would be adding this line to your `starship.lua`:
Oder für Cmd (Windows) diese Zeile (wieder zur `starship.lua`):
```lua
os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp')
@ -74,9 +75,9 @@ Die meisten Module haben einen Präfix der standardmäßigen terminal-Farbe (z.B
### Strings
In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`.
In der TOML Syntax werden [Zeichenketten](https://toml.io/en/v1.0.0#string) mit `'`, `"`, `'''`, oder `"""` eingesetzt.
The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`.
Die folgende Starship Syntax Symbole haben eine spezielle Rolle in einem String, und müssen demnach als Spezialzeichen markiert werden, um als normales Zeichen angezeigt zu werden: `$ [ ] ( )`.
| Symbol | Type | Notes |
| ------ | ------------------------- | ------------------------------------------------------ |
@ -158,7 +159,7 @@ Hier sind ein paar Beispiele:
#### Style-Strings
Die meisten Module in Starship lassen dich den Darstellungsstil verändern. Dies passiert meistens an einem bestimmten Eintrag (gewöhnlich `style` genannt), der einen String mit den Einstellungen darstellt. Es folgen ein paar Beispiele für solche Strings zusammen der mit Beschreibungen, was sie bewirken. Details zur vollen Syntax findest du im [Erweiterten Konfigurationshandbuch](/advanced-config/).
Die meisten Module in Starship lassen dich den Darstellungsstil verändern. Dies passiert meistens an einem bestimmten Eintrag (gewöhnlich `style` genannt), der einen String mit den Einstellungen darstellt. Es folgen ein paar Beispiele für solche Strings zusammen der mit Beschreibungen, was sie bewirken. 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
@ -198,14 +199,14 @@ Dies ist eine Liste mit Prompt-weiten Konfigurationsoptionen.
### Optionen
| Option | Standartwert | Beschreibung |
| ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ----------------- | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Das Aussehen des Prompts festlegen. |
| `right_format` | `''` | Sieh [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `right_format` | `''` | See [Enable Right Prompt](../advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout für das Scannen von Dateien (in Millisekunden). |
| `command_timeout` | `500` | Maximale Zeit für von Starship ausgeführte Kommandos. |
| `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. |
| `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
@ -281,6 +282,7 @@ $elixir\
$elm\
$erlang\
$fennel\
$gleam\
$golang\
$guix_shell\
$haskell\
@ -300,6 +302,7 @@ $php\
$pulumi\
$purescript\
$python\
$quarto\
$raku\
$rlang\
$red\
@ -323,6 +326,7 @@ $aws\
$gcloud\
$openstack\
$azure\
$nats\
$direnv\
$env_var\
$crystal\
@ -349,7 +353,7 @@ 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.
Das `aws` Modul zeigt die aktuelle AWS Region und Profil sowie den Ablauf-Timer an, wenn temporäre Zugangsdaten verwendet werden. Die Ausgabe des Moduls verwendet die `AWS_REGION`, `AWS_DEFAULT_REGION` und `AWS_PROFILE` Umgebungsvariablen sowie die `~/. ws/config` und `~/.aws/credentials` Dateien, falls nötig.
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.
@ -543,7 +547,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
```
@ -600,7 +604,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun.
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `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 Bun. |
| `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. |
@ -617,7 +621,9 @@ The `bun` module shows the currently installed version of the [bun](https://bun.
*: This variable can only be used as a part of a style string
### Beispiel
### Beispiele
#### Customize the format
```toml
# ~/.config/starship.toml
@ -626,6 +632,15 @@ The `bun` module shows the currently installed version of the [bun](https://bun.
format = 'via [🍔 $version](bold green) '
```
#### Replace Node.js
You can override the `detect_files` property of [the nodejs module](#nodejs) in your config so as to only show the bun runtime:
```
[nodejs]
detect_files = ['package.json', '.node-version', '!bunfig.toml', '!bun.lockb']
```
## 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.
@ -1165,6 +1180,7 @@ The `direnv` module shows the status of the current rc file if one is present. T
| `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. |
@ -1887,7 +1903,7 @@ The following variables can be used in `format`:
| Variable | Beschreibung |
| -------------- | ------------------------------------------------------------------------------------------------------------- |
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$typechanged$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. |
@ -1953,6 +1969,44 @@ Use Windows Starship executable on Windows paths in WSL
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
```
## Gleam
The `gleam` module shows the currently installed version of [Gleam](https://gleam.run/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `gleam.toml` file
- The current directory contains a file with the `.gleam` extension
### 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` | `'⭐ '` | A format string representing the symbol of Gleam. |
| `detect_extensions` | `['gleam']` | Which extensions should trigger this module. |
| `detect_files` | `['gleam.toml']` | Which filenames should trigger this module. |
| `style` | `'bold #FFAFF3'` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `gleam` module. |
### Variables
| Variable | Beispiel | Beschreibung |
| --------- | -------- | ------------------------------------- |
| version | `v1.0.0` | The version of `gleam` |
| 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
### Beispiel
```toml
# ~/.config/starship.toml
[gleam]
format = 'via [⭐ $version](bold red) '
```
## 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:
@ -2127,7 +2181,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
| `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. |
| `symbol` | `'⌘ '` | A format string representing the symbol of Haxe. |
| `style` | `'bold fg:202'` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `haxe` module. |
@ -2431,7 +2485,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
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.
When the module is enabled it will always be active, unless any of `detect_env_vars`, `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 or one of the environmatal variable has been set.
:::
@ -2453,6 +2507,7 @@ The `context_aliases` and `user_aliases` options are deprecated. Use `contexts`
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `detect_env_vars` | `[]` | Which environmental variables should trigger this module |
| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Deaktiviert das `kubernetes`-Modul. |
@ -2755,6 +2810,35 @@ truncation_length = 4
truncation_symbol = ''
```
## NATS
The `nats` module shows the name of the current [NATS](https://nats.io) context.
### Optionen
| Option | Standartwert | Beschreibung |
| ---------- | -------------------------- | ------------------------------------------------------------ |
| `symbol` | `'✉️ '` | The symbol used before the NATS context (defaults to empty). |
| `style` | `'bold purple'` | Stil für dieses Modul. |
| `format` | `'[$symbol$name]($style)'` | Das Format für das Modul. |
| `disabled` | `false` | Disables the `nats` module. |
### Variables
| Variable | Beispiel | Beschreibung |
| --------- | ----------- | ------------------------------------- |
| name | `localhost` | The name of the NATS context |
| symbol | | Spiegelt den Wert der Option `symbol` |
| style\* | | Spiegelt den Wert der Option `style` |
### Beispiel
```toml
[nats]
format = '[$symbol]($style)'
style = 'bold purple'
```
## 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:
@ -2930,6 +3014,43 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
format = 'via [🐪 $version]($style) '
```
## Odin
The 'odin' module shows the currently installed version of [Odin](https://odin-lang.org/). By default the module will be shown if the current directory contains a `.odin` file.
### Optionen
| Option | Standartwert | Beschreibung |
| ------------------- | ------------------------------------ | ----------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. |
| `show_commit` | `false` | Shows the commit as part of the version. |
| `symbol` | `'Ø '` | The symbol used before displaying the version of Zig. |
| `style` | `'bold bright-blue'` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `odin` module. |
| `detect_extensions` | `['odin']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
### Variables
| Variable | Beispiel | Beschreibung |
| --------- | ------------- | ------------------------------------- |
| version | `dev-2024-03` | The version of `odin` |
| 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
### Beispiel
```toml
# ~/.config/starship.toml
[odin]
format = 'via [󰹩 ($version )]($style)'
show_commit = true
```
## 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.
@ -3031,7 +3152,9 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis
```toml
# This is the default symbols table.
[os.symbols]
AIX = "➿ "
Alpaquita = "🔔 "
AlmaLinux = "💠 "
Alpine = "🏔️ "
Amazon = "🙂 "
Android = "🤖 "
@ -3048,6 +3171,7 @@ Garuda = "🦅 "
Gentoo = "🗜️ "
HardenedBSD = "🛡️ "
Illumos = "🐦 "
Kali = "🐉 "
Linux = "🐧 "
Mabox = "📦 "
Macos = "🍎 "
@ -3066,11 +3190,14 @@ Pop = "🍭 "
Raspbian = "🍓 "
Redhat = "🎩 "
RedHatEnterprise = "🎩 "
RockyLinux = "💠 "
Redox = "🧪 "
Solus = "⛵ "
SUSE = "🦎 "
Ubuntu = "🎯 "
Ultramarine = "🔷 "
Unknown = "❓ "
Void = " "
Windows = "🪟 "
```
@ -3315,17 +3442,19 @@ format = '[$symbol$stack]($style) '
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:
- Das aktuelle Verzeichnis enthält eine `spago.dhall`-Datei
- Das aktuelle Verzeichnis enthält eine `spago.yaml`-Datei
- Das aktuelle Verzeichnis enthält eine `spago.lock`-Datei
- The current directory contains a file with the `.purs` extension
### 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` | `'<=> '` | 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_files` | `['spago.dhall', 'spago.yaml', 'spago.lock']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `style` | `'bold white'` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `purescript` module. |
@ -3355,7 +3484,7 @@ The `python` module shows the currently installed version of [Python](https://ww
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:
By default, the module will be shown if any of the following conditions are met:
- Das aktuelle Verzeichnis enthält eine `.python-version`-Datei
- Das aktuelle Verzeichnis enthält eine `Pipfile`-Datei
@ -3427,16 +3556,37 @@ python_binary = 'python3'
detect_extensions = []
```
```toml
# ~/.config/starship.toml
## Quarto
[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']
```
The `quarto` module shows the current installed version of Quarto used in a project.
By default, the module will be shown if any of the following conditions are met:
- The current directory contains a `_quarto.yml` file
- The current directory contains any `*.qmd` 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` | `'⨁ '` | A format string representing the symbol of Quarto |
| `style` | `'bold #75AADB'` | Stil für dieses Modul. |
| `detect_extensions` | `['.qmd']` | Which extensions should trigger this module. |
| `detect_files` | `['_quarto.yml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `quarto` module. |
### Variables
| Variable | Beispiel | Beschreibung |
| --------- | --------- | ------------------------------------- |
| version | `1.4.549` | The version of `quarto` |
| 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
## R
@ -3584,10 +3734,11 @@ Starship gets the current Ruby version by running `ruby -v`.
### Variables
| Variable | Beispiel | Beschreibung |
| --------- | -------- | ------------------------------------- |
| --------- | -------- | ------------------------------------------- |
| version | `v2.5.1` | The version of `ruby` |
| symbol | | Spiegelt den Wert der Option `symbol` |
| style\* | | Spiegelt den Wert der Option `style` |
| gemset | `test` | Optional, gets the current RVM gemset name. |
*: This variable can only be used as a part of a style string
@ -3770,7 +3921,7 @@ 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`.
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 preceding characters are provided by `shlvl`.
```toml
# ~/.config/starship.toml
@ -4156,12 +4307,12 @@ By default, the module will be shown if any of the following conditions are met:
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `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 |
| `symbol` | `'t '` | A format string representing the symbol of Typst |
| `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. |
| `disabled` | `false` | Disables the `typst` module. |
### Variables
@ -4182,6 +4333,7 @@ Das `username` Modul zeigt den Namen des aktiven Benutzers. Das Modul wird gezei
- Der aktuelle Benutzer ist nicht der eingeloggte Benutzer
- Der Benutzer ist aktuell via SSH verbunden
- Die Variable `show_always` ist auf true gesetzt
- The array `detect_env_vars` contains at least the name of one environment variable, that is set
::: tip
@ -4192,12 +4344,14 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
### Optionen
| Option | Standartwert | Beschreibung |
| ------------- | ----------------------- | ---------------------------------------------- |
| ----------------- | ----------------------- | --------------------------------------------------------- |
| `style_root` | `'bold red'` | The style used when the user is root/admin. |
| `style_user` | `'bold yellow'` | Stil wenn der Benutzer nicht unter root läuft. |
| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
| `format` | `'[$user]($style) in '` | Das Format für das Modul. |
| `show_always` | `false` | Immer das `username` Modul anzeigen. |
| `disabled` | `false` | Deavktiviert das `username` Modul. |
| `aliases` | `{}` | Translate system usernames to something else |
### Variables
@ -4208,6 +4362,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
### Beispiel
#### Always show the hostname
```toml
# ~/.config/starship.toml
@ -4217,6 +4373,18 @@ style_root = 'black bold'
format = 'user: [$user]($style) '
disabled = false
show_always = true
aliases = { "corpuser034g" = "matchai" }
```
#### Hide the hostname in remote tmux sessions
```toml
# ~/.config/starship.toml
[hostname]
ssh_only = false
detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
disabled = false
```
## Vagrant
@ -4393,9 +4561,9 @@ The order in which custom modules are shown can be individually set by including
:::
::: warning Command output is printed unescaped to the prompt
::: warning If `unsafe_no_escape` is enabled or prior to starship v1.20 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.
Whatever output the command generates is printed unmodified in the prompt. This means if the output contains shell-specific interpretable sequences, they could be interpreted on display. Depending on the shell, this can mean that e.g. strings enclosed by backticks are executed by the shell. Such sequences are usually 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).
@ -4410,6 +4578,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt
| `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) |
| `beschreibung` | `'<custom module>'` | The description of the module that is shown when running `starship explain`. |
| `unsafe_no_escape` | `false` | When set, command output is not escaped of characters that could be interpreted by the shell. |
| `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. |

View File

@ -58,7 +58,7 @@ 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.
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?
@ -72,7 +72,7 @@ You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs ca
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.
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that is to blame.
```sh
env STARSHIP_LOG=trace starship timings
@ -123,7 +123,7 @@ 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`.
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 directory 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.

View File

@ -35,7 +35,7 @@
<a href="https://stand-with-ukraine.pp.ua"
><img
src="https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraineFlat.svg"
alt="Stand With Ukraine"
alt="Wir stehen zur Ukraine"
/></a>
</p>
@ -108,7 +108,7 @@
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
alt="Portugiesisch (Brasilien)"
alt="Português do Brasil"
/></a>
&nbsp;
<a
@ -132,7 +132,7 @@
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
alt="Vietnamesisch"
alt="Tiếng Việt"
/></a>
&nbsp;
<a
@ -161,7 +161,7 @@
align="right"
/>
**Minimale, super schnelle und unendlich anpassbare Prompt für jede Shell!**
**Der minimalistische, super schnelle und unendlich anpassbare Prompt für jede Shell!**
- **Schnell:** sie ist schnell _sehr, sehr_ schnell! 🚀
- **Konfigurierbar:** konfiguriere jedes Detail der Prompt.
@ -180,7 +180,7 @@
### Voraussetzungen
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)).
- Eine [Nerd Font](https://www.nerdfonts.com/), installiert und in deinem Terminal aktiviert (versuche es zum Beispiel mal mit der [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)).
### Schritt 1. Installiere Starship
@ -274,14 +274,14 @@ Install Starship using any of the following package managers:
</details>
### Schritt 2. Set up your shell to use Starship
### Schritt 2. Richte deine Shell für die Nutzung von Starship ein
Konfigurieren deine Shell um Starship zu initialisieren. Wähle dafür deine Shell aus der Liste aus:
Konfiguriere deine Shell, um Starship automatisch zu starten. Wähle dafür deine Shell aus der Liste aus:
<details>
<summary>Bash</summary>
Trage folgendes am Ende der `~/.bashrc` ein:
Füge dies ans Ende von `~/.bashrc`:
```sh
eval "$(starship init bash)"
@ -292,7 +292,7 @@ eval "$(starship init bash)"
<details>
<summary>⌘ Cmd</summary>
Du musst [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) mit Cmd verwenden. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
Du musst [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) mit Cmd verwenden. Erstelle eine Datei in diesem Pfad `%LocalAppData%\clink\starship.lua` mit dem folgenden Inhalt:
```lua
load(io.popen('starship init cmd'):read("*a"))()
@ -338,27 +338,27 @@ eval $(starship init ion)
<details>
<summary>Nushell</summary>
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
Füge folgendes zum Ende deiner Nushell env Datei hinzu (finde sie, indem du `$nu.env-path` in Nushell ausführst):
```sh
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu
```
Und füge folgendes am Ende deiner Nushell-Konfiguration hinzu (du findest diese, indem du folgenden Befehl in Nushell ausführst `$nu.config-path`):
Und füge Folgendes am Ende deiner Nushell-Konfiguration hinzu (finde sie, indem du folgenden Befehl in Nushell ausführst `$nu.config-path`):
```sh
use ~/.cache/starship/init.nu
```
Note: Only Nushell v0.78+ is supported
Beachte: Nushell wird erst ab v0.78+ unterstützt
</details>
<details>
<summary>PowerShell</summary>
Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`):
Füge Folgendes am Ende deiner PowerShell-Konfiguration hinzu (finde sie, indem du folgenden Befehl ausführst `$PROFILE`):
```powershell
Invoke-Expression (&starship init powershell)
@ -369,7 +369,7 @@ Invoke-Expression (&starship init powershell)
<details>
<summary>Tcsh</summary>
Trage folgendes am Ende von `~/.bashrc` ein:
Füge Folgendes am Ende von `~/.tcshrc` ein:
```sh
eval `starship init tcsh`
@ -421,19 +421,17 @@ Falls du an Starship mitwirken willst, wirf bitte einen Blick auf den [Leitfaden
Schaut euch bitte auch die Projekte an, die die Entstehung von Starship inspiriert haben. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** A ZSH prompt for astronauts.
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** Eine ZSH Prompt für Astronauten.
- **[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)** Cross-Shell robbyrussell Thema geschrieben in JavaScript.
- **[reujab/silver](https://github.com/reujab/silver)** A cross-shell customizable powerline-like prompt with icons.
- **[reujab/silber](https://github.com/reujab/silver)** Eine cross-shell anpassbare Powerline-Prompt mit Icons.
## ❤️ Sponsors
## ❤️ Sponsoren
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.
Unterstütze dieses Projekt, indem du [ein Sponsor wirst](https://github.com/sponsors/starship). Dein Name und Logo wird hier mit einem Link zu deiner Website erscheinen.
**Supporter Tier**
- [Appwrite](https://appwrite.io/)
- Free code signing provided by [SignPath.io](https://signpath.io), certificate by [SignPath Foundation](https://signpath.org)
<p align="center">
<br>

View File

@ -5,7 +5,7 @@ Um Starship zu installieren, musst du zwei Dinge tun:
1. Lade die **starship** Datei auf den Computer herunter
1. Weise deine Shell an die Starship Datei als Eingabeaufforderung zu nutzen, indem du eines der Initialisierungs-Skripte benutzt
Die Anleitung auf [der Hauptseite](/guide/#🚀-installation) wird für die meisten Benutzer ausreichend sein. Für einige speziellere Plattformen wird jedoch eine speziellere Anleitung benötigt.
For most users, the instructions on [the main page](../guide/#🚀-installation) will work great. Für einige speziellere Plattformen wird jedoch eine speziellere Anleitung benötigt.
Es gibt sehr viele Plattformen, sodass diese nicht alle in die Hauptanleitung passen, aus diesem Grund sind hier ein paar Installationsanweisungen für ein paar Plattformen von der Community. Ist deine Platform nicht dabei? Dann füge bitte deine hinzu, sobald du herausgefunden hast wie man starship mit dieser benutzt!
@ -45,7 +45,7 @@ Unter Funtoo Linux kann starship von [core-kit](https://github.com/funtoo/core-k
emerge app-shells/starship
```
## [Nix](https://nixos.wiki/wiki/Nix)
## [Nix](https://wiki.nixos.org/wiki/Nix)
### Das Binary holen

View File

@ -66,6 +66,12 @@ This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/t
## [Gruvbox Rainbow](./gruvbox-rainbow.md)
This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
Diese Voreinstellung ist stark inspiriert von [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)
[![Screenshot von Gruvbox Regenbogen](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow)
## [Jetpack](./jetpack.md)
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.
[![Screenshot of Jetpack preset](/presets/img/jetpack.png "Click to view Jetpack preset")](./jetpack)

View File

@ -1,4 +1,4 @@
[Zurück zu den Voreinstellungen](./README.md#bracketed-segments)
[Zurück zu den Voreinstellungen](./#bracketed-segments)
# Bracketed Segments Preset
@ -14,4 +14,4 @@ starship preset bracketed-segments -o ~/.config/starship.toml
[Zum Herunterladen der TOML Datei klicken](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml
<<< @/public/presets/toml/bracketed-segments.toml

View File

@ -1,10 +1,10 @@
[Zurück zu den Voreinstellungen](./README.md#gruvbox-rainbow)
[Zurück zu den Voreinstellungen](./#gruvbox-rainbow)
# Gruvbox Rainbow Preset
# Gruvbox Regenbogen
This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
Diese Voreinstellung ist stark inspiriert von [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png)
![Screenshot von Gruvbox Regenbogen](/presets/img/gruvbox-rainbow.png)
### Voraussetzungen
@ -18,4 +18,4 @@ 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
<<< @/public/presets/toml/gruvbox-rainbow.toml

View File

@ -1,4 +1,4 @@
[Zurück zu den Voreinstellungen](./README.md#jetpack)
[Zurück zu den Voreinstellungen](./#jetpack)
# Jetpack Preset
@ -21,4 +21,4 @@ starship preset jetpack -o ~/.config/starship.toml
[Zum Herunterladen der TOML Datei klicken](/presets/toml/jetpack.toml)
<<< @/.vuepress/public/presets/toml/jetpack.toml
<<< @/public/presets/toml/jetpack.toml

View File

@ -1,4 +1,4 @@
[Zurück zu den Voreinstellungen](./README.md#nerd-font-symbols)
[Zurück zu den Voreinstellungen](./#nerd-font-symbols)
# Nerd Font Symbols Preset
@ -18,4 +18,4 @@ starship preset nerd-font-symbols -o ~/.config/starship.toml
[Zum Herunterladen der TOML Datei klicken](/presets/toml/nerd-font-symbols.toml)
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml
<<< @/public/presets/toml/nerd-font-symbols.toml

View File

@ -1,4 +1,4 @@
[Zurück zu den Voreinstellungen](./README.md#no-empty-icons)
[Zurück zu den Voreinstellungen](./#no-empty-icons)
# No Empty Icons Preset
@ -14,4 +14,4 @@ starship preset no-empty-icons -o ~/.config/starship.toml
[Zum Herunterladen der TOML Datei klicken](/presets/toml/no-empty-icons.toml)
<<< @/.vuepress/public/presets/toml/no-empty-icons.toml
<<< @/public/presets/toml/no-empty-icons.toml

Some files were not shown because too many files have changed in this diff Show More