Compare commits
378 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c5b319daf0 | |||
| 86e1cfe82c | |||
| 47f22c82c4 | |||
| 37f350a476 | |||
| 43eefbe8eb | |||
| 1390036882 | |||
| 53c1093528 | |||
| ac55a01d0f | |||
| f614fcdc1f | |||
| 9220df70d9 | |||
| d97b9110d0 | |||
| 952a1729f2 | |||
| 0a14e87a34 | |||
| c8a5adb412 | |||
| b456b9c519 | |||
| e80576f612 | |||
| e46457bb8b | |||
| 57551b80bd | |||
| 85692d1bf6 | |||
| 60c81f3d03 | |||
| aaab920f88 | |||
| dd73447329 | |||
| b75677ab59 | |||
| 69c17f0309 | |||
| d07b6d9861 | |||
| 0a53bf96d3 | |||
| 6e9c013e60 | |||
| 1b65a7bb77 | |||
| 24f82ce2d4 | |||
| b34fd27a3b | |||
| 616d73f72a | |||
| 9b0d2199b7 | |||
| 0a1235e279 | |||
| d8ac940098 | |||
| 61438484bd | |||
| 442d084962 | |||
| 49df92cd58 | |||
| a92c2582e6 | |||
| 084146e7c7 | |||
| cc50981181 | |||
| 6f2073d94e | |||
| f56955084b | |||
| 784d671d5e | |||
| cc72d89e1f | |||
| 5c5969c50b | |||
| af15de93c4 | |||
| aae1ed04ba | |||
| e4fa652169 | |||
| 5b24d295f8 | |||
| b7d947ca56 | |||
| b0fb251383 | |||
| fb36167fea | |||
| 43bb47c6bd | |||
| b76abc4b39 | |||
| 91138b3329 | |||
| 40408b7ed4 | |||
| eb67534ac9 | |||
| 7594f01d3d | |||
| 7feb2174e7 | |||
| 05cc198e8c | |||
| 0dca1c0a3d | |||
| c1c48153e9 | |||
| 018b077630 | |||
| 3538efe727 | |||
| b9746100e2 | |||
| b8d8918b01 | |||
| 4e9b84099d | |||
| 8a6be8c941 | |||
| 6cbc3620c9 | |||
| 89cd18c9a4 | |||
| e00a6d47ec | |||
| 277a7cc740 | |||
| e1351ac096 | |||
| 3ac904544d | |||
| 2d5e8c0945 | |||
| 1a4fac63f7 | |||
| 73425e7417 | |||
| ef52f9e77e | |||
| 75475cd0c1 | |||
| ded16cbfe1 | |||
| 8548d139e1 | |||
| a02b82ba12 | |||
| 67619386cd | |||
| 2ffe1737f0 | |||
| 8eb5983363 | |||
| c87ee9fa72 | |||
| f2c73d65ee | |||
| c9f74f7f42 | |||
| bcf44f9918 | |||
| e7c1976528 | |||
| 009eb93c83 | |||
| 09bbea8197 | |||
| b8cbd7748c | |||
| ef831ee84f | |||
| 5ea4037684 | |||
| 14cd5d757e | |||
| 4211a990aa | |||
| a72b4638f3 | |||
| de9a5322ee | |||
| c42339040c | |||
| 1a91510bed | |||
| 146976351e | |||
| 1e2bc8477e | |||
| 9b52475e54 | |||
| 89fd5320af | |||
| df5c2d8836 | |||
| b8af9a509a | |||
| 2039931d85 | |||
| 89b12cef01 | |||
| fdca6fc95d | |||
| 7d31bac1cc | |||
| 7c06520f8f | |||
| 3fe6cc023c | |||
| 7702b0a9ab | |||
| a82ddb2d7a | |||
| dc25b605e4 | |||
| b37acce1c7 | |||
| 2cdf902b57 | |||
| f7dcb3afa8 | |||
| b9a6b66d6e | |||
| fda3ed8cdf | |||
| cca714a7f9 | |||
| 4e9ceb0e09 | |||
| c3ad7cea1e | |||
| 2279ee1016 | |||
| 384cb09645 | |||
| db47a4a6f2 | |||
| 92aa760dcf | |||
| 0a02b20de3 | |||
| 33a6f752ae | |||
| 6c3b2b953e | |||
| 209181c369 | |||
| 0ae61c7758 | |||
| a0a6c942fe | |||
| 4b400d05d5 | |||
| b1ad1c79f5 | |||
| 190dfa8885 | |||
| 296d55f47e | |||
| c8cd3d06b6 | |||
| 9ebfce1e36 | |||
| a43628d06c | |||
| 81a696a914 | |||
| 382445dc4d | |||
| 393d62c726 | |||
| 2bf30dc89f | |||
| 3ced500c87 | |||
| 711645cd86 | |||
| 2101045119 | |||
| e8db797b52 | |||
| c768d039d1 | |||
| 80f173e96c | |||
| 61b4cdb9a2 | |||
| 4813afd988 | |||
| 1b938fd484 | |||
| 2e80aec5cb | |||
| f81fcfe6f8 | |||
| d43545e65a | |||
| 5e724d5b15 | |||
| c7c64e3be2 | |||
| 6fe6735927 | |||
| bd194dea75 | |||
| c5a783bd71 | |||
| 4f3b6f8e54 | |||
| 1736fe3f87 | |||
| 07eccc4f71 | |||
| 0a9fabe146 | |||
| bd7957f01c | |||
| d4d84a592c | |||
| 5174c9a067 | |||
| 2a650bfd14 | |||
| 4471e3654c | |||
| 64c3f36806 | |||
| c62da84438 | |||
| 6c2b51a621 | |||
| 6def45b751 | |||
| b79df46e0d | |||
| ff490b67ad | |||
| 9de06769d3 | |||
| 5b3d2ff035 | |||
| 9b2ce4240c | |||
| 6a187dcbd7 | |||
| 2e9516398d | |||
| 3fd1486a74 | |||
| 094f982df1 | |||
| d60667d141 | |||
| 8ae2e37955 | |||
| 34ac769260 | |||
| 3ac0559357 | |||
| 81d2ce68ec | |||
| 27510e61c7 | |||
| c0139f3309 | |||
| 9804031d9b | |||
| 23be606516 | |||
| 33661ef4f3 | |||
| 37811a1581 | |||
| 118aa96274 | |||
| a02e87833d | |||
| 5cece2776a | |||
| efaab49e47 | |||
| 59fc274fb7 | |||
| 6d559b4f4a | |||
| c96e2736f8 | |||
| b3134665e8 | |||
| 28da85061b | |||
| e61394a97a | |||
| 21dfe7f2fc | |||
| 4b7275efc4 | |||
| 230e85be37 | |||
| 441ebb39b9 | |||
| 2608db3a38 | |||
| 03343272b7 | |||
| 3014284e95 | |||
| c89c13038a | |||
| 18ad26f98d | |||
| 418bac9190 | |||
| 63d18d725b | |||
| 8bacde7e63 | |||
| ebcbf6ed50 | |||
| da1ee4604e | |||
| 859b780b46 | |||
| 7e78cbf270 | |||
| 3db55b90c7 | |||
| 2d4b183fce | |||
| 0fb4219690 | |||
| e04f126a10 | |||
| 538329d9b4 | |||
| fdd295d96a | |||
| 0863146f07 | |||
| b90d1164f5 | |||
| d420a63e25 | |||
| 136db163fa | |||
| 7f477541ba | |||
| c9b75fe115 | |||
| 1f22f76a81 | |||
| e10928bb4a | |||
| 553e852517 | |||
| 9fc25786f1 | |||
| ce4cbaa7a9 | |||
| 8d3bffdb6c | |||
| 47838d143b | |||
| 5fc8ba7636 | |||
| 72fec559c5 | |||
| 6b6ad39958 | |||
| d7308203a9 | |||
| bae16b525d | |||
| 86953272a7 | |||
| 52fa4bbab4 | |||
| 59622bc41b | |||
| 848bf693a4 | |||
| a10e24b205 | |||
| 547e55f047 | |||
| 16f62d7904 | |||
| ac8c2fe024 | |||
| 7cdc230100 | |||
| 4fbab4e389 | |||
| 68d3f93228 | |||
| ef967271e6 | |||
| a85f65473d | |||
| 43006910c5 | |||
| 107bf94c24 | |||
| d77d582bf2 | |||
| 739ab1ebf2 | |||
| b9e1ad1ad9 | |||
| db48cf7a5a | |||
| 77f2f56481 | |||
| 6dd1190ca1 | |||
| 48f1f756f8 | |||
| 076a9e6b8e | |||
| e71fefb912 | |||
| 966f6059b5 | |||
| d2366ddb9c | |||
| 6f1d19470e | |||
| f371a73809 | |||
| b1dde95053 | |||
| ef1521bce2 | |||
| aabc786dab | |||
| 0f3c8ca194 | |||
| f38c2a09e4 | |||
| 71e8a47a03 | |||
| 955a0f7a33 | |||
| 4369c92d40 | |||
| b22cae8c4b | |||
| 05ee3a750f | |||
| ff75887342 | |||
| 2119938692 | |||
| 38fce2e6b0 | |||
| 1745392909 | |||
| 1a8aa96b7f | |||
| bfff44fddb | |||
| a18fe1808c | |||
| 185a8f963c | |||
| 3ebf6cafc2 | |||
| 9995eb7922 | |||
| a98908f05e | |||
| e09b821c42 | |||
| d09f71720e | |||
| e70454956f | |||
| 532efaadfe | |||
| 4011c05827 | |||
| 186f8ac881 | |||
| 6fff12796e | |||
| 1876dbd65b | |||
| 7e3af6a866 | |||
| 76b73342b2 | |||
| efb16dd9ca | |||
| 32aca11c4a | |||
| 0ea16e2641 | |||
| e9e090e97e | |||
| e01abaac3b | |||
| 465e6fc4be | |||
| 7347d2c195 | |||
| e6a921b5b2 | |||
| 1d965a9d24 | |||
| db86a93824 | |||
| fb90d5b863 | |||
| de24edb8bf | |||
| 2fa008c1b1 | |||
| 0577dfc5b4 | |||
| aef8dc637a | |||
| c3cc40d2ac | |||
| 589576d3eb | |||
| bbdb584f45 | |||
| 0b184c3ccb | |||
| aaf4c17122 | |||
| 5efb78bcd3 | |||
| 31289e0e20 | |||
| 95829a02d4 | |||
| 3e66ac4a54 | |||
| dcf66659d0 | |||
| 52b0e6512a | |||
| 0ab6313e83 | |||
| 5a26355b0e | |||
| 6e24358052 | |||
| 65f29754d3 | |||
| e680540cfc | |||
| 6ca911b9fe | |||
| b99d3b8e24 | |||
| ab99e759a7 | |||
| 865ae4f439 | |||
| 7c1fe67c19 | |||
| 00dce0ca46 | |||
| d1fd7ebaae | |||
| 5f2eafe5b1 | |||
| bf55a9478a | |||
| 1a7e7b2eb7 | |||
| b43c678d94 | |||
| 568d057032 | |||
| f4ddaa0d60 | |||
| f47fdc5912 | |||
| 21d6454d07 | |||
| f38969a9cf | |||
| 93ea7142af | |||
| b71861e7c7 | |||
| 4ee6e6ce3f | |||
| 08b5ad94fd | |||
| 31ab8aa0c5 | |||
| 68be67b0be | |||
| 19cf0a9e80 | |||
| a84a3af002 | |||
| 4f46411403 | |||
| 0d573ac5ea | |||
| 0965667807 | |||
| 9a4c1b5cdb | |||
| 0da178780f | |||
| 412cedab78 | |||
| 2540e5d6d5 | |||
| e16b560f63 | |||
| 8c51f6f2e8 | |||
| 91bee35003 | |||
| aab9277775 | |||
| 566d95d81b | |||
| 7e32fd952e | |||
| 6aa2bab97e | |||
| 682f49abdb | |||
| 360c7942f6 | |||
| 0fd6f05da4 | |||
| 8985499c95 | |||
| 0b6ffca35d |
@@ -1,14 +1,7 @@
|
||||
[advisories]
|
||||
ignore = [
|
||||
# Out-of-bounds write in nix::unistd::getgrouplist
|
||||
# Tracked in #3140
|
||||
"RUSTSEC-2021-0119",
|
||||
# Potential segfault in the time crate
|
||||
# chrono dependency, but vulnerable function is never called
|
||||
# Tacked in #3163
|
||||
"RUSTSEC-2020-0071",
|
||||
# chrono: Potential segfault in localtime_r invocations
|
||||
# starship avoids setting any environment variables to avoid this issue
|
||||
# Tracked in #3166
|
||||
"RUSTSEC-2020-0159",
|
||||
]
|
||||
# Potential segfault in the time crate
|
||||
# chrono dependency, but vulnerable function is never called
|
||||
# Tacked in #3163
|
||||
"RUSTSEC-2020-0071",
|
||||
]
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
comment: false
|
||||
coverage:
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
target: auto
|
||||
threshold: 5%
|
||||
patch:
|
||||
default:
|
||||
target: auto
|
||||
threshold: 5%
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"incremental": true,
|
||||
"typescript": {
|
||||
"indentWidth": 4
|
||||
},
|
||||
"json": {},
|
||||
"markdown": {
|
||||
"lineWidth": 100
|
||||
},
|
||||
"toml": {},
|
||||
"includes": [
|
||||
"docs/**/*.{ts,js,cjs,mjs}",
|
||||
"**/*.{md,toml,json}"
|
||||
],
|
||||
"excludes": [
|
||||
"CHANGELOG.md",
|
||||
"docs/.vuepress/dist/**",
|
||||
"**/node_modules",
|
||||
"**/*-lock.json",
|
||||
".github/*",
|
||||
"docs/ar-SA/**",
|
||||
"docs/ckb-IR/**",
|
||||
"docs/de-DE/**",
|
||||
"docs/es-ES/**",
|
||||
"docs/fr-FR/**",
|
||||
"docs/id-ID/**",
|
||||
"docs/it-IT/**",
|
||||
"docs/ja-JP/**",
|
||||
"docs/ko-KR/**",
|
||||
"docs/nl-NL/**",
|
||||
"docs/pl-PL/**",
|
||||
"docs/pt-BR/**",
|
||||
"docs/pt-PT/**",
|
||||
"docs/ru-RU/**",
|
||||
"docs/tr-TR/**",
|
||||
"docs/vi-VN/**",
|
||||
"docs/zh-CN/**",
|
||||
"docs/zh-TW/**",
|
||||
"target/"
|
||||
],
|
||||
"plugins": [
|
||||
"https://plugins.dprint.dev/typescript-0.68.2.wasm",
|
||||
"https://plugins.dprint.dev/json-0.15.2.wasm",
|
||||
"https://plugins.dprint.dev/markdown-0.13.2.wasm",
|
||||
"https://plugins.dprint.dev/toml-0.5.4.wasm"
|
||||
]
|
||||
}
|
||||
@@ -1,2 +1,3 @@
|
||||
/src/init/* text eol=lf
|
||||
*.sh text eol=lf
|
||||
/.github/config-schema.json text eol=lf
|
||||
@@ -41,7 +41,7 @@ assignees: ''
|
||||
- Operating system: [e.g. macOS 10.13.4, Windows 10]
|
||||
|
||||
#### Relevant Shell Configuration
|
||||
<!--
|
||||
<!--
|
||||
Based on the shell you use, please paste the appropriate configuration.
|
||||
The default location for your shell is:
|
||||
Bash: ~/.bashrc
|
||||
@@ -49,7 +49,7 @@ assignees: ''
|
||||
Fish: ~/.config/fish/config.fish
|
||||
Xonsh: ~/.config/xonsh/rc.xsh
|
||||
Elvish: ~/.config/elvish/rc.elv
|
||||
Nushell: ~/.config/nu/config.toml
|
||||
Nushell: $nu.config-path
|
||||
Ion: ~/.config/ion/initrc
|
||||
-->
|
||||
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
{{ if .Versions -}}
|
||||
<a name="unreleased"></a>
|
||||
## [Unreleased]
|
||||
|
||||
{{ if .Unreleased.CommitGroups -}}
|
||||
{{ range .Unreleased.CommitGroups -}}
|
||||
### {{ .Title }}
|
||||
{{ range .Commits -}}
|
||||
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ range .Versions }}
|
||||
<a name="{{ .Tag.Name }}"></a>
|
||||
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
|
||||
{{ range .CommitGroups -}}
|
||||
### {{ .Title }}
|
||||
{{ range .Commits -}}
|
||||
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
{{- if .RevertCommits -}}
|
||||
### Reverts
|
||||
{{ range .RevertCommits -}}
|
||||
- {{ .Revert.Header }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
{{- if .NoteGroups -}}
|
||||
{{ range .NoteGroups -}}
|
||||
### {{ .Title }}
|
||||
{{ range .Notes }}
|
||||
{{ .Body }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{- if .Versions }}
|
||||
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
|
||||
{{ range .Versions -}}
|
||||
{{ if .Tag.Previous -}}
|
||||
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
@@ -1,29 +0,0 @@
|
||||
{{ range .Versions }}
|
||||
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
|
||||
|
||||
{{ range .CommitGroups -}}
|
||||
### {{ .Title }}
|
||||
|
||||
{{ range .Commits -}}
|
||||
* {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
{{- if .RevertCommits -}}
|
||||
### Reverts
|
||||
|
||||
{{ range .RevertCommits -}}
|
||||
* {{ .Revert.Header }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
{{- if .NoteGroups -}}
|
||||
{{ range .NoteGroups -}}
|
||||
### {{ .Title }}
|
||||
|
||||
{{ range .Notes }}
|
||||
{{ .Body }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
@@ -1,37 +0,0 @@
|
||||
---
|
||||
style: github
|
||||
template: CHANGELOG.tpl.md
|
||||
info:
|
||||
title: CHANGELOG
|
||||
repository_url: https://github.com/starship/starship
|
||||
options:
|
||||
commits: {}
|
||||
commit_groups:
|
||||
sort_by: Custom
|
||||
title_order:
|
||||
- feat
|
||||
- fix
|
||||
- docs
|
||||
- style
|
||||
- refactor
|
||||
- perf
|
||||
- test
|
||||
- build
|
||||
- ci
|
||||
- chore
|
||||
- revert
|
||||
title_maps:
|
||||
feat: Features
|
||||
fix: Bug Fixes
|
||||
perf: Performance Improvements
|
||||
refactor: Code Refactoring
|
||||
ci: Continuous Integration
|
||||
header:
|
||||
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
|
||||
pattern_maps:
|
||||
- Type
|
||||
- Scope
|
||||
- Subject
|
||||
notes:
|
||||
keywords:
|
||||
- BREAKING CHANGE
|
||||
@@ -1,36 +0,0 @@
|
||||
---
|
||||
style: github
|
||||
template: RELEASE.tpl.md
|
||||
info:
|
||||
repository_url: https://github.com/starship/starship
|
||||
options:
|
||||
commits: {}
|
||||
commit_groups:
|
||||
sort_by: Custom
|
||||
title_order:
|
||||
- feat
|
||||
- fix
|
||||
- docs
|
||||
- style
|
||||
- refactor
|
||||
- perf
|
||||
- test
|
||||
- build
|
||||
- ci
|
||||
- chore
|
||||
- revert
|
||||
title_maps:
|
||||
feat: Features
|
||||
fix: Bug Fixes
|
||||
perf: Performance Improvements
|
||||
refactor: Code Refactoring
|
||||
ci: Continuous Integration
|
||||
header:
|
||||
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
|
||||
pattern_maps:
|
||||
- Type
|
||||
- Scope
|
||||
- Subject
|
||||
notes:
|
||||
keywords:
|
||||
- BREAKING CHANGE
|
||||
@@ -0,0 +1,15 @@
|
||||
# Run pre-translate with translation memory, all files/langs, at midnight daily.
|
||||
name: Crowdin Updates
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
trigger_crowdin_tm:
|
||||
name: Crowdin Translation Memory Trigger
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: starship/crowdin-pretranslate-action@v0.1.1
|
||||
with:
|
||||
project_id: 372655
|
||||
api_key: ${{ secrets.CROWDIN_API_TOKEN }}
|
||||
@@ -1,197 +0,0 @@
|
||||
name: Deploy
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
# Build sources for every OS
|
||||
github_build:
|
||||
name: Build release binaries
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-latest
|
||||
name: starship-x86_64-unknown-linux-gnu.tar.gz
|
||||
|
||||
- target: x86_64-unknown-linux-musl
|
||||
os: ubuntu-latest
|
||||
name: starship-x86_64-unknown-linux-musl.tar.gz
|
||||
|
||||
- target: i686-unknown-linux-musl
|
||||
os: ubuntu-latest
|
||||
name: starship-i686-unknown-linux-musl.tar.gz
|
||||
|
||||
- target: aarch64-unknown-linux-musl
|
||||
os: ubuntu-latest
|
||||
name: starship-aarch64-unknown-linux-musl.tar.gz
|
||||
|
||||
- target: arm-unknown-linux-musleabihf
|
||||
os: ubuntu-latest
|
||||
name: starship-arm-unknown-linux-musleabihf.tar.gz
|
||||
|
||||
- target: x86_64-apple-darwin
|
||||
os: macOS-11
|
||||
name: starship-x86_64-apple-darwin.tar.gz
|
||||
|
||||
- target: aarch64-apple-darwin
|
||||
os: macOS-11
|
||||
name: starship-aarch64-apple-darwin.tar.gz
|
||||
|
||||
- target: x86_64-pc-windows-msvc
|
||||
os: windows-latest
|
||||
name: starship-x86_64-pc-windows-msvc.zip
|
||||
|
||||
- target: i686-pc-windows-msvc
|
||||
os: windows-latest
|
||||
name: starship-i686-pc-windows-msvc.zip
|
||||
|
||||
- target: aarch64-pc-windows-msvc
|
||||
os: windows-latest
|
||||
name: starship-aarch64-pc-windows-msvc.zip
|
||||
|
||||
- target: x86_64-unknown-freebsd
|
||||
os: ubuntu-latest
|
||||
name: starship-x86_64-unknown-freebsd.tar.gz
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v2.4.0
|
||||
|
||||
# Cache files between builds
|
||||
- name: Setup | Cache Cargo
|
||||
uses: actions/cache@v2.1.7
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: Setup | Rust
|
||||
uses: actions-rs/toolchain@v1.0.7
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
profile: minimal
|
||||
target: ${{ matrix.target }}
|
||||
|
||||
- name: Build | Build
|
||||
uses: actions-rs/cargo@v1.0.3
|
||||
with:
|
||||
command: build
|
||||
args: --release --locked --target ${{ matrix.target }}
|
||||
use-cross: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
|
||||
- name: Post Build | Prepare artifacts [Windows]
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: |
|
||||
cd target/${{ matrix.target }}/release
|
||||
strip starship.exe
|
||||
7z a ../../../${{ matrix.name }} starship.exe
|
||||
cd -
|
||||
|
||||
- name: Post Build | Prepare artifacts [-nix]
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: |
|
||||
cd target/${{ matrix.target }}/release
|
||||
# TODO: investigate better cross platform stripping
|
||||
strip starship || true
|
||||
tar czvf ../../../${{ matrix.name }} starship
|
||||
cd -
|
||||
|
||||
- name: Deploy | Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.name }}
|
||||
path: ${{ matrix.name }}
|
||||
|
||||
# Create GitHub release with Rust build targets and release notes
|
||||
github_release:
|
||||
name: Create GitHub Release
|
||||
needs: github_build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v2.4.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup | Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: "1.16"
|
||||
|
||||
- name: Setup | Artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
|
||||
- name: Setup | Checksums
|
||||
run: for file in starship-*/starship-*; do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
|
||||
|
||||
- name: Setup | Release notes
|
||||
run: |
|
||||
go install github.com/git-chglog/git-chglog/cmd/git-chglog@v0.15.0
|
||||
git-chglog -c .github/chglog/release.yml $(git describe --tags) > RELEASE.md
|
||||
|
||||
- name: Build | Publish
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: starship-*/starship-*
|
||||
body_path: RELEASE.md
|
||||
|
||||
# Publish starship to Crates.io
|
||||
cargo_publish:
|
||||
name: Publish Cargo Package
|
||||
runs-on: ubuntu-latest
|
||||
needs: github_release
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v2.4.0
|
||||
|
||||
- name: Setup | Rust
|
||||
uses: actions-rs/toolchain@v1.0.7
|
||||
with:
|
||||
toolchain: stable
|
||||
profile: minimal
|
||||
override: true
|
||||
|
||||
- name: Build | Publish
|
||||
run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}
|
||||
|
||||
update_brew_formula:
|
||||
name: Update Brew Formula
|
||||
runs-on: ubuntu-latest
|
||||
needs: github_release
|
||||
steps:
|
||||
- uses: mislav/bump-homebrew-formula-action@v1.16
|
||||
with:
|
||||
formula-name: starship
|
||||
env:
|
||||
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||
|
||||
publish_docs:
|
||||
name: Publish docs to Netlify
|
||||
runs-on: ubuntu-latest
|
||||
needs: github_release
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v2.4.0
|
||||
|
||||
- name: Setup | Install dependencies
|
||||
run: npm install
|
||||
working-directory: docs
|
||||
|
||||
- name: Build | Build docs site
|
||||
run: npm run build
|
||||
working-directory: docs
|
||||
|
||||
- name: Publish
|
||||
uses: netlify/actions/cli@master
|
||||
with:
|
||||
args: deploy --prod --dir=docs/.vuepress/dist
|
||||
env:
|
||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
@@ -0,0 +1,42 @@
|
||||
name: Format + Docs Workflow
|
||||
on:
|
||||
push:
|
||||
paths: ["docs/**", "**.md", "**.toml", "**.js", "**.json", "**.ts"]
|
||||
pull_request:
|
||||
paths: ["docs/**", "**.md", "**.toml", "**.js", "**.json", "**.ts"]
|
||||
|
||||
jobs:
|
||||
# Run the dprint code formatter for documentation
|
||||
dprint:
|
||||
name: Dprint [Docs Formatter]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Docs | Format
|
||||
uses: dprint/check@v2.1
|
||||
|
||||
# Validate preset files
|
||||
taplo:
|
||||
name: Taplo [Preset schema validation]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Install | Taplo
|
||||
run: cargo install --debug --locked --version 0.6.3 taplo-cli
|
||||
- name: Presets | Validate with schema
|
||||
run: taplo lint --schema "file://${GITHUB_WORKSPACE}/.github/config-schema.json" docs/.vuepress/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' }}
|
||||
steps:
|
||||
- name: Prevent File Change
|
||||
uses: xalvarez/prevent-file-change-action@v1.2.0
|
||||
if: ${{ github.event.pull_request.head.ref != 'i18n_master' }}
|
||||
with:
|
||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
pattern: docs/[a-z][a-z][a-z]?-[A-Z][A-Z]?/.*
|
||||
@@ -0,0 +1,363 @@
|
||||
name: Release
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
env:
|
||||
CARGO_INCREMENTAL: 0
|
||||
CARGO_NET_RETRY: 10
|
||||
RUST_BACKTRACE: short
|
||||
RUSTUP_MAX_RETRIES: 10
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.7
|
||||
|
||||
jobs:
|
||||
# Update release PR
|
||||
release_please:
|
||||
name: Release Please
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'starship/starship'
|
||||
outputs:
|
||||
release_created: ${{ steps.release.outputs.release_created }}
|
||||
tag_name: ${{ steps.release.outputs.tag_name }}
|
||||
steps:
|
||||
- uses: google-github-actions/release-please-action@v3
|
||||
id: release
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
release-type: rust
|
||||
draft: true
|
||||
|
||||
# Build sources for every OS
|
||||
github_build:
|
||||
name: Build release binaries
|
||||
needs: release_please
|
||||
if: ${{ needs.release_please.outputs.release_created == 'true' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-latest
|
||||
name: starship-x86_64-unknown-linux-gnu.tar.gz
|
||||
|
||||
- target: x86_64-unknown-linux-musl
|
||||
os: ubuntu-latest
|
||||
name: starship-x86_64-unknown-linux-musl.tar.gz
|
||||
|
||||
- target: i686-unknown-linux-musl
|
||||
os: ubuntu-latest
|
||||
name: starship-i686-unknown-linux-musl.tar.gz
|
||||
|
||||
- target: aarch64-unknown-linux-musl
|
||||
os: ubuntu-latest
|
||||
name: starship-aarch64-unknown-linux-musl.tar.gz
|
||||
|
||||
- target: arm-unknown-linux-musleabihf
|
||||
os: ubuntu-latest
|
||||
name: starship-arm-unknown-linux-musleabihf.tar.gz
|
||||
|
||||
- target: x86_64-apple-darwin
|
||||
os: macOS-11
|
||||
name: starship-x86_64-apple-darwin.tar.gz
|
||||
|
||||
- target: aarch64-apple-darwin
|
||||
os: macOS-11
|
||||
name: starship-aarch64-apple-darwin.tar.gz
|
||||
|
||||
- target: x86_64-pc-windows-msvc
|
||||
os: windows-latest
|
||||
name: starship-x86_64-pc-windows-msvc.zip
|
||||
rustflags: -C target-feature=+crt-static
|
||||
|
||||
- target: i686-pc-windows-msvc
|
||||
os: windows-latest
|
||||
name: starship-i686-pc-windows-msvc.zip
|
||||
rustflags: -C target-feature=+crt-static
|
||||
|
||||
- target: aarch64-pc-windows-msvc
|
||||
os: windows-latest
|
||||
name: starship-aarch64-pc-windows-msvc.zip
|
||||
rustflags: -C target-feature=+crt-static
|
||||
|
||||
- target: x86_64-unknown-freebsd
|
||||
os: ubuntu-latest
|
||||
name: starship-x86_64-unknown-freebsd.tar.gz
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: true
|
||||
env:
|
||||
RUSTFLAGS: ${{ matrix.rustflags || '' }}
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup | Rust
|
||||
uses: actions-rs/toolchain@v1.0.7
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
profile: minimal
|
||||
target: ${{ matrix.target }}
|
||||
|
||||
- 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'
|
||||
run: cargo install --version 0.3.2 cargo-wix
|
||||
env:
|
||||
# cargo-wix does not require static crt
|
||||
RUSTFLAGS: ''
|
||||
|
||||
- name: Build | Build
|
||||
uses: actions-rs/cargo@v1.0.3
|
||||
with:
|
||||
command: build
|
||||
args: --release --locked --target ${{ matrix.target }}
|
||||
use-cross: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
|
||||
- name: Build | Installer [Windows]
|
||||
continue-on-error: true
|
||||
if: matrix.os == 'windows-latest' && matrix.target != 'aarch64-pc-windows-msvc'
|
||||
uses: actions-rs/cargo@v1.0.3
|
||||
with:
|
||||
command: wix
|
||||
args: -v --no-build --nocapture -I install/windows/main.wxs --target ${{ matrix.target }} --output target/wix/starship-${{ matrix.target }}.msi
|
||||
|
||||
- name: Post Build | Prepare artifacts [Windows]
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: |
|
||||
cd target/${{ matrix.target }}/release
|
||||
7z a ../../../${{ matrix.name }} starship.exe
|
||||
cd -
|
||||
|
||||
- name: Post Build | Prepare artifacts [-nix]
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: |
|
||||
cd target/${{ matrix.target }}/release
|
||||
tar czvf ../../../${{ matrix.name }} starship
|
||||
cd -
|
||||
|
||||
- name: Release | Upload artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
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
|
||||
with:
|
||||
name: starship-${{ matrix.target }}.msi
|
||||
path: target/wix/starship-${{ matrix.target }}.msi
|
||||
|
||||
# Notarize starship binaries for MacOS and build notarized pkg installers
|
||||
notarize_and_pkgbuild:
|
||||
runs-on: macos-latest
|
||||
continue-on-error: true
|
||||
needs: [github_build, merge_crowdin_pr]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: x86_64-apple-darwin
|
||||
arch: x86_64
|
||||
name: starship-x86_64-apple-darwin.tar.gz
|
||||
pkgname: starship-x86_64-apple-darwin.pkg
|
||||
|
||||
- target: aarch64-apple-darwin
|
||||
arch: aarch64
|
||||
name: starship-aarch64-apple-darwin.tar.gz
|
||||
pkgname: starship-aarch64-apple-darwin.pkg
|
||||
|
||||
env:
|
||||
KEYCHAIN_FILENAME: app-signing.keychain-db
|
||||
KEYCHAIN_ENTRY: AC_PASSWORD
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# Required to include the recently merged Crowdin PR
|
||||
ref: master
|
||||
|
||||
- name: Notarize | Set up secrets
|
||||
env:
|
||||
APP_CERTIFICATE_BASE64: ${{ secrets.APPLEDEV_APPSIGNKEY_BASE64 }}
|
||||
INSTALL_CERTIFICATE_BASE64: ${{ secrets.APPLEDEV_INSTALLERSIGNKEY_BASE64 }}
|
||||
P12_PASSWORD: ${{ secrets.APPLEDEV_SIGNKEY_PASS }}
|
||||
KEYCHAIN_PASSWORD: ${{ secrets.APPLEDEV_SIGNKEY_PASS }}
|
||||
APPLEID_USERNAME: ${{ secrets.APPLEDEV_ID_NAME }}
|
||||
APPLEID_TEAMID: ${{ secrets.APPLEDEV_TEAM_ID }}
|
||||
APPLEID_PASSWORD: ${{ secrets.APPLEDEV_PASSWORD }}
|
||||
run: |
|
||||
APP_CERTIFICATE_PATH="$RUNNER_TEMP/app_certificate.p12"
|
||||
INSTALL_CERTIFICATE_PATH="$RUNNER_TEMP/install_certificate.p12"
|
||||
KEYCHAIN_PATH="$RUNNER_TEMP/$KEYCHAIN_FILENAME"
|
||||
|
||||
# import certificates from secrets
|
||||
echo -n "$APP_CERTIFICATE_BASE64" | base64 --decode --output $APP_CERTIFICATE_PATH
|
||||
echo -n "$INSTALL_CERTIFICATE_BASE64" | base64 --decode --output $INSTALL_CERTIFICATE_PATH
|
||||
|
||||
# create temporary keychain
|
||||
security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
|
||||
security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"
|
||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
|
||||
|
||||
# import certificates to keychain
|
||||
security import $APP_CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||
security import $INSTALL_CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||
|
||||
# Add Apple Developer ID credentials to keychain
|
||||
xcrun notarytool store-credentials "$KEYCHAIN_ENTRY" --team-id "$APPLEID_TEAMID" --apple-id "$APPLEID_USERNAME" --password "$APPLEID_PASSWORD" --keychain "$KEYCHAIN_PATH"
|
||||
|
||||
- name: Notarize | Build docs
|
||||
run: |
|
||||
cd docs
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
- name: Notarize | Download artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.name }}
|
||||
path: artifacts
|
||||
|
||||
- name: Notarize | Unpack Binaries
|
||||
run: tar xf artifacts/${{ matrix.name }}
|
||||
|
||||
- name: Notarize | Build, Sign, and Notarize Pkg
|
||||
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
|
||||
with:
|
||||
name: ${{ matrix.pkgname }}
|
||||
path: ${{ matrix.pkgname }}
|
||||
|
||||
- name: Notarize | Package Notarized Binary
|
||||
run: tar czvf ${{ matrix.name }} starship
|
||||
|
||||
- name: Notarize | Upload Notarized Binary
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.name }}
|
||||
path: ${{ matrix.name }}
|
||||
|
||||
- name: Cleanup Secrets
|
||||
if: ${{ always() }}
|
||||
run: |
|
||||
KEYCHAIN_PATH="$RUNNER_TEMP/$KEYCHAIN_FILENAME"
|
||||
security delete-keychain $KEYCHAIN_PATH
|
||||
|
||||
# Create GitHub release with Rust build targets and release notes
|
||||
upload_artifacts:
|
||||
name: Add Build Artifacts to Release
|
||||
needs: [release_please, github_build, notarize_and_pkgbuild]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
|
||||
- name: Setup | Checksums
|
||||
run: for file in starship-*/starship-*; do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
|
||||
|
||||
- name: Setup | Publish Release
|
||||
run: gh release edit ${{ needs.release_please.outputs.tag_name }} --draft=false --repo=starship/starship
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build | Add Artifacts to Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: starship-*/starship-*
|
||||
tag_name: ${{ needs.release_please.outputs.tag_name }}
|
||||
|
||||
# Publish starship to Crates.io
|
||||
cargo_publish:
|
||||
name: Publish Cargo Package
|
||||
runs-on: ubuntu-latest
|
||||
needs: release_please
|
||||
if: ${{ needs.release_please.outputs.release_created == 'true' }}
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup | Rust
|
||||
uses: actions-rs/toolchain@v1.0.7
|
||||
with:
|
||||
toolchain: stable
|
||||
profile: minimal
|
||||
override: true
|
||||
|
||||
- name: Build | Publish
|
||||
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||
|
||||
update_brew_formula:
|
||||
name: Update Brew Formula
|
||||
runs-on: ubuntu-latest
|
||||
needs: release_please
|
||||
if: ${{ needs.release_please.outputs.release_created == 'true' }}
|
||||
steps:
|
||||
- uses: mislav/bump-homebrew-formula-action@v2.1
|
||||
with:
|
||||
formula-name: starship
|
||||
tag-name: ${{ needs.release_please.outputs.tag_name }}
|
||||
env:
|
||||
# Used for creating the formula update PR
|
||||
COMMITTER_TOKEN: ${{ secrets.GH_PAT }}
|
||||
# Used for verifying the SHA256 sum of the draft release
|
||||
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
|
||||
|
||||
winget_update:
|
||||
name: Update Winget Manifest
|
||||
runs-on: windows-latest
|
||||
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
|
||||
steps:
|
||||
- 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 }}
|
||||
|
||||
merge_crowdin_pr:
|
||||
name: Merge Crowdin PR
|
||||
runs-on: ubuntu-latest
|
||||
needs: release_please
|
||||
if: ${{ needs.release_please.outputs.release_created == 'true' }}
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Merge | Merge Crowdin PR
|
||||
run: gh pr merge i18n_master --squash --repo=starship/starship
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
publish_docs:
|
||||
name: Publish docs to Netlify
|
||||
runs-on: ubuntu-latest
|
||||
needs: merge_crowdin_pr
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# Required to include the recently merged Crowdin PR
|
||||
ref: master
|
||||
|
||||
- name: Setup | Install dependencies
|
||||
run: npm install
|
||||
working-directory: docs
|
||||
|
||||
- name: Build | Build docs site
|
||||
run: npm run build
|
||||
working-directory: docs
|
||||
|
||||
- name: Publish
|
||||
uses: netlify/actions/cli@master
|
||||
with:
|
||||
args: deploy --prod --dir=docs/.vuepress/dist
|
||||
env:
|
||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
@@ -16,7 +16,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v2.4.0
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup | Rust
|
||||
uses: actions-rs/toolchain@v1.0.7
|
||||
with:
|
||||
|
||||
@@ -9,6 +9,14 @@ on:
|
||||
- "docs/**"
|
||||
- "**.md"
|
||||
|
||||
env:
|
||||
CARGO_INCREMENTAL: 0
|
||||
CARGO_NET_RETRY: 10
|
||||
RUST_BACKTRACE: short
|
||||
RUSTFLAGS: "-D warnings"
|
||||
RUSTUP_MAX_RETRIES: 10
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.7
|
||||
|
||||
jobs:
|
||||
# Run the `rustfmt` code formatter
|
||||
rustfmt:
|
||||
@@ -16,7 +24,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v2.4.0
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup | Rust
|
||||
uses: actions-rs/toolchain@v1.0.7
|
||||
@@ -26,9 +34,6 @@ jobs:
|
||||
profile: minimal
|
||||
components: rustfmt
|
||||
|
||||
- name: Setup | libdbus (ubuntu)
|
||||
run: sudo apt-get install libdbus-1-dev
|
||||
|
||||
- name: Build | Format
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
@@ -41,15 +46,11 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v2.4.0
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup | Cache
|
||||
uses: Swatinem/rust-cache@v1
|
||||
|
||||
- name: Setup | libdbus (ubuntu)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: sudo apt-get install libdbus-1-dev
|
||||
|
||||
- name: Setup | Rust
|
||||
uses: actions-rs/toolchain@v1.0.7
|
||||
with:
|
||||
@@ -70,7 +71,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v2.4.0
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup | Cache
|
||||
uses: Swatinem/rust-cache@v1
|
||||
@@ -85,6 +86,75 @@ jobs:
|
||||
- name: Build | Check
|
||||
run: cargo check --workspace --locked
|
||||
|
||||
# Ensure that the project could be successfully compiled with no features enabled
|
||||
cargo_check_no_features:
|
||||
name: Compile with no features enabled
|
||||
needs: cargo_check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup | Cache
|
||||
uses: Swatinem/rust-cache@v1
|
||||
|
||||
- name: Setup | Rust
|
||||
uses: actions-rs/toolchain@v1.0.7
|
||||
with:
|
||||
toolchain: stable
|
||||
profile: minimal
|
||||
override: true
|
||||
|
||||
- name: Build | Check
|
||||
run: cargo check --workspace --locked --no-default-features
|
||||
|
||||
# Ensure that the project could be successfully compiled with all features enabled
|
||||
cargo_check_all_features:
|
||||
name: Compile with all features enabled
|
||||
needs: cargo_check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup | Cache
|
||||
uses: Swatinem/rust-cache@v1
|
||||
|
||||
- name: Setup | Rust
|
||||
uses: actions-rs/toolchain@v1.0.7
|
||||
with:
|
||||
toolchain: stable
|
||||
profile: minimal
|
||||
override: true
|
||||
|
||||
- name: Build | Check
|
||||
run: cargo check --workspace --locked --all-features
|
||||
|
||||
# Check if config schema needs to be updated to reflect updated configuration options
|
||||
check_if_config_schema_up_to_date:
|
||||
name: Check if config schema is up to date
|
||||
needs: cargo_check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup | Cache
|
||||
uses: Swatinem/rust-cache@v1
|
||||
|
||||
- name: Setup | Rust
|
||||
uses: actions-rs/toolchain@v1.0.7
|
||||
with:
|
||||
toolchain: stable
|
||||
profile: minimal
|
||||
override: true
|
||||
|
||||
- name: Run | Generate Schema
|
||||
run: cargo run --locked --features config-schema -- config-schema > .github/config-schema.json
|
||||
|
||||
- name: Check | Detect Changes
|
||||
run: git diff --exit-code .github/config-schema.json
|
||||
|
||||
# Run tests on Linux, macOS, and Windows
|
||||
# On both Rust stable and Rust nightly
|
||||
test:
|
||||
@@ -96,13 +166,14 @@ jobs:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||
rust: [stable, nightly]
|
||||
include:
|
||||
- os: windows-latest
|
||||
rustflags: -C target-feature=+crt-static
|
||||
env:
|
||||
RUSTFLAGS: ${{ matrix.rustflags || '' }}
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v2.4.0
|
||||
|
||||
- name: Setup | libdbus (ubuntu)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: sudo apt-get install libdbus-1-dev
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup | Cache
|
||||
uses: Swatinem/rust-cache@v1
|
||||
@@ -112,9 +183,23 @@ jobs:
|
||||
uses: actions-rs/toolchain@v1.0.7
|
||||
with:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
components: llvm-tools-preview
|
||||
profile: minimal
|
||||
override: true
|
||||
|
||||
- name: Install cargo-llvm-cov
|
||||
uses: taiki-e/install-action@cargo-llvm-cov
|
||||
|
||||
# For windows installer test
|
||||
# On stable rust & main repo pushes only
|
||||
- name: Install cargo-wix [Windows]
|
||||
continue-on-error: true
|
||||
if: matrix.os == 'windows-latest' && matrix.rust == 'stable'
|
||||
run: cargo install --version 0.3.2 cargo-wix
|
||||
env:
|
||||
# cargo-wix does not require static crt
|
||||
RUSTFLAGS: ''
|
||||
|
||||
# Install Mercurial (pre-installed on Linux and windows)
|
||||
- name: Setup | Mercurial (macos)
|
||||
if: matrix.os == 'macOS-latest'
|
||||
@@ -122,4 +207,28 @@ jobs:
|
||||
|
||||
# Run the ignored tests that expect the above setup
|
||||
- name: Build | Test
|
||||
run: cargo test --workspace --locked --all-features -- -Z unstable-options --include-ignored
|
||||
run: "cargo llvm-cov
|
||||
--all-features
|
||||
--locked
|
||||
--workspace
|
||||
--lcov --output-path lcov.info
|
||||
-- --include-ignored"
|
||||
env:
|
||||
# Avoid -D warnings on nightly builds
|
||||
RUSTFLAGS: ""
|
||||
|
||||
- name: Build | Installer [Windows]
|
||||
continue-on-error: true
|
||||
if: matrix.os == 'windows-latest' && matrix.rust == 'stable'
|
||||
uses: actions-rs/cargo@v1.0.3
|
||||
with:
|
||||
command: wix
|
||||
args: --dbg-build -v --nocapture -I install/windows/main.wxs
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
if: github.repository == 'starship/starship'
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: lcov.info
|
||||
fail_ci_if_error: true
|
||||
|
||||
@@ -28,3 +28,6 @@ Cargo.lock
|
||||
# Compiled files for documentation
|
||||
docs/node_modules
|
||||
docs/.vuepress/dist/
|
||||
|
||||
# Ignore pkg files within the install directory
|
||||
install/**/*.pkg
|
||||
@@ -0,0 +1,158 @@
|
||||
# Changelog
|
||||
|
||||
## [1.10.0](https://github.com/starship/starship/compare/v1.9.1...v1.10.0) (2022-08-14)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add bun module ([#4187](https://github.com/starship/starship/issues/4187)) ([85692d1](https://github.com/starship/starship/commit/85692d1bf6a8477b6879adaf8b51007389df4328))
|
||||
* Add starship preset command ([#4112](https://github.com/starship/starship/issues/4112)) ([c8a5adb](https://github.com/starship/starship/commit/c8a5adb412e98b07017ffa0edea5554b0a23b840))
|
||||
* Add support for blink, hidden, and strikethrough styles. ([#4138](https://github.com/starship/starship/issues/4138)) ([aaab920](https://github.com/starship/starship/commit/aaab920f88015eb0a44e6514bf19b1db2b14829f))
|
||||
* Add the ability to have some file extensions *prevent* a module from triggering ([#4043](https://github.com/starship/starship/issues/4043)) ([dd73447](https://github.com/starship/starship/commit/dd73447329e637ee207b1103ecb6a4bdbdc89324))
|
||||
* Enable transience for Cmd and PowerShell ([#4143](https://github.com/starship/starship/issues/4143)) ([6e9c013](https://github.com/starship/starship/commit/6e9c013e60e59660cb7ae6289af5ed129ca85996))
|
||||
* **git:** replace `git2` with `git-repository` ([#3883](https://github.com/starship/starship/issues/3883)) ([ac55a01](https://github.com/starship/starship/commit/ac55a01d0ffe907ef7af48c9597c0bca4dbd8c69))
|
||||
* **k8s:** Add folder detection to the k8s module. ([#4157](https://github.com/starship/starship/issues/4157)) ([5c5969c](https://github.com/starship/starship/commit/5c5969c50b2490309b7ae9f7e6f5f75ea04a512d))
|
||||
* **package:** support cargo workspace versions ([#4161](https://github.com/starship/starship/issues/4161)) ([0a1235e](https://github.com/starship/starship/commit/0a1235e27944f152ca195c32e7eef8985d475989))
|
||||
* **status:** Add pipestatus_segment_format option to status module ([#4103](https://github.com/starship/starship/issues/4103)) ([6143848](https://github.com/starship/starship/commit/61438484bdc76601a185298f14337cfb4d5b4e0b))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **aws:** support official `AWS_SHARED_CREDENTIALS_FILE` variable ([#4242](https://github.com/starship/starship/issues/4242)) ([1390036](https://github.com/starship/starship/commit/13900368826cf1aca160fd650f19cecc1a047372))
|
||||
* **timings:** count time spent on custom on 'when' command failure ([#4121](https://github.com/starship/starship/issues/4121)) ([aae1ed0](https://github.com/starship/starship/commit/aae1ed04babf4c7d8baaad670c076947d7200675))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **pulumi:** allow disabling upwards discovery ([#4159](https://github.com/starship/starship/issues/4159)) ([af15de9](https://github.com/starship/starship/commit/af15de93c4494bb08d8c2cb3dbf54951f6bc9239))
|
||||
* **rust:** avoid calling `rustup` in more conditions ([#4174](https://github.com/starship/starship/issues/4174)) ([d8ac940](https://github.com/starship/starship/commit/d8ac940098eb16417742723c627d0de864597410))
|
||||
|
||||
|
||||
### Miscellaneous Chores
|
||||
|
||||
* **master:** release 1.10.0 ([b974610](https://github.com/starship/starship/commit/b9746100e2ee3746ea418e26ebc50494710a9d03))
|
||||
|
||||
## [1.9.1](https://github.com/starship/starship/compare/v1.9.0...v1.9.1) (2022-06-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* regenerate changelog ([8a6be8c](https://github.com/starship/starship/commit/8a6be8c941de8e31330417bdb232204969a814ff))
|
||||
|
||||
|
||||
### Miscellaneous Chores
|
||||
|
||||
* **master:** release 1.9.1 ([6cbc362](https://github.com/starship/starship/commit/6cbc3620c9ee7695fe1dabc067b6fd339b8d2526))
|
||||
|
||||
## [1.9.0](https://github.com/starship/starship/compare/v1.8.0...v1.9.0) (2022-06-26)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add Raku module ([#4048](https://github.com/starship/starship/issues/4048)) ([1a4fac6](https://github.com/starship/starship/commit/1a4fac63f78c9408756c19eb26af5181a7cf537e))
|
||||
* **winget:** Add support for winget package manager ([#4042](https://github.com/starship/starship/issues/4042)) ([ef52f9e](https://github.com/starship/starship/commit/ef52f9e77ec66f5189a18acfdce399882c37fdd8))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **character:** Standadise Vim config names ([#4081](https://github.com/starship/starship/issues/4081)) ([6761938](https://github.com/starship/starship/commit/67619386cdd7537f0ab9af77e701409e97a87917))
|
||||
* **install:** Have fixed a spacing issue in output ([#4082](https://github.com/starship/starship/issues/4082)) ([2ffe173](https://github.com/starship/starship/commit/2ffe1737f06db4ce89a21b2b5238f3ad76c94bca))
|
||||
|
||||
## [1.8.0](https://github.com/starship/starship/compare/v1.7.1...v1.8.0) (2022-06-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Add support for Daml ([#4004](https://github.com/starship/starship/issues/4004)) ([3fe6cc0](https://github.com/starship/starship/commit/3fe6cc023cd52917ae60a4d06ee6f1f78baa19e7))
|
||||
* **kubernetes:** add user alias ([#4008](https://github.com/starship/starship/issues/4008)) ([df5c2d8](https://github.com/starship/starship/commit/df5c2d8836622677460e34fa8082faa6b1a52835))
|
||||
* **release:** add windows msi installers ([#4031](https://github.com/starship/starship/issues/4031)) ([89fd532](https://github.com/starship/starship/commit/89fd5320af248207e8b253790bd191d8daa88dbe))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* escape text segments in meta variables ([#3563](https://github.com/starship/starship/issues/3563)) ([7d31bac](https://github.com/starship/starship/commit/7d31bac1cc3f39bd02f2e188e69283c566b816ed))
|
||||
* **fish:** add proper vi mode detection for fish shell ([#3839](https://github.com/starship/starship/issues/3839)) ([1469763](https://github.com/starship/starship/commit/146976351ec804ab1594d5262a1e0dd2d2de4972))
|
||||
* **install:** ignore tarfile ownership values when installing as root ([#4046](https://github.com/starship/starship/issues/4046)) ([1a91510](https://github.com/starship/starship/commit/1a91510beda1de2c3b149b7aacc0d76cf4652482))
|
||||
* **nu:** don't use `cygpath` for starship binary path in init ([#4001](https://github.com/starship/starship/issues/4001)) ([9b52475](https://github.com/starship/starship/commit/9b52475e541f751e8c650587cd8c1615fe00b1d0))
|
||||
* some typos ([e7c1976](https://github.com/starship/starship/commit/e7c19765282eb31daf85e5eba26e13828bc2f6c7))
|
||||
|
||||
### [1.7.1](https://github.com/starship/starship/compare/v1.7.0...v1.7.1) (2022-05-24)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* trigger release ([2cdf902](https://github.com/starship/starship/commit/2cdf902b57cd16dba42d4026e2e740537a82b0ee))
|
||||
|
||||
## [1.7.0](https://github.com/starship/starship/compare/v1.6.3...v1.7.0) (2022-05-24)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **go:** check for go.work file to show Go module in prompt ([#3968](https://github.com/starship/starship/issues/3968)) ([9ebfce1](https://github.com/starship/starship/commit/9ebfce1e366656bd1c199bb50cc7e1bd6cdb90ad))
|
||||
* **hostname:** add `ssh_symbol` for ssh connections ([#3806](https://github.com/starship/starship/issues/3806)) ([2bf30dc](https://github.com/starship/starship/commit/2bf30dc89fbce6f4da37657b8af6077f15a543d0))
|
||||
* **package:** Extract package version from PEP 621 compliant pyproject.toml ([#3950](https://github.com/starship/starship/issues/3950)) ([1b938fd](https://github.com/starship/starship/commit/1b938fd48420ceedf1e9886bd95ea738374680f7))
|
||||
* **rust:** Display toolchain names ([#3414](https://github.com/starship/starship/issues/3414)) ([393d62c](https://github.com/starship/starship/commit/393d62c726573a0e6c351f422dbef4b17a5944bf))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ci:** Version bump and fix Crowdin Pretranslate ([#3992](https://github.com/starship/starship/issues/3992)) ([a0a6c94](https://github.com/starship/starship/commit/a0a6c942fe3fc85d599aec883406224c9ecb589f))
|
||||
* Do not panic in config if editor not found ([#3766](https://github.com/starship/starship/issues/3766)) ([2e80aec](https://github.com/starship/starship/commit/2e80aec5cb6f7376359e7a25a76a492a98717554))
|
||||
* **module:** list option not working ([#3919](https://github.com/starship/starship/issues/3919)) ([6fe6735](https://github.com/starship/starship/commit/6fe6735927170b9f2aaa10cb84fa3a4d754e3bd6))
|
||||
* **nu:** use the most recent starship init ([#3908](https://github.com/starship/starship/issues/3908)) ([382445d](https://github.com/starship/starship/commit/382445dc4d21d190959f5582fb9b9febe056299a))
|
||||
* Use git2::Repository::open_ext() instead of discover() ([#3591](https://github.com/starship/starship/issues/3591)) ([81a696a](https://github.com/starship/starship/commit/81a696a914f6761d42b69f139018c3fa663ff197))
|
||||
|
||||
### [1.6.3](https://github.com/starship/starship/compare/v1.6.2...v1.6.3) (2022-04-26)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **git_branch:** correct variable name for remote branch ([#3897](https://github.com/starship/starship/issues/3897)) ([bd7957f](https://github.com/starship/starship/commit/bd7957f01c7fa2b14f068e4130f1aedea61f4a76))
|
||||
* **schema:** move config-schema into docs folder ([#3878](https://github.com/starship/starship/issues/3878)) ([094f982](https://github.com/starship/starship/commit/094f982df184eecd85ea2832b3bf638629118c10))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **package:** only try to read files that exist ([#3904](https://github.com/starship/starship/issues/3904)) ([2a650bf](https://github.com/starship/starship/commit/2a650bfd140d561f955705cae124fb254ec549a1))
|
||||
|
||||
|
||||
### Reverts
|
||||
|
||||
* **schema:** move config-schema back into .github folder ([#3886](https://github.com/starship/starship/issues/3886)) ([9b2ce42](https://github.com/starship/starship/commit/9b2ce4240c602df368f966996d870ef9197e65ac))
|
||||
|
||||
### [1.6.2](https://github.com/starship/starship/compare/v1.6.1...v1.6.2) (2022-04-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* trigger another release ([81d2ce6](https://github.com/starship/starship/commit/81d2ce68ec05ea77151639267115d4daf73f5019))
|
||||
|
||||
### [1.6.1](https://github.com/starship/starship/compare/v1.6.0...v1.6.1) (2022-04-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* fix release-please permissions ([23be606](https://github.com/starship/starship/commit/23be606516b5815fafea211aa59d2315ddb77df7))
|
||||
|
||||
## [1.6.0](https://github.com/starship/starship/compare/v1.5.4...v1.6.0) (2022-04-14)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Add a module for C projects ([#3631](https://github.com/starship/starship/issues/3631)) ([0863146](https://github.com/starship/starship/commit/0863146f072ae8382be63db26dcf9ddeff967aea))
|
||||
* allow printing config file schema ([#3737](https://github.com/starship/starship/issues/3737)) ([18ad26f](https://github.com/starship/starship/commit/18ad26f98dd1bfcc01e2b092a5b6165a7b093631))
|
||||
* **aws:** add option to force AWS display ([#3720](https://github.com/starship/starship/issues/3720)) ([e04f126](https://github.com/starship/starship/commit/e04f126a107eba2e40009f21942c14894385d6b0))
|
||||
* **cmd_duration:** make notify feature optional (compat with nix darwin) ([#3855](https://github.com/starship/starship/issues/3855)) ([efaab49](https://github.com/starship/starship/commit/efaab49e4753bee1ce90ad08311a1d4dc04052b8))
|
||||
* **spack:** Add `Spack` module ([#3639](https://github.com/starship/starship/issues/3639)) ([3014284](https://github.com/starship/starship/commit/3014284e952f75deae87973cbe2763b7a0a0aab5))
|
||||
* **username:** Detect Admin access in Windows ([#2791](https://github.com/starship/starship/issues/2791)) ([c89c130](https://github.com/starship/starship/commit/c89c13038a34a52291d253e6d4b15c0dd4aa5dfa))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bash:** ensure `checkwinsize` is enabled for `$COLUMNS` ([#3832](https://github.com/starship/starship/issues/3832)) ([0334327](https://github.com/starship/starship/commit/03343272b778260016216266facd190936f9e7d3))
|
||||
* **directory:** enable repo_root_style when truncation_length is zero. ([#3536](https://github.com/starship/starship/issues/3536)) ([441ebb3](https://github.com/starship/starship/commit/441ebb39b9cd451564959d259409d2395e7afb01))
|
||||
* **docker_context:** ignore the "default" context ([#3803](https://github.com/starship/starship/issues/3803)) ([#3804](https://github.com/starship/starship/issues/3804)) ([230e85b](https://github.com/starship/starship/commit/230e85be37a0fc12999d1e6ff1209e7d5f99ecd1))
|
||||
* **fish:** allow generating session keys in older versions of fish ([#3697](https://github.com/starship/starship/issues/3697)) ([0fb4219](https://github.com/starship/starship/commit/0fb421969058ec07a09f7c927dddc1258de75631))
|
||||
* **init:** Change Elvish init to `catch` for 0.18 ([#3769](https://github.com/starship/starship/issues/3769)) ([538329d](https://github.com/starship/starship/commit/538329d9b406cd6358d0fe31d58e0c9f578ceffa))
|
||||
* **nu:** Use `=` instead of space to pass command line parameters ([#3833](https://github.com/starship/starship/issues/3833)) ([2608db3](https://github.com/starship/starship/commit/2608db3a38b0dca13d91e94950fb4246b0ed1d82))
|
||||
* **nu:** use shell-provided terminal width ([#3800](https://github.com/starship/starship/issues/3800)) ([859b780](https://github.com/starship/starship/commit/859b780b46780fdcac8141a9d165066880c36261))
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
@@ -18,23 +17,23 @@ diverse, inclusive, and healthy community.
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
- Demonstrating empathy and kindness toward other people
|
||||
- Being respectful of differing opinions, viewpoints, and experiences
|
||||
- Giving and gracefully accepting constructive feedback
|
||||
- Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
- Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
- The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
- Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
- Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
@@ -107,7 +106,7 @@ Violating these terms may lead to a permanent ban.
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
@@ -119,11 +118,11 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.0, available at
|
||||
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
|
||||
|
||||
Community Impact Guidelines were inspired by
|
||||
Community Impact Guidelines were inspired by
|
||||
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
|
||||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
|
||||
at [https://www.contributor-covenant.org/translations][translations].
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
@@ -8,9 +8,9 @@ If you have any questions that aren't addressed in this document, please don't h
|
||||
|
||||
## Glossary
|
||||
|
||||
- **Module**: A component in the prompt giving information based on contextual information from your OS. For example, the `nodejs` module shows the version of NodeJS that is currently installed on your computer, if your current directory is a NodeJS project.
|
||||
- **Module**: A component in the prompt giving information based on contextual information from your OS. For example, the `rust` module shows the version of Rust that is currently installed on your computer, if your current directory is a Rust project.
|
||||
|
||||
- **Segment**: Smaller sub-components that compose a module. For example, the `symbol` segment in the `nodejs` module contains the character that is shown before the version number (`⬢` by default).
|
||||
- **Segment**: Smaller sub-components that compose a module. For example, the `symbol` segment in the `rust` module contains the character that is shown before the version number (`🦀` by default).
|
||||
|
||||
## Philosophy
|
||||
|
||||
@@ -53,7 +53,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||
To run a external command (e.g. to get the version of a tool) and to allow for mocking use the `context.exec_cmd` function. Here's a quick example:
|
||||
|
||||
```rust
|
||||
use super::{Context, Module, RootModuleConfig};
|
||||
use super::{Context, Module, ModuleConfig};
|
||||
|
||||
use crate::configs::php::PhpConfig;
|
||||
use crate::formatter::StringFormatter;
|
||||
@@ -70,6 +70,47 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||
|
||||
If using `context.exec_cmd` isn't possible, please use `crate::utils::create_command` instead of `std::process::Command::new`.
|
||||
|
||||
## Absolute Filenames
|
||||
|
||||
To use absolute filenames in your module, use `crate::utils::context_path()` to create a `PathBuf` from an absolute pathname.
|
||||
In the test environment the root directory will be replaced with a `Tempdir`, which you can get via `ModuleRenderer::root_path()`.
|
||||
So, you can populate that mocked root directory with any files you want.
|
||||
|
||||
```rust
|
||||
use crate::utils::context_path;
|
||||
|
||||
pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||
if !context_path(context, "/run/test/testfile").exists() {
|
||||
return None
|
||||
}
|
||||
// ..
|
||||
}
|
||||
```
|
||||
|
||||
```rust
|
||||
#[test]
|
||||
fn test_testfile() {
|
||||
let renderer = ModuleRenderer::new("mymodule");
|
||||
|
||||
let root_path = renderer.root_path();
|
||||
|
||||
// This creates `$TEMPDIR/run/test/testfile`
|
||||
|
||||
let mut absolute_test_file = PathBuf::from(root_path);
|
||||
|
||||
absolute_test_file.push("run");
|
||||
absolute_test_file.push("test");
|
||||
std::fs::DirBuilder::new()
|
||||
.recursive(true)
|
||||
.create(&absolute_test_file)?;
|
||||
|
||||
absolute_test_file.push("testfile");
|
||||
std::fs::File::create(&absolute_test_file)?;
|
||||
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
## Logging
|
||||
|
||||
Debug logging in starship is done with our custom logger implementation.
|
||||
@@ -95,13 +136,26 @@ cargo clippy --all-targets --all-features
|
||||
|
||||
## Formatting
|
||||
|
||||
Starship source files are formatted with [rustfmt](https://crates.io/crates/rustfmt-nightly), using the default configuration. Rustfmt will be ran as part of CI. Unformatted code will fail a build, so it is suggested that you run rustfmt locally:
|
||||
Starship source files are formatted with [rustfmt](https://crates.io/crates/rustfmt-nightly). Markdown and TOML files (among others) are formatted with [dprint](https://github.com/dprint/dprint). Unformatted code will fail the CI, so it is suggested that you run these tools locally.
|
||||
|
||||
For rustfmt:
|
||||
|
||||
```sh
|
||||
rustup component add rustfmt
|
||||
cargo fmt
|
||||
```
|
||||
|
||||
For dprint:
|
||||
|
||||
```sh
|
||||
cargo install dprint
|
||||
dprint fmt
|
||||
```
|
||||
|
||||
Editor plugins/functionality may help you run these automatically so that you don't accidentally create a PR that fails.
|
||||
|
||||
If your changes cause changes to the configuration, you will need to update the configuration schema in `.github/config-schema.json` with `cargo run --features config-schema -- config-schema > .github/config-schema.json`.
|
||||
|
||||
## Testing
|
||||
|
||||
Testing is critical to making sure starship works as intended on systems big and small. Starship interfaces with many applications and system APIs when generating the prompt, so there's a lot of room for bugs to slip in.
|
||||
@@ -111,7 +165,7 @@ Unit tests are written using the built-in Rust testing library in the same file
|
||||
All tests that test the rendered output of a module should use `ModuleRenderer`. For Example:
|
||||
|
||||
```rust
|
||||
use super::{Context, Module, RootModuleConfig};
|
||||
use super::{Context, Module, ModuleConfig};
|
||||
|
||||
use crate::configs::php::PhpConfig;
|
||||
use crate::formatter::StringFormatter;
|
||||
@@ -136,7 +190,7 @@ mod tests {
|
||||
// Here you setup the testing environment
|
||||
let tempdir = tempfile::tempdir()?;
|
||||
// Create some file needed to render the module
|
||||
File::create(dir.path().join("YOUR_FILE"))?.sync_all()?;
|
||||
File::create(tempdir.path().join("YOUR_FILE"))?.sync_all()?;
|
||||
|
||||
// The output of the module
|
||||
let actual = ModuleRenderer::new("YOUR_MODULE_NAME")
|
||||
@@ -233,12 +287,13 @@ writing new modules low, starship provides a lot of functionality for a module,
|
||||
which requires quite a few things be done. These are listed here to help
|
||||
everyone remember what they are. Don't worry: most of them are quite simple!
|
||||
|
||||
- [ ] Add a section to `docs/config/README.md` describing the module, and
|
||||
- [ ] Add a section to `docs/config/README.md` describing the module, and
|
||||
its configuration options/variables (more documentation is often
|
||||
appropriate--this is a bare minimum).
|
||||
- [ ] Add the variable to the appropriate location in the "Default Prompt
|
||||
- [ ] 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/presets/README.md`
|
||||
- [ ] 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:
|
||||
- [ ] An entry in `PROMPT_ORDER` (`src/configs/starship_root.rs`)
|
||||
@@ -250,4 +305,4 @@ everyone remember what they are. Don't worry: most of them are quite simple!
|
||||
|
||||
Finally, you should make sure to write your module's code in `src/modules`
|
||||
and add any commands that need to be mocked when testing in `src/utils.rs`.
|
||||
Command output can also be mocked in test by using `ModuleRenderer::cmd`.
|
||||
Command output can also be mocked in test by using `ModuleRenderer::cmd`.
|
||||
|
||||
@@ -1,101 +1,127 @@
|
||||
[package]
|
||||
name = "starship"
|
||||
version = "1.2.0"
|
||||
edition = "2021"
|
||||
version = "1.10.0"
|
||||
authors = ["Starship Contributors"]
|
||||
homepage = "https://starship.rs"
|
||||
documentation = "https://starship.rs/guide/"
|
||||
repository = "https://github.com/starship/starship"
|
||||
readme = "README.md"
|
||||
license = "ISC"
|
||||
keywords = ["prompt", "shell", "bash", "fish", "zsh"]
|
||||
categories = ["command-line-utilities"]
|
||||
build = "build.rs"
|
||||
categories = ["command-line-utilities"]
|
||||
documentation = "https://starship.rs/guide/"
|
||||
edition = "2021"
|
||||
homepage = "https://starship.rs"
|
||||
# Keep `/` in front of `README.md` to exclude localized readmes
|
||||
include = [
|
||||
"src/**/*",
|
||||
"/starship.exe.manifest",
|
||||
"media/icon.ico",
|
||||
"build.rs",
|
||||
"LICENSE",
|
||||
"/README.md",
|
||||
"docs/.vuepress/public/presets/toml/",
|
||||
".github/config-schema.json",
|
||||
]
|
||||
keywords = ["prompt", "shell", "bash", "fish", "zsh"]
|
||||
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.59"
|
||||
description = """
|
||||
The minimal, blazing-fast, and infinitely customizable prompt for any shell! ☄🌌️
|
||||
"""
|
||||
# Keep `/` in front of `README.md` to exclude localized readmes
|
||||
include = ["src/**/*", "build.rs", "Cross.toml", "LICENSE", "README.md"]
|
||||
|
||||
[badges]
|
||||
is-it-maintained-issue-resolution = { repository = "starship/starship" }
|
||||
is-it-maintained-open-issues = { repository = "starship/starship" }
|
||||
maintenance = { status = "actively-developed" }
|
||||
|
||||
[features]
|
||||
default = ["battery"]
|
||||
default = ["battery", "notify"]
|
||||
battery = ["starship-battery"]
|
||||
config-schema = ["schemars"]
|
||||
notify = ["notify-rust"]
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "3.0.7", features = ["derive", "cargo", "unicode"] }
|
||||
clap_complete = "3.0.3"
|
||||
ansi_term = "0.12.1"
|
||||
directories-next = "2.0.0"
|
||||
git2 = { version = "0.13.25", default-features = false }
|
||||
toml = { version = "0.5.8", features = ["preserve_order"] }
|
||||
rust-ini = "0.17.0"
|
||||
serde_json = "1.0.74"
|
||||
rayon = "1.5.1"
|
||||
log = { version = "0.4.14", features = ["std"] }
|
||||
chrono = { version = "0.4.20", features = ["clock", "std"] }
|
||||
clap = { version = "=3.2.16", features = ["derive", "cargo", "unicode", "unstable-v4"] }
|
||||
clap_complete = "3.2.3"
|
||||
dirs-next = "2.0.0"
|
||||
dunce = "1.0.2"
|
||||
gethostname = "0.2.3"
|
||||
git-repository = "0.20.0"
|
||||
indexmap = { version = "1.9.1", features = ["serde"] }
|
||||
local_ipaddress = "0.1.3"
|
||||
log = { version = "0.4.16", features = ["std"] }
|
||||
# nofity-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.5.8", optional = true }
|
||||
once_cell = "1.13.0"
|
||||
open = "3.0.2"
|
||||
os_info = "3.5.0"
|
||||
path-slash = "0.2.1"
|
||||
pest = "2.2.1"
|
||||
pest_derive = "2.2.1"
|
||||
quick-xml = "0.23.0"
|
||||
rand = "0.8.5"
|
||||
rayon = "1.5.3"
|
||||
regex = "1.6.0"
|
||||
rust-ini = "0.18.0"
|
||||
semver = "1.0.13"
|
||||
serde = { version = "1.0.143", features = ["derive"] }
|
||||
serde_json = "1.0.83"
|
||||
sha-1 = "0.10.0"
|
||||
shadow-rs = { version = "0.16.2", 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.7.9", optional = true }
|
||||
path-slash = "0.1.4"
|
||||
unicode-segmentation = "1.8.0"
|
||||
gethostname = "0.2.1"
|
||||
once_cell = "1.9.0"
|
||||
chrono = "0.4.19"
|
||||
sys-info = "0.9.1"
|
||||
byte-unit = "4.0.13"
|
||||
starship_module_config_derive = { version = "0.2.1", path = "starship_module_config_derive" }
|
||||
yaml-rust = "0.4.5"
|
||||
pest = "2.1.3"
|
||||
pest_derive = "2.1.0"
|
||||
regex = "1.5.4"
|
||||
os_info = "3.0.9"
|
||||
urlencoding = "2.1.0"
|
||||
open = "2.0.2"
|
||||
unicode-width = "0.1.9"
|
||||
terminal_size = "0.1.17"
|
||||
quick-xml = "0.22.0"
|
||||
rand = "0.8.4"
|
||||
serde = { version = "1.0.133", features = ["derive"] }
|
||||
indexmap = { version ="1.8.0", features = ["serde"] }
|
||||
notify-rust = { version = "4.5.5", optional = true }
|
||||
semver = "1.0.4"
|
||||
which = "4.2.2"
|
||||
shadow-rs = "0.8.1"
|
||||
versions = "4.0.0"
|
||||
strsim = "0.10.0"
|
||||
sha-1 = "0.10.0"
|
||||
toml_edit = "0.13.0"
|
||||
systemstat = "=0.1.11"
|
||||
terminal_size = "0.2.1"
|
||||
toml = { version = "0.5.9", features = ["preserve_order"] }
|
||||
toml_edit = "0.14.4"
|
||||
unicode-segmentation = "1.9.0"
|
||||
unicode-width = "0.1.9"
|
||||
urlencoding = "2.1.0"
|
||||
versions = "4.1.0"
|
||||
which = "4.2.5"
|
||||
yaml-rust = "0.4.5"
|
||||
|
||||
process_control = { version = "3.2.0", features = ["crossbeam-channel"] }
|
||||
process_control = { version = "3.5.1", features = ["crossbeam-channel"] }
|
||||
|
||||
shell-words = "1.0.0"
|
||||
guess_host_triple = "0.1.3"
|
||||
home = "0.5.3"
|
||||
shell-words = "1.1.0"
|
||||
|
||||
[dependencies.schemars]
|
||||
version = "0.8.10"
|
||||
optional = true
|
||||
features = ["preserve_order", "indexmap"]
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winapi = { version = "0.3.9", features = [
|
||||
"winuser",
|
||||
"securitybaseapi",
|
||||
"processthreadsapi",
|
||||
"handleapi",
|
||||
"impl-default",
|
||||
] }
|
||||
deelevate = "0.2.0"
|
||||
|
||||
[target.'cfg(windows)'.dependencies.windows]
|
||||
version = "0.39.0"
|
||||
features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_UI_Shell",
|
||||
"Win32_Security",
|
||||
"Win32_System_Threading",
|
||||
"Win32_Storage_FileSystem",
|
||||
]
|
||||
|
||||
[target.'cfg(not(windows))'.dependencies]
|
||||
nix = "0.23.1"
|
||||
nix = { version = "0.24.2", default-features = false, features = ["feature", "fs", "user"] }
|
||||
|
||||
[build-dependencies]
|
||||
shadow-rs = "0.8.1"
|
||||
shadow-rs = { version = "0.16.2", default-features = false }
|
||||
dunce = "1.0.2"
|
||||
|
||||
[target.'cfg(windows)'.build-dependencies]
|
||||
winres = "0.1.12"
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3.2.0"
|
||||
mockall = "0.11"
|
||||
tempfile = "3.2.0"
|
||||
|
||||
[profile.release]
|
||||
codegen-units = 1
|
||||
lto = true
|
||||
strip = true
|
||||
|
||||
[[bin]]
|
||||
name = "starship"
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
[target.x86_64-unknown-freebsd]
|
||||
image = "docker.io/rustembedded/cross:x86_64-unknown-freebsd"
|
||||
@@ -1,6 +1,6 @@
|
||||
ISC License
|
||||
|
||||
Copyright (c) 2019-2021, Starship Contributors
|
||||
Copyright (c) 2019-2022, Starship Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
|
||||
@@ -139,6 +139,8 @@
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
[](https://vshymanskyy.github.io/StandWithUkraine)
|
||||
|
||||
<h1></h1>
|
||||
|
||||
<img
|
||||
@@ -169,148 +171,236 @@
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)).
|
||||
|
||||
### Getting Started
|
||||
### Step 1. Install Starship
|
||||
|
||||
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are
|
||||
shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
|
||||
Select your operating system from the list below to view installation instructions:
|
||||
|
||||
1. Install the **starship** binary:
|
||||
<details>
|
||||
<summary>Android</summary>
|
||||
|
||||
#### Install Latest Version
|
||||
Install Starship using any of the following package managers:
|
||||
|
||||
##### From prebuilt binary, with Shell:
|
||||
| Repository | Instructions |
|
||||
| ---------- | ---------------------- |
|
||||
| [Termux] | `pkg install starship` |
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
</details>
|
||||
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
<details>
|
||||
<summary>BSD</summary>
|
||||
|
||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||
Install Starship using any of the following package managers:
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
| Distribution | Repository | Instructions |
|
||||
| ------------ | --------------- | --------------------------------- |
|
||||
| **_Any_** | **[crates.io]** | `cargo install starship --locked` |
|
||||
| FreeBSD | [FreshPorts] | `pkg install starship` |
|
||||
| NetBSD | [pkgsrc] | `pkgin install starship` |
|
||||
|
||||
#### Install via Package Manager
|
||||
</details>
|
||||
|
||||
##### With [Homebrew](https://brew.sh/):
|
||||
<details>
|
||||
<summary>Linux</summary>
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
```
|
||||
Install the latest version for your system:
|
||||
|
||||
##### With [Scoop](https://scoop.sh):
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
```powershell
|
||||
scoop install starship
|
||||
```
|
||||
Alternatively, install Starship using any of the following package managers:
|
||||
|
||||
2. Add the init script to your shell's config file:
|
||||
| Distribution | Repository | Instructions |
|
||||
| ------------------ | ----------------------- | ------------------------------------------------------------- |
|
||||
| **_Any_** | **[crates.io]** | `cargo install starship --locked` |
|
||||
| _Any_ | [conda-forge] | `conda install -c conda-forge starship` |
|
||||
| _Any_ | [Linuxbrew] | `brew install starship` |
|
||||
| _Any_ | [Snapcraft] | `snap install starship` |
|
||||
| Alpine Linux 3.13+ | [Alpine Linux Packages] | `apk add starship` |
|
||||
| Arch Linux | [Arch Linux Community] | `pacman -S starship` |
|
||||
| CentOS 7+ | [Copr] | `dnf copr enable atim/starship` <br /> `dnf install starship` |
|
||||
| Fedora 31+ | [Fedora Packages] | `dnf install starship` |
|
||||
| NixOS | [nixpkgs] | `nix-env -iA nixos.starship` |
|
||||
| Gentoo | [Gentoo Packages] | `emerge app-shells/starship` |
|
||||
| Manjaro | | `pacman -S starship` |
|
||||
| NixOS | [nixpkgs] | `nix-env -iA nixpkgs.starship` |
|
||||
| Void Linux | [Void Linux Packages] | `xbps-install -S starship` |
|
||||
|
||||
#### Bash
|
||||
</details>
|
||||
|
||||
Add the following to the end of `~/.bashrc`:
|
||||
<details>
|
||||
<summary>macOS</summary>
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
Install the latest version for your system:
|
||||
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
#### Fish
|
||||
Alternatively, install Starship using any of the following package managers:
|
||||
|
||||
Add the following to the end of `~/.config/fish/config.fish`:
|
||||
| Repository | Instructions |
|
||||
| --------------- | --------------------------------------- |
|
||||
| **[crates.io]** | `cargo install starship --locked` |
|
||||
| [conda-forge] | `conda install -c conda-forge starship` |
|
||||
| [Homebrew] | `brew install starship` |
|
||||
| [MacPorts] | `port install starship` |
|
||||
|
||||
```sh
|
||||
# ~/.config/fish/config.fish
|
||||
</details>
|
||||
|
||||
starship init fish | source
|
||||
```
|
||||
<details>
|
||||
<summary>Windows</summary>
|
||||
|
||||
#### Zsh
|
||||
Install the latest version for your system with the MSI-installers from the [releases section](https://github.com/starship/starship/releases/latest).
|
||||
|
||||
Add the following to the end of `~/.zshrc`:
|
||||
Install Starship using any of the following package managers:
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
| Repository | Instructions |
|
||||
| --------------- | --------------------------------------- |
|
||||
| **[crates.io]** | `cargo install starship --locked` |
|
||||
| [Chocolatey] | `choco install starship` |
|
||||
| [conda-forge] | `conda install -c conda-forge starship` |
|
||||
| [Scoop] | `scoop install starship` |
|
||||
| [winget] | `winget install --id Starship.Starship` |
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
</details>
|
||||
|
||||
#### PowerShell
|
||||
### Step 2. Setup your shell to use Starship
|
||||
|
||||
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
||||
Configure your shell to initialize starship. Select yours from the list below:
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
<details>
|
||||
<summary>Bash</summary>
|
||||
|
||||
#### Ion
|
||||
Add the following to the end of `~/.bashrc`:
|
||||
|
||||
Add the following to the end of `~/.config/ion/initrc`:
|
||||
```sh
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
|
||||
```sh
|
||||
# ~/.config/ion/initrc
|
||||
</details>
|
||||
|
||||
eval $(starship init ion)
|
||||
```
|
||||
<details>
|
||||
<summary>Cmd</summary>
|
||||
|
||||
#### Elvish
|
||||
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd.
|
||||
Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
|
||||
|
||||
**Warning** Only elvish v0.17 or higher is supported.
|
||||
Add the following to the end of `~/.elvish/rc.elv`:
|
||||
```lua
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
</details>
|
||||
|
||||
eval (starship init elvish)
|
||||
```
|
||||
<details>
|
||||
<summary>Elvish</summary>
|
||||
|
||||
#### Tcsh
|
||||
Add the following to the end of `~/.elvish/rc.elv`:
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
```sh
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
Note: Only Elvish v0.18+ is supported
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
</details>
|
||||
|
||||
#### Xonsh
|
||||
<details>
|
||||
<summary>Fish</summary>
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
Add the following to the end of `~/.config/fish/config.fish`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
```fish
|
||||
starship init fish | source
|
||||
```
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
</details>
|
||||
|
||||
#### Cmd
|
||||
<details>
|
||||
<summary>Ion</summary>
|
||||
|
||||
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory:
|
||||
Add the following to the end of `~/.config/ion/initrc`:
|
||||
|
||||
```lua
|
||||
-- starship.lua
|
||||
```sh
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
</details>
|
||||
|
||||
#### Nushell
|
||||
<details>
|
||||
<summary>Nushell</summary>
|
||||
|
||||
**Warning** This will change in the future. Only nu version v0.33 or higher is supported.
|
||||
Add the following to your nu config file. You can check the location of this
|
||||
file by running `config path` in nu.
|
||||
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
"mkdir ~/.cache/starship",
|
||||
"starship init nu | save ~/.cache/starship/init.nu",
|
||||
"source ~/.cache/starship/init.nu"
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
```sh
|
||||
mkdir ~/.cache/starship
|
||||
starship init nu | save ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
|
||||
|
||||
```sh
|
||||
source ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
Note: Only Nushell v0.61+ is supported
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>PowerShell</summary>
|
||||
|
||||
Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`):
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Tcsh</summary>
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Xonsh</summary>
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```python
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Zsh</summary>
|
||||
|
||||
Add the following to the end of `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Step 3. Configure Starship
|
||||
|
||||
Start a new shell instance, and you should see your beautiful new shell prompt.
|
||||
If you're happy with the defaults, enjoy!
|
||||
|
||||
If you're looking to further customize Starship:
|
||||
|
||||
- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking
|
||||
|
||||
- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
@@ -324,11 +414,11 @@ If you are interested in helping contribute to starship, please take a look at o
|
||||
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts.
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts.
|
||||
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript.
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript.
|
||||
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons.
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
@@ -339,3 +429,23 @@ Please check out these previous works that helped inspire the creation of starsh
|
||||
|
||||
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br>
|
||||
This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.
|
||||
|
||||
[alpine linux packages]: https://pkgs.alpinelinux.org/packages?name=starship
|
||||
[arch linux community]: https://archlinux.org/packages/community/x86_64/starship
|
||||
[chocolatey]: https://community.chocolatey.org/packages/starship
|
||||
[conda-forge]: https://anaconda.org/conda-forge/starship
|
||||
[copr]: https://copr.fedorainfracloud.org/coprs/atim/starship
|
||||
[crates.io]: https://crates.io/crates/starship
|
||||
[fedora packages]: https://src.fedoraproject.org/rpms/rust-starship
|
||||
[freshports]: https://www.freshports.org/shells/starship
|
||||
[gentoo packages]: https://packages.gentoo.org/packages/app-shells/starship
|
||||
[linuxbrew]: https://formulae.brew.sh/formula/starship
|
||||
[homebrew]: https://formulae.brew.sh/formula/starship
|
||||
[macports]: https://ports.macports.org/port/starship
|
||||
[nixpkgs]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix
|
||||
[pkgsrc]: https://pkgsrc.se/shells/starship
|
||||
[scoop]: https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json
|
||||
[snapcraft]: https://snapcraft.io/starship
|
||||
[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
|
||||
|
||||
@@ -1,3 +1,71 @@
|
||||
fn main() -> shadow_rs::SdResult<()> {
|
||||
shadow_rs::new()
|
||||
use std::fs::{self, File};
|
||||
use std::io::Write;
|
||||
|
||||
use shadow_rs::SdResult;
|
||||
|
||||
fn main() -> SdResult<()> {
|
||||
shadow_rs::new().map_err(|err| err.to_string())?;
|
||||
shadow_rs::new_hook(gen_presets_hook)?;
|
||||
|
||||
#[cfg(windows)]
|
||||
{
|
||||
let mut res = winres::WindowsResource::new();
|
||||
res.set_manifest_file("starship.exe.manifest")
|
||||
.set_icon("media/icon.ico");
|
||||
res.compile()?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
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")?;
|
||||
|
||||
let mut presets = String::new();
|
||||
let mut match_arms = String::new();
|
||||
for path in paths {
|
||||
let unwrapped = path?;
|
||||
let file_name = unwrapped.file_name();
|
||||
let full_path = dunce::canonicalize(unwrapped.path())?;
|
||||
let full_path = full_path.to_str().expect("failed to convert to string");
|
||||
let name = file_name
|
||||
.to_str()
|
||||
.and_then(|v| v.strip_suffix(".toml"))
|
||||
.expect("Failed to process filename");
|
||||
presets.push_str(format!("print::Preset(\"{}\"),\n", name).as_str());
|
||||
match_arms.push_str(
|
||||
format!(
|
||||
r#"
|
||||
"{name}" => {{
|
||||
let mut stdout = io::stdout().lock();
|
||||
let _ = stdout.write_all(include_bytes!(r"{full_path}"));
|
||||
}}
|
||||
"#
|
||||
)
|
||||
.as_str(),
|
||||
);
|
||||
}
|
||||
|
||||
writeln!(
|
||||
file,
|
||||
r#"
|
||||
use std::io::{{self, Write}};
|
||||
use crate::print;
|
||||
|
||||
pub fn get_preset_list<'a>() -> &'a [print::Preset] {{
|
||||
&[
|
||||
{presets}
|
||||
]
|
||||
}}
|
||||
|
||||
pub fn print_preset_content(name: &str) {{
|
||||
match name {{
|
||||
{match_arms}
|
||||
_ => {{}}
|
||||
}}
|
||||
}}
|
||||
"#
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
disallowed-methods = [
|
||||
# std::process::Command::new may inadvertly run executables from the current working directory
|
||||
"std::process::Command::new",
|
||||
# Setting environment variables can cause issues with non-rust code
|
||||
"std::env::set_var"
|
||||
# std::process::Command::new may inadvertly run executables from the current working directory
|
||||
"std::process::Command::new",
|
||||
# Setting environment variables can cause issues with non-rust code
|
||||
"std::env::set_var",
|
||||
# use `dunce` to avoid UNC/verbatim paths, where possible
|
||||
"std::fs::canonicalize",
|
||||
]
|
||||
|
||||
@@ -1,342 +0,0 @@
|
||||
module.exports = {
|
||||
locales: {
|
||||
"/": {
|
||||
lang: "en-US",
|
||||
title: "Starship",
|
||||
description: "The minimal, blazing-fast, and infinitely customizable prompt for any shell!"
|
||||
},
|
||||
"/de-DE/": {
|
||||
lang: "de-DE",
|
||||
title: "Starship",
|
||||
description: "Minimale, super schnelle und unendlich anpassbare Prompt für jede Shell!"
|
||||
},
|
||||
"/es-ES/": {
|
||||
lang: "es-ES",
|
||||
title: "Starship",
|
||||
description: "¡El prompt minimalista, ultrarápido e infinitamente personalizable para cualquier intérprete de comandos!"
|
||||
},
|
||||
"/fr-FR/": {
|
||||
lang: "fr-FR",
|
||||
title: "Starship",
|
||||
description: "L'invite minimaliste, ultra-rapide et personnalisable à l'infini pour n'importe quel shell !"
|
||||
},
|
||||
"/id-ID/": {
|
||||
lang: "id-ID",
|
||||
title: "Starship",
|
||||
description: "Prompt yang minimal, super cepat, dan dapat disesuaikan tanpa batas untuk shell apa pun!"
|
||||
},
|
||||
"/it-IT/": {
|
||||
lang: "it-IT",
|
||||
title: "Starship",
|
||||
description: "Il prompt minimalista, super veloce e infinitamente personalizzabile per qualsiasi shell!"
|
||||
},
|
||||
"/ja-JP/": {
|
||||
lang: "ja-JP",
|
||||
title: "Starship",
|
||||
description: "シェル用の最小限の、非常に高速で、無限にカスタマイズ可能なプロンプトです!"
|
||||
},
|
||||
"/pt-BR/": {
|
||||
lang: "pt-BR",
|
||||
title: "Starship",
|
||||
description: "O prompt minimalista, extremamente rápido e infinitamente personalizável para qualquer shell!"
|
||||
},
|
||||
"/ru-RU/": {
|
||||
lang: "ru-RU",
|
||||
title: "Starship",
|
||||
description: "Минималистичная, быстрая и бесконечно настраиваемая командная строка для любой оболочки!"
|
||||
},
|
||||
"/vi-VN/": {
|
||||
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!"
|
||||
},
|
||||
"/zh-CN/": {
|
||||
lang: "zh-CN",
|
||||
title: "Starship",
|
||||
description: "轻量级、反应迅速,可定制的高颜值终端!"
|
||||
},
|
||||
"/zh-TW/": {
|
||||
lang: "zh-TW",
|
||||
title: "Starship",
|
||||
description: "適合任何 shell 的最小、極速、無限客製化的提示字元!"
|
||||
}
|
||||
},
|
||||
// prettier-ignore
|
||||
head: [
|
||||
["link", { rel: "icon", href: "/icon.png" }],
|
||||
["meta", { property: "og:title", content: "Starship: Cross-Shell Prompt" }],
|
||||
["meta", { property: "og:description", content: "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."}],
|
||||
["meta", { property: "og:type", content: "website" }],
|
||||
["meta", { property: "og:url", content: "https://starship.rs/" }],
|
||||
["meta", { property: "og:image", content: "https://starship.rs/icon.png" }],
|
||||
["meta", { name: "twitter:card", content: "summary"}],
|
||||
["meta", { name: "twitter:title", content: "Starship: Cross-Shell Prompt"}],
|
||||
["meta", { name: "twitter:description", content: "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."}],
|
||||
["meta", { name: "twitter:image", content: "https://starship.rs/icon.png"}],
|
||||
["meta", { name: "twitter:alt", content: "Starship: Cross-Shell Prompt"}],
|
||||
],
|
||||
theme: "default-prefers-color-scheme",
|
||||
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,
|
||||
// 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: [
|
||||
"/",
|
||||
["/guide/", "Guide"],
|
||||
["/installing/", "Advanced Installation"],
|
||||
["/config/", "Configuration"],
|
||||
["/advanced-config/", "Advanced Configuration"],
|
||||
["/faq/", "Frequently Asked Questions"],
|
||||
["/presets/", "Presets"],
|
||||
["/migrating-to-0.45.0/", "Migrating to v0.45.0"]
|
||||
]
|
||||
},
|
||||
"/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: "/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: [
|
||||
"/de-DE/",
|
||||
["/de-DE/guide/", "Anleitung"],
|
||||
["/de-DE/config/", "Konfiguration"],
|
||||
["/de-DE/advanced-config/", "Erweiterte Konfiguration"],
|
||||
["/de-DE/faq/", "Häufig gestellte Fragen"],
|
||||
["/de-DE/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: [
|
||||
"/es-ES/",
|
||||
["/es-ES/guide/", "Guía"],
|
||||
["/es-ES/config/", "Configuración"],
|
||||
["/es-ES/advanced-config/", "Configuración Avanzada"],
|
||||
["/es-ES/faq/", "Preguntas frecuentes"],
|
||||
["/es-ES/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: [
|
||||
"/fr-FR/",
|
||||
["/fr-FR/guide/", "Guide"],
|
||||
["/fr-FR/config/", "Configuration"],
|
||||
["/fr-FR/advanced-config/", "Configuration avancée"],
|
||||
["/fr-FR/faq/", "Foire aux questions"],
|
||||
["/fr-FR/presets/", "Paramètres par défaut"]
|
||||
]
|
||||
},
|
||||
"/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: [
|
||||
"/id-ID/",
|
||||
["/id-ID/guide/", "Petunjuk"],
|
||||
["/id-ID/config/", "Konfigurasi"],
|
||||
["/id-ID/advanced-config/", "Konfigurasi Lanjutan"],
|
||||
["/id-ID/faq/", "Pertanyaan Umum"],
|
||||
["/id-ID/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: [
|
||||
"/it-IT/",
|
||||
["/it-IT/guide/", "Guide"],
|
||||
["/it-IT/config/", "Configurazione"],
|
||||
["/it-IT/advanced-config/", "Configurazione Avanzata"],
|
||||
["/it-IT/faq/", "FAQ"],
|
||||
["/it-IT/presets/", "Preset"]
|
||||
]
|
||||
},
|
||||
"/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: [
|
||||
"/ja-JP/",
|
||||
["/ja-JP/guide/", "ガイド"],
|
||||
["/ja-JP/config/", "設定"],
|
||||
["/ja-JP/advanced-config/", "高度な設定"],
|
||||
["/ja-JP/faq/", "FAQ"],
|
||||
["/ja-JP/presets/", "準備するもの"],
|
||||
["/ja-JP/migrating-to-0.45.0/", "v0.45への移行"]
|
||||
]
|
||||
},
|
||||
"/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: [
|
||||
"/pt-BR/",
|
||||
["/pt-BR/guide/", "Guia"],
|
||||
["/pt-BR/config/", "Configuração"],
|
||||
["/pt-BR/advanced-config/", "Configuração avançada"],
|
||||
["/pt-BR/faq/", "Perguntas frequentes"],
|
||||
["/pt-BR/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: [
|
||||
"/ru-RU/",
|
||||
["/ru-RU/guide/", "Руководство"],
|
||||
["/ru-RU/config/", "Настройка"],
|
||||
["/ru-RU/advanced-config/", "Расширенная Настройка"],
|
||||
["/ru-RU/faq/", "Часто Задаваемые Вопросы"],
|
||||
["/ru-RU/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: [
|
||||
"/vi-VN/",
|
||||
["/vi-VN/guide/", "Hướng dẫn"],
|
||||
["/vi-VN/config/", "Cấu hình"],
|
||||
["/vi-VN/advanced-config/", "Cấu hình nâng cao"],
|
||||
["/vi-VN/faq/", "Các hỏi thường gặp"],
|
||||
["/vi-VN/presets/", "Mẫu thiết lậ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: [
|
||||
"/zh-TW/",
|
||||
["/zh-TW/guide/", "指引"],
|
||||
["/zh-TW/config/", "設定"],
|
||||
["/zh-TW/advanced-config/", "進階設定"]
|
||||
]
|
||||
},
|
||||
"/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: [
|
||||
"/zh-CN/",
|
||||
["/zh-CN/guide/", "指南"],
|
||||
["/zh-CN/config/", "配置"],
|
||||
["/zh-CN/advanced-config/", "高级配置"],
|
||||
["/zh-CN/faq/", "常见问题"],
|
||||
["/zh-CN/presets/", "社区配置分享"]
|
||||
]
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
[
|
||||
"@vuepress/google-analytics",
|
||||
{
|
||||
ga: "UA-71160903-4"
|
||||
}
|
||||
],
|
||||
[
|
||||
"sitemap",
|
||||
{
|
||||
hostname: "https://starship.rs"
|
||||
}
|
||||
],
|
||||
['vuepress-plugin-code-copy', true]
|
||||
]
|
||||
};
|
||||
@@ -0,0 +1,343 @@
|
||||
import { defineConfig, SidebarConfigArray } from "vuepress/config";
|
||||
|
||||
const sidebar = (lang, override = {}): SidebarConfigArray =>
|
||||
[
|
||||
"", // "Home", which should always have a override
|
||||
"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 => {
|
||||
let path = "/";
|
||||
|
||||
if (lang) {
|
||||
path += `${lang}/`;
|
||||
}
|
||||
|
||||
if (page) {
|
||||
path += `${page}/`;
|
||||
}
|
||||
|
||||
// If no override is set for current page, let VuePress fallback to page title
|
||||
return page in override ? [path, override[page]] : path;
|
||||
});
|
||||
|
||||
module.exports = defineConfig({
|
||||
locales: {
|
||||
"/": {
|
||||
lang: "en-US",
|
||||
title: "Starship",
|
||||
description: "The minimal, blazing-fast, and infinitely customizable prompt for any shell!",
|
||||
},
|
||||
"/de-DE/": {
|
||||
lang: "de-DE",
|
||||
title: "Starship",
|
||||
description: "Minimale, super schnelle und unendlich anpassbare Prompt für jede Shell!",
|
||||
},
|
||||
"/es-ES/": {
|
||||
lang: "es-ES",
|
||||
title: "Starship",
|
||||
description:
|
||||
"¡El prompt minimalista, ultrarápido e infinitamente personalizable para cualquier intérprete de comandos!",
|
||||
},
|
||||
"/fr-FR/": {
|
||||
lang: "fr-FR",
|
||||
title: "Starship",
|
||||
description: "L'invite minimaliste, ultra-rapide et personnalisable à l'infini pour n'importe quel shell !",
|
||||
},
|
||||
"/id-ID/": {
|
||||
lang: "id-ID",
|
||||
title: "Starship",
|
||||
description: "Prompt yang minimal, super cepat, dan dapat disesuaikan tanpa batas untuk shell apa pun!",
|
||||
},
|
||||
"/it-IT/": {
|
||||
lang: "it-IT",
|
||||
title: "Starship",
|
||||
description: "Il prompt minimalista, super veloce e infinitamente personalizzabile per qualsiasi shell!",
|
||||
},
|
||||
"/ja-JP/": {
|
||||
lang: "ja-JP",
|
||||
title: "Starship",
|
||||
description: "シェル用の最小限の、非常に高速で、無限にカスタマイズ可能なプロンプトです!",
|
||||
},
|
||||
"/pt-BR/": {
|
||||
lang: "pt-BR",
|
||||
title: "Starship",
|
||||
description:
|
||||
"O prompt minimalista, extremamente rápido e infinitamente personalizável para qualquer shell!",
|
||||
},
|
||||
"/ru-RU/": {
|
||||
lang: "ru-RU",
|
||||
title: "Starship",
|
||||
description: "Минималистичная, быстрая и бесконечно настраиваемая командная строка для любой оболочки!",
|
||||
},
|
||||
"/vi-VN/": {
|
||||
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!",
|
||||
},
|
||||
"/zh-CN/": {
|
||||
lang: "zh-CN",
|
||||
title: "Starship",
|
||||
description: "轻量级、反应迅速,可定制的高颜值终端!",
|
||||
},
|
||||
"/zh-TW/": {
|
||||
lang: "zh-TW",
|
||||
title: "Starship",
|
||||
description: "適合任何 shell 的最小、極速、無限客製化的提示字元!",
|
||||
},
|
||||
},
|
||||
// prettier-ignore
|
||||
head: [
|
||||
["link", { rel: "icon", href: "/icon.png" }],
|
||||
["meta", { property: "og:title", content: "Starship: Cross-Shell Prompt" }],
|
||||
["meta", {
|
||||
property: "og:description",
|
||||
content:
|
||||
"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.",
|
||||
}],
|
||||
["meta", { property: "og:type", content: "website" }],
|
||||
["meta", { property: "og:url", content: "https://starship.rs/" }],
|
||||
["meta", { property: "og:image", content: "https://starship.rs/icon.png" }],
|
||||
["meta", { name: "twitter:card", content: "summary" }],
|
||||
["meta", { name: "twitter:title", content: "Starship: Cross-Shell Prompt" }],
|
||||
["meta", {
|
||||
name: "twitter:description",
|
||||
content:
|
||||
"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.",
|
||||
}],
|
||||
["meta", { name: "twitter:image", content: "https://starship.rs/icon.png" }],
|
||||
["meta", { name: "twitter:alt", content: "Starship: Cross-Shell Prompt" }],
|
||||
],
|
||||
evergreen: true,
|
||||
theme: "default-prefers-color-scheme",
|
||||
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,
|
||||
// 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: "Часто Задаваемые Вопросы",
|
||||
}),
|
||||
},
|
||||
"/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/google-analytics",
|
||||
{
|
||||
ga: "UA-71160903-4",
|
||||
},
|
||||
],
|
||||
[
|
||||
"vuepress-plugin-sitemap",
|
||||
{
|
||||
hostname: "https://starship.rs",
|
||||
},
|
||||
],
|
||||
["vuepress-plugin-code-copy", true],
|
||||
],
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
../../../.github/config-schema.json
|
||||
|
Before Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 166 KiB |
|
After Width: | Height: | Size: 228 KiB |
|
After Width: | Height: | Size: 188 KiB |
|
After Width: | Height: | Size: 179 KiB |
|
After Width: | Height: | Size: 165 KiB |
|
After Width: | Height: | Size: 203 KiB |
|
Before Width: | Height: | Size: 334 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 352 KiB |
@@ -0,0 +1,161 @@
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[bun]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[c]
|
||||
format = '\[[$symbol($version(-$name))]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[daml]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[haskell]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[raku]
|
||||
format = '\[[$symbol($version-$vm_version)]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[spack]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[sudo]
|
||||
format = '\[[as $symbol]\]'
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
@@ -0,0 +1,68 @@
|
||||
[aws]
|
||||
symbol = " "
|
||||
|
||||
[buf]
|
||||
symbol = " "
|
||||
|
||||
[c]
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[dart]
|
||||
symbol = " "
|
||||
|
||||
[directory]
|
||||
read_only = " "
|
||||
|
||||
[docker_context]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[haskell]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[nim]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
[package]
|
||||
symbol = " "
|
||||
|
||||
[python]
|
||||
symbol = " "
|
||||
|
||||
[spack]
|
||||
symbol = "🅢 "
|
||||
|
||||
[rust]
|
||||
symbol = " "
|
||||
@@ -0,0 +1,101 @@
|
||||
[bun]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[buf]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[daml]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[python]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[raku]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
@@ -0,0 +1,124 @@
|
||||
format = """
|
||||
[](#9A348E)\
|
||||
$username\
|
||||
[](bg:#DA627D fg:#9A348E)\
|
||||
$directory\
|
||||
[](fg:#DA627D bg:#FCA17D)\
|
||||
$git_branch\
|
||||
$git_status\
|
||||
[](fg:#FCA17D bg:#86BBD8)\
|
||||
$c\
|
||||
$elixir\
|
||||
$elm\
|
||||
$golang\
|
||||
$haskell\
|
||||
$java\
|
||||
$julia\
|
||||
$nodejs\
|
||||
$nim\
|
||||
$rust\
|
||||
[](fg:#86BBD8 bg:#06969A)\
|
||||
$docker_context\
|
||||
[](fg:#06969A bg:#33658A)\
|
||||
$time\
|
||||
[ ](fg:#33658A)\
|
||||
"""
|
||||
|
||||
# Disable the blank line at the start of the prompt
|
||||
# add_newline = false
|
||||
|
||||
# You can also replace your username with a neat symbol like to save some space
|
||||
[username]
|
||||
show_always = true
|
||||
style_user = "bg:#9A348E"
|
||||
style_root = "bg:#9A348E"
|
||||
format = '[$user ]($style)'
|
||||
|
||||
[directory]
|
||||
style = "bg:#DA627D"
|
||||
format = "[ $path ]($style)"
|
||||
truncation_length = 3
|
||||
truncation_symbol = "…/"
|
||||
|
||||
# Here is how you can shorten some long paths by text replacement
|
||||
# similar to mapped_locations in Oh My Posh:
|
||||
[directory.substitutions]
|
||||
"Documents" = " "
|
||||
"Downloads" = " "
|
||||
"Music" = " "
|
||||
"Pictures" = " "
|
||||
# Keep in mind that the order matters. For example:
|
||||
# "Important Documents" = " "
|
||||
# will not be replaced, because "Documents" was already substituted before.
|
||||
# So either put "Important Documents" before "Documents" or use the substituted version:
|
||||
# "Important " = " "
|
||||
|
||||
[c]
|
||||
symbol = " "
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[docker_context]
|
||||
symbol = " "
|
||||
style = "bg:#06969A"
|
||||
format = '[ $symbol $context ]($style) $path'
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[git_branch]
|
||||
symbol = ""
|
||||
style = "bg:#FCA17D"
|
||||
format = '[ $symbol $branch ]($style)'
|
||||
|
||||
[git_status]
|
||||
style = "bg:#FCA17D"
|
||||
format = '[$all_status$ahead_behind ]($style)'
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[haskell]
|
||||
symbol = " "
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[nodejs]
|
||||
symbol = ""
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[nim]
|
||||
symbol = " "
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[rust]
|
||||
symbol = ""
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[time]
|
||||
disabled = false
|
||||
time_format = "%R" # Hour:Minute Format
|
||||
style = "bg:#33658A"
|
||||
format = '[ ♥ $time ]($style)'
|
||||
@@ -0,0 +1,134 @@
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[bun]
|
||||
symbol = "bun "
|
||||
|
||||
[c]
|
||||
symbol = "C "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[daml]
|
||||
symbol = "daml "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[lua]
|
||||
symbol = "lua "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[raku]
|
||||
symbol = "raku "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[spack]
|
||||
symbol = "spack "
|
||||
|
||||
[sudo]
|
||||
symbol = "sudo "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
@@ -0,0 +1,46 @@
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
@@ -39,8 +39,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
With Shell:
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
#### Install via Package Manager
|
||||
@@ -110,7 +111,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
#### Elvish
|
||||
|
||||
::: warning
|
||||
Only elvish v0.17 or higher is supported.
|
||||
|
||||
Only elvish v0.18 or higher is supported.
|
||||
|
||||
:::
|
||||
|
||||
Add the following to the end of `~/.elvish/rc.elv`:
|
||||
@@ -134,21 +137,23 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
#### Nushell
|
||||
|
||||
::: warning
|
||||
This will change in the future.
|
||||
Only nu version v0.33 or higher is supported.
|
||||
:::
|
||||
Add the following to your nu config file. You can check the location of this
|
||||
file by running `config path` in nu.
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
"mkdir ~/.cache/starship",
|
||||
"starship init nu | save ~/.cache/starship/init.nu",
|
||||
"source ~/.cache/starship/init.nu"
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
This will change in the future.
|
||||
Only Nushell v0.61+ is supported.
|
||||
|
||||
:::
|
||||
|
||||
Add the following to 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 ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
|
||||
|
||||
```sh
|
||||
source ~/.cache/starship/init.nu
|
||||
```
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
@@ -10,6 +10,67 @@ The configurations in this section are subject to change in future releases of S
|
||||
|
||||
:::
|
||||
|
||||
## TransientPrompt in PowerShell
|
||||
|
||||
It is possible to replace the previous-printed prompt with a custom string. This
|
||||
is useful in cases where all the prompt information is not always needed. To enable
|
||||
this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put
|
||||
this statement in your `$PROFILE`. Transience can be disabled on-the-fly with
|
||||
`Disable-TransientPrompt`.
|
||||
|
||||
By default, the left side of input gets replaced with `>`. To customize this,
|
||||
define a new function called `Invoke-Starship-TransientFunction`. For example, to
|
||||
display Starship's `character` module here, you would do
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-TransientFunction {
|
||||
&starship module character
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
|
||||
Enable-TransientPrompt
|
||||
```
|
||||
|
||||
## TransientPrompt and TransientRightPrompt in Cmd
|
||||
|
||||
Clink allows you to replace the previous-printed prompt with custom strings. This
|
||||
is useful in cases where all the prompt information is not always needed. To enable
|
||||
this, run `clink set prompt.transient <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
|
||||
- `off`: do not replace the prompt (i.e. turn off transience)
|
||||
|
||||
You need to do this only once. Make the following changes to your `starship.lua`
|
||||
to customize what gets displayed on the left and on the right:
|
||||
|
||||
- By default, the left side of input gets replaced with `>`. To customize this,
|
||||
define a new function called `starship_transient_prompt_func`. This function
|
||||
receives the current prompt as a string that you can utilize. For example, to
|
||||
display Starship's `character` module here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_prompt_func(prompt)
|
||||
return io.popen("starship module character"
|
||||
.." --keymap="..rl.getvariable('keymap')
|
||||
):read("*a")
|
||||
end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
- By default, the right side of input is empty. To customize this, define a new
|
||||
function called `starship_transient_rprompt_func`. This function receives the
|
||||
current prompt as a string that you can utilize. For example, to display
|
||||
the time at which the last command was started here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_rprompt_func(prompt)
|
||||
return io.popen("starship module time"):read("*a")
|
||||
end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in Cmd
|
||||
|
||||
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands
|
||||
@@ -62,7 +123,7 @@ starship_precmd_user_func="blastoff"
|
||||
|
||||
- To run a custom function right before a command runs, you can use the
|
||||
[`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/).
|
||||
However, you **must** trap the DEBUG signal *before* initializing Starship!
|
||||
However, you **must** trap the DEBUG signal _before_ initializing Starship!
|
||||
Starship can preserve the value of the DEBUG trap, but if the trap is overwritten
|
||||
after starship starts up, some functionality will break.
|
||||
|
||||
@@ -71,7 +132,9 @@ function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
set -o functrace
|
||||
eval $(starship init bash)
|
||||
set +o functrace
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
@@ -161,7 +224,7 @@ 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.
|
||||
|
||||
@@ -193,9 +256,9 @@ Note: `continuation_prompt` should be set to a literal string without any variab
|
||||
|
||||
Note: Continuation prompts are only available in the following shells:
|
||||
|
||||
- `bash`
|
||||
- `zsh`
|
||||
- `PowerShell`
|
||||
- `bash`
|
||||
- `zsh`
|
||||
- `PowerShell`
|
||||
|
||||
### Example
|
||||
|
||||
@@ -210,15 +273,18 @@ continuation_prompt = "▶▶"
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `blink`
|
||||
- `hidden`
|
||||
- `strikethrough`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<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.
|
||||
|
||||
@@ -226,11 +292,17 @@ The `none` token overrides all other tokens in a string if it is not part of a `
|
||||
|
||||
A color specifier can be one of the following:
|
||||
|
||||
- One of the standard terminal colors: `black`, `red`, `green`, `blue`,
|
||||
`yellow`, `purple`, `cyan`, `white`. You can optionally prefix these
|
||||
with `bright-` to get the bright version (e.g. `bright-white`).
|
||||
- A `#` followed by a six-digit hexadecimal number. This specifies an
|
||||
[RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
|
||||
- One of the standard terminal colors: `black`, `red`, `green`, `blue`,
|
||||
`yellow`, `purple`, `cyan`, `white`. You can optionally prefix these
|
||||
with `bright-` to get the bright version (e.g. `bright-white`).
|
||||
- A `#` followed by a six-digit hexadecimal number. This specifies an
|
||||
[RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
|
||||
|
||||
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||
|
||||
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
|
||||
|
||||
- Many terminals disable support for `blink` by default
|
||||
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
|
||||
- `strikethrough` is not supported by the default macOS Terminal.app
|
||||
|
||||
@@ -18,7 +18,7 @@ features:
|
||||
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.
|
||||
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">
|
||||
@@ -42,8 +42,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
بإستخدام Shell:
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
لتحديث Starship نفسه، أعد تشغيل البرنامج النصي أعلاه. سيتم استبدال الإصدار الحالي بدون لمس تكوين Starship.
|
||||
|
||||
|
||||
@@ -61,7 +62,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
scoop install starship
|
||||
```
|
||||
|
||||
1. أضف البرنامج النصي إلى ملف تهيئة موجه الأوامر:
|
||||
1. أضف ما يلي إلى ملف تكوين موجه الأوامر الخاص بك:
|
||||
|
||||
|
||||
#### Bash
|
||||
@@ -119,7 +120,11 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: تحذير يدعم فقط elvish v0.15 أو أعلى. :::
|
||||
::: تحذير
|
||||
|
||||
Only elvish v0.18 or higher is supported.
|
||||
|
||||
:::
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.elvish/rc.elv`:
|
||||
|
||||
@@ -143,17 +148,23 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: تحذير هذا سوف يتغير في المستقبل. فقط إصدار nu v0.33 أو أعلى مدعوم. ::: أضف ما يلي إلى ملف تكوين nu الخاص بك. يمكنك التحقق من موقع هذا الملف عن طريق تشغيل `config path` في nu.
|
||||
::: تحذير
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
"mkdir ~/.cache/starship",
|
||||
"starship init nu | save ~/.cache/starship/init.nu",
|
||||
"source ~/.cache/starship/init.nu"
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
This will change in the future. Only Nushell v0.61+ is supported.
|
||||
|
||||
:::
|
||||
|
||||
Add the following to 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 ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
|
||||
|
||||
```sh
|
||||
source ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
#### Xonsh
|
||||
|
||||
@@ -164,3 +175,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Cmd
|
||||
|
||||
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory:
|
||||
|
||||
```lua
|
||||
-- starship.lua
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
@@ -8,6 +8,76 @@ The configurations in this section are subject to change in future releases of S
|
||||
|
||||
:::
|
||||
|
||||
## TransientPrompt in PowerShell
|
||||
|
||||
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
|
||||
|
||||
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-TransientFunction {
|
||||
&starship module character
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
|
||||
Enable-TransientPrompt
|
||||
```
|
||||
|
||||
## TransientPrompt and TransientRightPrompt in Cmd
|
||||
|
||||
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <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
|
||||
- `off`: do not replace the prompt (i.e. turn off transience)
|
||||
|
||||
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
|
||||
|
||||
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_prompt_func(prompt)
|
||||
return io.popen("starship module character"
|
||||
.." --keymap="..rl.getvariable('keymap')
|
||||
):read("*a")
|
||||
end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_rprompt_func(prompt)
|
||||
return io.popen("starship module time"):read("*a")
|
||||
end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in Cmd
|
||||
|
||||
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements:
|
||||
|
||||
- To run a custom function right before the prompt is drawn, define a new function called `starship_preprompt_user_func`. This function receives the current prompt as a string that you can utilize. For example, to draw a rocket before the prompt, you would do
|
||||
|
||||
```lua
|
||||
function starship_preprompt_user_func(prompt)
|
||||
print("🚀")
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
- To run a custom function right before a command is executed, define a new function called `starship_precmd_user_func`. This function receives the current commandline as a string that you can utilize. For example, to print the command that's about to be executed, you would do
|
||||
|
||||
```lua
|
||||
function starship_precmd_user_func(line)
|
||||
print("Executing: "..line)
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in Bash
|
||||
|
||||
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
@@ -21,14 +91,16 @@ function blastoff(){
|
||||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
set -o functrace
|
||||
eval $(starship init bash)
|
||||
set +o functrace
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
@@ -45,7 +117,7 @@ function Invoke-Starship-PreCommand {
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
|
||||
|
||||
First, define a window title change function (identical in bash and zsh):
|
||||
|
||||
@@ -80,6 +152,16 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
For Cmd, you can change the window title using the `starship_preprompt_user_func` function.
|
||||
|
||||
```lua
|
||||
function starship_preprompt_user_func(prompt)
|
||||
console.settitle(os.getenv('USERNAME').."@"..os.getenv('COMPUTERNAME')..": "..os.getcwd())
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
@@ -95,9 +177,9 @@ 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.
|
||||
`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd.
|
||||
|
||||
### مثال
|
||||
|
||||
@@ -117,20 +199,45 @@ Produces a prompt like the following:
|
||||
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||
```
|
||||
|
||||
## Continuation Prompt
|
||||
|
||||
Some shells support a continuation prompt along with the normal prompt. This prompt is rendered instead of the normal prompt when the user has entered an incomplete statement (such as a single left parenthesis or quote).
|
||||
|
||||
Starship can set the continuation prompt using the `continuation_prompt` option. The default prompt is `"[∙](bright-black) "`.
|
||||
|
||||
Note: `continuation_prompt` should be set to a literal string without any variables.
|
||||
|
||||
Note: Continuation prompts are only available in the following shells:
|
||||
|
||||
- `bash`
|
||||
- `zsh`
|
||||
- `PowerShell`
|
||||
|
||||
### مثال
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# A continuation prompt that displays two filled in arrows
|
||||
continuation_prompt = "▶▶"
|
||||
```
|
||||
|
||||
## Style Strings
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `blink`
|
||||
- `hidden`
|
||||
- `strikethrough`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<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.
|
||||
|
||||
@@ -138,8 +245,14 @@ The `none` token overrides all other tokens in a string if it is not part of a `
|
||||
|
||||
A color specifier can be one of the following:
|
||||
|
||||
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
|
||||
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
|
||||
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
|
||||
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
|
||||
|
||||
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||
|
||||
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
|
||||
|
||||
- Many terminals disable support for `blink` by default
|
||||
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
|
||||
- `strikethrough` is not supported by the default macOS Terminal.app
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# FAQ
|
||||
# Frequently Asked Questions
|
||||
|
||||
## What is the configuration used in the demo GIF?
|
||||
|
||||
@@ -53,12 +53,12 @@ The prompt will use as much context as is provided, but no flags are "required".
|
||||
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
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?
|
||||
|
||||
@@ -69,13 +69,13 @@ If you see symbols that you don't recognise you can use `starship explain` to ex
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
env STARSHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
env STARSHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
@@ -118,5 +118,5 @@ If Starship was installed using the install script, the following command will d
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
sh -c 'rm "$(which starship)"'
|
||||
sh -c 'rm "$(command -v 'starship')"'
|
||||
```
|
||||
|
||||
@@ -72,6 +72,22 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/id-ID/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-id.png"
|
||||
alt="Bahasa Indonesia"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/it-IT/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-it.png"
|
||||
alt="Italiano"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@@ -123,6 +139,8 @@
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
[](https://vshymanskyy.github.io/StandWithUkraine)
|
||||
|
||||
<h1></h1>
|
||||
|
||||
<img
|
||||
@@ -153,148 +171,234 @@
|
||||
|
||||
- تثبيت [Nerd Font](https://www.nerdfonts.com/) وتمكينه في موجه الأوامر الخاصة بك (على سبيل المثال، جرب [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)).
|
||||
|
||||
### البدء مع Starship
|
||||
### Step 1. Install Starship
|
||||
|
||||
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
|
||||
Select your operating system from the list below to view installation instructions:
|
||||
|
||||
1. تثبيت **starship**:
|
||||
<details>
|
||||
<summary>Android</summary>
|
||||
|
||||
Install Starship using any of the following package managers:
|
||||
|
||||
#### تثبيت أحدث إصدار
|
||||
| Repository | Instructions |
|
||||
| --------------------------------------------------------------------------------- | ---------------------- |
|
||||
| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` |
|
||||
|
||||
</details>
|
||||
|
||||
##### From prebuilt binary, with Shell:
|
||||
<details>
|
||||
<summary>BSD</summary>
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
Install Starship using any of the following package managers:
|
||||
|
||||
لتحديث Starship نفسه، أعد تشغيل البرنامج النصي أعلاه. سيتم استبدال الإصدار الحالي بدون لمس تكوين Starship.
|
||||
| Distribution | Repository | Instructions |
|
||||
| ------------ | -------------------------------------------------------- | --------------------------------- |
|
||||
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
|
||||
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
|
||||
|
||||
**ملاحظة** - يمكن تجاوز الإعدادات الافتراضية لنص التثبيت لرؤية المساعدة المدمجة.
|
||||
</details>
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
<details>
|
||||
<summary>Linux</summary>
|
||||
|
||||
Install the latest version for your system:
|
||||
|
||||
#### التثبيت عبر مدير الحزم
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
Alternatively, install Starship using any of the following package managers:
|
||||
|
||||
##### بإستخدام [Homebrew](https://brew.sh/):
|
||||
| Distribution | Repository | Instructions |
|
||||
| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
|
||||
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
|
||||
| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` |
|
||||
| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` |
|
||||
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` |
|
||||
| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship` <br /> `dnf install starship` |
|
||||
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
|
||||
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
|
||||
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
|
||||
| Manjaro | | `pacman -S starship` |
|
||||
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |
|
||||
| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>macOS</summary>
|
||||
|
||||
##### بإستخدام [Scoop](https://scoop.sh):
|
||||
Install the latest version for your system:
|
||||
|
||||
```powershell
|
||||
scoop install starship
|
||||
```
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
2. أضف ما يلي إلى ملف تكوين موجه الأوامر الخاص بك:
|
||||
Alternatively, install Starship using any of the following package managers:
|
||||
|
||||
| Repository | Instructions |
|
||||
| -------------------------------------------------------- | --------------------------------------- |
|
||||
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
|
||||
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
|
||||
|
||||
#### Bash
|
||||
</details>
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.bashrc`:
|
||||
<details>
|
||||
<summary>Windows</summary>
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
Install the latest version for your system with the MSI-installers from the [releases section](https://github.com/starship/starship/releases/latest).
|
||||
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
Install Starship using any of the following package managers:
|
||||
|
||||
| Repository | Instructions |
|
||||
| -------------------------------------------------------------------------------------------- | --------------------------------------- |
|
||||
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
|
||||
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
|
||||
| [winget](https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/Starship/Starship) | `winget install --id Starship.Starship` |
|
||||
|
||||
#### Fish
|
||||
</details>
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.config/fish/config.fish`:
|
||||
### Step 2. Setup your shell to use Starship
|
||||
|
||||
```sh
|
||||
# ~/.config/fish/config.fish
|
||||
Configure your shell to initialize starship. Select yours from the list below:
|
||||
|
||||
starship init fish | source
|
||||
```
|
||||
<details>
|
||||
<summary>Bash</summary>
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.bashrc`:
|
||||
|
||||
#### Zsh
|
||||
```sh
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.zshrc`:
|
||||
</details>
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
<details>
|
||||
<summary>Cmd</summary>
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
|
||||
|
||||
```lua
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
#### PowerShell
|
||||
</details>
|
||||
|
||||
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
||||
<details>
|
||||
<summary>Elvish</summary>
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
أضف ما يلي إلى نهاية `~/.elvish/rc.elv`:
|
||||
|
||||
```sh
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
#### Ion
|
||||
Note: Only Elvish v0.18+ is supported
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.config/ion/initrc`:
|
||||
</details>
|
||||
|
||||
```sh
|
||||
# ~/.config/ion/initrc
|
||||
<details>
|
||||
<summary>Fish</summary>
|
||||
|
||||
eval $(starship init ion)
|
||||
```
|
||||
أضف ما يلي إلى نهاية `~/.config/fish/config.fish`:
|
||||
|
||||
```fish
|
||||
starship init fish | source
|
||||
```
|
||||
|
||||
#### Elvish
|
||||
</details>
|
||||
|
||||
**تحذير** يدعم فقط v0.15 أو أعلى. أضف ما يلي إلى نهاية `~/.elvish/rc.elv`:
|
||||
<details>
|
||||
<summary>Ion</summary>
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
أضف ما يلي إلى نهاية `~/.config/ion/initrc`:
|
||||
|
||||
eval (starship init elvish)
|
||||
```
|
||||
```sh
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
#### Tcsh
|
||||
<details>
|
||||
<summary>Nushell</summary>
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.tcshrc`:
|
||||
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
```sh
|
||||
mkdir ~/.cache/starship
|
||||
starship init nu | save ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
|
||||
|
||||
```sh
|
||||
source ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
#### Xonsh
|
||||
Note: Only Nushell v0.61+ is supported
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.xonshrc`:
|
||||
</details>
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
<details>
|
||||
<summary>PowerShell</summary>
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`):
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
</details>
|
||||
|
||||
**تحذير** هذا سوف يتغير في المستقبل. فقط إصدار nu v0.33 أو أعلى مدعوم. أضف ما يلي إلى ملف تكوين nu الخاص بك. يمكنك التحقق من موقع هذا الملف عن طريق تشغيل `config path` في nu.
|
||||
<details>
|
||||
<summary>Tcsh</summary>
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
"mkdir ~/.cache/starship",
|
||||
"starship init nu | save ~/.cache/starship/init.nu",
|
||||
"source ~/.cache/starship/init.nu"
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
أضف ما يلي إلى نهاية `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Xonsh</summary>
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.xonshrc`:
|
||||
|
||||
```python
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Zsh</summary>
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Step 3. Configure Starship
|
||||
|
||||
Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy!
|
||||
|
||||
If you're looking to further customize Starship:
|
||||
|
||||
- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking
|
||||
|
||||
- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others
|
||||
|
||||
## 🤝 المساهمة
|
||||
|
||||
@@ -308,11 +412,11 @@
|
||||
|
||||
يرجى التحقق من هذه الأعمال السابقة التي ساعدت على إنشاء starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts.
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts.
|
||||
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript.
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript.
|
||||
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons.
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# 🚀 التثبيت المتقدم
|
||||
# التثبيت المتقدم
|
||||
|
||||
To install starship, you need to do two things:
|
||||
|
||||
@@ -32,7 +32,7 @@ pkg install getconf
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
@@ -63,7 +63,6 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
@@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur
|
||||
error_symbol = "[✖](bold red)"
|
||||
```
|
||||
|
||||
*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples.
|
||||
_Note:_ The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples.
|
||||
|
||||
#### Command Duration
|
||||
|
||||
|
||||
@@ -2,535 +2,40 @@
|
||||
|
||||
Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊
|
||||
|
||||
## Nerd Font Symbols
|
||||
To get details on how to use a preset, simply click on the image.
|
||||
|
||||
This preset doesn't change anything except for the symbols used for each module. If emojis aren't your thing, this might catch your eye!
|
||||
## [Nerd Font Symbols](./nerd-font.md)
|
||||
|
||||

|
||||
This preset changes the symbols for each module to use Nerd Font symbols.
|
||||
|
||||
### المتطلبات الأساسية
|
||||
[](./nerd-font)
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[dart]
|
||||
symbol = " "
|
||||
|
||||
[directory]
|
||||
read_only = " "
|
||||
|
||||
[docker_context]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[nim]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[package]
|
||||
symbol = " "
|
||||
|
||||
[perl]
|
||||
symbol = " "
|
||||
|
||||
[php]
|
||||
symbol = " "
|
||||
|
||||
[python]
|
||||
symbol = " "
|
||||
|
||||
[ruby]
|
||||
symbol = " "
|
||||
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Bracketed Segments
|
||||
## [Bracketed Segments](./bracketed-segments.md)
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
Before:
|
||||
[](./bracketed-segments)
|
||||
|
||||

|
||||
## [Plain Text Symbols](./plain-text.md)
|
||||
|
||||
After:
|
||||
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
|
||||
|
||||

|
||||
[](./plain-text)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[sudo]
|
||||
format = '\[[as $symbol]\]
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Plain Text Symbols
|
||||
|
||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||
|
||||
Before (default setting with Fixedsys font):
|
||||
|
||||

|
||||
|
||||
After (Plain Text Symbols):
|
||||
|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[sudo]
|
||||
symbol = "sudo "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Hide Runtime Versions
|
||||
## [No Runtime Versions](./no-runtimes.md)
|
||||
|
||||
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
|
||||
|
||||

|
||||
[](./no-runtimes)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
||||
## Pure
|
||||
## [Pure Prompt](./pure-preset.md)
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||

|
||||
[](./pure-preset)
|
||||
|
||||
### Configuration
|
||||
## [Pastel Powerline](./pastel-powerline.md)
|
||||
|
||||
```toml
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
```
|
||||
[](./pastel-powerline)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
[Return to Presets](./README.md#bracketed-segments)
|
||||
|
||||
# Bracketed Segments Preset
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset bracketed-segments > ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/bracketed-segments.toml)
|
||||
|
||||
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml
|
||||
@@ -0,0 +1,21 @@
|
||||
[Return to Presets](./README.md#nerd-font-symbols)
|
||||
|
||||
# Nerd Font Symbols Preset
|
||||
|
||||
This preset changes the symbols for each module to use Nerd Font symbols.
|
||||
|
||||

|
||||
|
||||
### المتطلبات الأساسية
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset nerd-font-symbols > ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/nerd-font-symbols.toml)
|
||||
|
||||
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml
|
||||
@@ -0,0 +1,17 @@
|
||||
[Return to Presets](./README.md#no-runtime-versions)
|
||||
|
||||
# No Runtime Versions Preset
|
||||
|
||||
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
|
||||
|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset no-runtime-versions > ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/no-runtime-versions.toml)
|
||||
|
||||
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml
|
||||
@@ -0,0 +1,21 @@
|
||||
[Return to Presets](./README.md#pastel-powerline)
|
||||
|
||||
# Pastel Powerline Preset
|
||||
|
||||
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
|
||||
|
||||

|
||||
|
||||
### المتطلبات الأساسية
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Caskaydia Cove Nerd Font)
|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset pastel-powerline > ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/pastel-powerline.toml)
|
||||
|
||||
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml
|
||||
@@ -0,0 +1,17 @@
|
||||
[Return to Presets](./README.md#plain-text-symbols)
|
||||
|
||||
## Plain Text Symbols Preset
|
||||
|
||||
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
|
||||
|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset plain-text-symbols > ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/plain-text-symbols.toml)
|
||||
|
||||
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml
|
||||
@@ -0,0 +1,17 @@
|
||||
[Return to Presets](./README.md#pure)
|
||||
|
||||
# Pure Preset
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset pure-preset > ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/pure-preset.toml)
|
||||
|
||||
<<< @/.vuepress/public/presets/toml/pure-preset.toml
|
||||
@@ -18,7 +18,7 @@ features:
|
||||
footer: لەژێر مۆڵەتی ISCـە | مافی پارێزراوە © 2019-ئێستا بەژداریکەرانی Starship
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: یەکێ لە Promptـە شێڵ نەناسەکان"
|
||||
description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و بێسنور دڵخوازکراوەکان بۆ هەر شێڵێک! ئەو زانیارییانە پشان دەدات کە پێویستە، لەوکاتەیا بە ئارامی و سوکەڵەیی ئەمێنێتەوە. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.'
|
||||
description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و بێسنور دڵخوازکراوەکان بۆ هەر شێڵێک! ئەو زانیارییانە پشان دەدات کە پێویستە، لەوکاتەیا بە ئارامی و سوکەڵەیی ئەمێنێتەوە. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell.'
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@@ -42,8 +42,9 @@ description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و ب
|
||||
لەگەڵ شێڵ:
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
بۆ نوێکردنەوەی Starship خۆی، نووسینەکەی سەرەوە ڕەن بکەوە. وەشانی ئێستا دەگۆڕێت بێ ئەوەی دەسکاری ڕێکخستنەکانی Starship بکات.
|
||||
|
||||
|
||||
@@ -119,7 +120,11 @@ description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و ب
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: ئاگادارکردنەوە تەنها elvish v0.15 یان بەرزتر پشتگیری کراوە. :::
|
||||
::: ئاگادارکردنەوە
|
||||
|
||||
Only elvish v0.18 or higher is supported.
|
||||
|
||||
:::
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.elvish/rc.elv`:
|
||||
|
||||
@@ -143,17 +148,23 @@ description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و ب
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning This will change in the future. تەنها وەشانی v0.33 یان بەرزتری nu پشتگیریکراوە. ::: Add the following to your nu config file. ئەتوانی شوێنی ئەم پەڕگەیە بپشکنی بە جێبەجێکردنی `config path` لە nu دا.
|
||||
::: ئاگادارکردنەوە
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
"mkdir ~/.cache/starship",
|
||||
"starship init nu | save ~/.cache/starship/init.nu",
|
||||
"source ~/.cache/starship/init.nu"
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
This will change in the future. Only Nushell v0.61+ is supported.
|
||||
|
||||
:::
|
||||
|
||||
Add the following to 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 ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
|
||||
|
||||
```sh
|
||||
source ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
#### Xonsh
|
||||
|
||||
@@ -164,3 +175,14 @@ description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و ب
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Cmd
|
||||
|
||||
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory:
|
||||
|
||||
```lua
|
||||
-- starship.lua
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
@@ -8,6 +8,76 @@
|
||||
|
||||
:::
|
||||
|
||||
## TransientPrompt in PowerShell
|
||||
|
||||
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
|
||||
|
||||
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-TransientFunction {
|
||||
&starship module character
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
|
||||
Enable-TransientPrompt
|
||||
```
|
||||
|
||||
## TransientPrompt and TransientRightPrompt in Cmd
|
||||
|
||||
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <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
|
||||
- `off`: do not replace the prompt (i.e. turn off transience)
|
||||
|
||||
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
|
||||
|
||||
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_prompt_func(prompt)
|
||||
return io.popen("starship module character"
|
||||
.." --keymap="..rl.getvariable('keymap')
|
||||
):read("*a")
|
||||
end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_rprompt_func(prompt)
|
||||
return io.popen("starship module time"):read("*a")
|
||||
end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in Cmd
|
||||
|
||||
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements:
|
||||
|
||||
- To run a custom function right before the prompt is drawn, define a new function called `starship_preprompt_user_func`. This function receives the current prompt as a string that you can utilize. For example, to draw a rocket before the prompt, you would do
|
||||
|
||||
```lua
|
||||
function starship_preprompt_user_func(prompt)
|
||||
print("🚀")
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
- To run a custom function right before a command is executed, define a new function called `starship_precmd_user_func`. This function receives the current commandline as a string that you can utilize. For example, to print the command that's about to be executed, you would do
|
||||
|
||||
```lua
|
||||
function starship_precmd_user_func(line)
|
||||
print("Executing: "..line)
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
## فرمانە کڕیاڕخوازەکانی pre-prompt و pre-execution لە Bashـدا
|
||||
|
||||
بەپێچەوانەی شێلەکانی دیکە Bash هیچ چوارچێوەیەکی فەرمی preexec/precmdـی نییە. لەبەر ئەوە، دابین کردنی قولابە تەواو کڕیارخوازکراوەکان ئاسان نییە لە `Bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
@@ -21,14 +91,16 @@ function blastoff(){
|
||||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
set -o functrace
|
||||
eval $(starship init bash)
|
||||
set +o functrace
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
@@ -45,7 +117,7 @@ function Invoke-Starship-PreCommand {
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
|
||||
|
||||
First, define a window title change function (identical in bash and zsh):
|
||||
|
||||
@@ -80,6 +152,16 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
For Cmd, you can change the window title using the `starship_preprompt_user_func` function.
|
||||
|
||||
```lua
|
||||
function starship_preprompt_user_func(prompt)
|
||||
console.settitle(os.getenv('USERNAME').."@"..os.getenv('COMPUTERNAME')..": "..os.getcwd())
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
@@ -95,9 +177,9 @@ 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.
|
||||
`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd.
|
||||
|
||||
### نموونە
|
||||
|
||||
@@ -117,20 +199,45 @@ Produces a prompt like the following:
|
||||
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||
```
|
||||
|
||||
## Continuation Prompt
|
||||
|
||||
Some shells support a continuation prompt along with the normal prompt. This prompt is rendered instead of the normal prompt when the user has entered an incomplete statement (such as a single left parenthesis or quote).
|
||||
|
||||
Starship can set the continuation prompt using the `continuation_prompt` option. The default prompt is `"[∙](bright-black) "`.
|
||||
|
||||
Note: `continuation_prompt` should be set to a literal string without any variables.
|
||||
|
||||
Note: Continuation prompts are only available in the following shells:
|
||||
|
||||
- `bash`
|
||||
- `zsh`
|
||||
- `PowerShell`
|
||||
|
||||
### نموونە
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# A continuation prompt that displays two filled in arrows
|
||||
continuation_prompt = "▶▶"
|
||||
```
|
||||
|
||||
## Style Strings
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
- `تۆخ`
|
||||
- `لار`
|
||||
- `بنهێڵ`
|
||||
- `کاڵ کراو`
|
||||
- `پێچەوانە کراو`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `هیچ`
|
||||
- `تۆخ`
|
||||
- `لار`
|
||||
- `بنهێڵ`
|
||||
- `کاڵ کراو`
|
||||
- `پێچەوانە کراو`
|
||||
- `blink`
|
||||
- `hidden`
|
||||
- `strikethrough`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `هیچ`
|
||||
|
||||
کە `<color>` دیاریکەری ڕەنگێکە (لە ژێرەوە باسکراوە). `fg:<color>` و `<color>` لە ئێستادا هەمان شت ئەکەن، بەڵام ئەمە ڕەنگە لە داهاتووا بگۆڕێت. `inverted` ڕەنگی پاشبنەما و پێشبنەما ئەگۆڕێتەوە. ڕیزبەندی ووشەکان لە زنجیرەکەدا گرنگ نییە.
|
||||
|
||||
@@ -138,8 +245,14 @@ The `none` token overrides all other tokens in a string if it is not part of a `
|
||||
|
||||
A color specifier can be one of the following:
|
||||
|
||||
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
|
||||
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
|
||||
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
|
||||
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
|
||||
|
||||
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||
|
||||
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
|
||||
|
||||
- Many terminals disable support for `blink` by default
|
||||
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
|
||||
- `strikethrough` is not supported by the default macOS Terminal.app
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# FAQ
|
||||
# Frequently Asked Questions
|
||||
|
||||
## ئەو ڕێکخستنە چییە لە GIF پێشاندانەکەدا بەکارهاتووە؟
|
||||
|
||||
@@ -53,12 +53,12 @@ The prompt will use as much context as is provided, but no flags are "required".
|
||||
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
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?
|
||||
|
||||
@@ -69,13 +69,13 @@ If you see symbols that you don't recognise you can use `starship explain` to ex
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
env STARSHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
env STARSHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
@@ -118,5 +118,5 @@ If Starship was installed using the install script, the following command will d
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
sh -c 'rm "$(which starship)"'
|
||||
sh -c 'rm "$(command -v 'starship')"'
|
||||
```
|
||||
|
||||
@@ -68,6 +68,22 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/id-ID/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-id.png"
|
||||
alt="Bahasa Indonesia"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/it-IT/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-it.png"
|
||||
alt="Italiano"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@@ -119,6 +135,8 @@
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
[](https://vshymanskyy.github.io/StandWithUkraine)
|
||||
|
||||
<h1></h1>
|
||||
|
||||
<img
|
||||
@@ -149,148 +167,234 @@
|
||||
|
||||
- فۆنتێکی [Nerd](https://www.nerdfonts.com/) دامەزرابێ و چالاککرابێ لە تێرمیناڵەکەتدا (بۆ نموونە، [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads) تاقی بکەرەوە).
|
||||
|
||||
### دەستپێکردن
|
||||
### Step 1. Install Starship
|
||||
|
||||
**تێبینی**: بەهۆی خێرا گۆڕانی سەکۆ جیاوازەکان، تەنها بەشێک لە سەکۆ پشتگیری کراوەکان لە خوارەوە پشاندراون. ناتوانی ئەو سەکۆیە ببینیت کە ئەتەوێ؟ سەیری [ڕێنماییەکانی سەکۆکانی تر](https://starship.rs/installing/) بکە.
|
||||
Select your operating system from the list below to view installation instructions:
|
||||
|
||||
1. باینەری **starship** دابمەزرێنە:
|
||||
<details>
|
||||
<summary>Android</summary>
|
||||
|
||||
Install Starship using any of the following package managers:
|
||||
|
||||
#### کۆتا وەشان دابمەزرێنە
|
||||
| Repository | Instructions |
|
||||
| --------------------------------------------------------------------------------- | ---------------------- |
|
||||
| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` |
|
||||
|
||||
</details>
|
||||
|
||||
##### لە باینەرییە پێشوەخت دروستکراوەکانەوە، لەگەڵ شێڵی:
|
||||
<details>
|
||||
<summary>BSD</summary>
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
Install Starship using any of the following package managers:
|
||||
|
||||
بۆ نوێکردنەوەی Starship خۆی، نووسینەکەی سەرەوە ڕەن بکەوە. وەشانی ئێستا دەگۆڕێت بێ ئەوەی دەسکاری ڕێکخستنەکانی Starship بکات.
|
||||
| Distribution | Repository | Instructions |
|
||||
| ------------ | -------------------------------------------------------- | --------------------------------- |
|
||||
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
|
||||
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
|
||||
|
||||
**تێبینی** - بنەڕەتییەکانی سکریپتی دامەزراندن ئەتوانرێ بگۆڕدرێ سەیری یارمەتی نێوخۆیی بکە.
|
||||
</details>
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
<details>
|
||||
<summary>Linux</summary>
|
||||
|
||||
Install the latest version for your system:
|
||||
|
||||
#### دابمەزرێنە لەڕێگەی بەڕێوبەری گورزەوە
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
Alternatively, install Starship using any of the following package managers:
|
||||
|
||||
##### لەگەڵ [Homebrew](https://brew.sh/):
|
||||
| Distribution | Repository | Instructions |
|
||||
| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
|
||||
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
|
||||
| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` |
|
||||
| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` |
|
||||
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` |
|
||||
| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship` <br /> `dnf install starship` |
|
||||
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
|
||||
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
|
||||
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
|
||||
| Manjaro | | `pacman -S starship` |
|
||||
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |
|
||||
| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>macOS</summary>
|
||||
|
||||
##### لەگەڵ [Scoop](https://scoop.sh):
|
||||
Install the latest version for your system:
|
||||
|
||||
```powershell
|
||||
scoop install starship
|
||||
```
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
2. نوسینی init زیادبکە بۆ فایلی ڕێکخستنی شێڵەکەت:
|
||||
Alternatively, install Starship using any of the following package managers:
|
||||
|
||||
| Repository | Instructions |
|
||||
| -------------------------------------------------------- | --------------------------------------- |
|
||||
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
|
||||
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
|
||||
|
||||
#### Bash
|
||||
</details>
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.bashrc`:
|
||||
<details>
|
||||
<summary>Windows</summary>
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
Install the latest version for your system with the MSI-installers from the [releases section](https://github.com/starship/starship/releases/latest).
|
||||
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
Install Starship using any of the following package managers:
|
||||
|
||||
| Repository | Instructions |
|
||||
| -------------------------------------------------------------------------------------------- | --------------------------------------- |
|
||||
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
|
||||
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
|
||||
| [winget](https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/Starship/Starship) | `winget install --id Starship.Starship` |
|
||||
|
||||
#### Fish
|
||||
</details>
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.config/fish/config.fish`:
|
||||
### Step 2. Setup your shell to use Starship
|
||||
|
||||
```sh
|
||||
# ~/.config/fish/config.fish
|
||||
Configure your shell to initialize starship. Select yours from the list below:
|
||||
|
||||
starship init fish | source
|
||||
```
|
||||
<details>
|
||||
<summary>Bash</summary>
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.bashrc`:
|
||||
|
||||
#### Zsh
|
||||
```sh
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.zshrc`:
|
||||
</details>
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
<details>
|
||||
<summary>Cmd</summary>
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
|
||||
|
||||
```lua
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
#### PowerShell
|
||||
</details>
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `Microsoft.PowerShell_profile.ps1`. ئەتوانی شوێنی ئەم فایلە ببینیتەوە بە سەیرکردنی گۆڕاوی `$PROFILE` لە PowerShell. ئاسایی ڕێڕەوەکە بریتیە لە `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` یان `/.config/powershell/Microsoft.PowerShell_profile.ps1` لەسەر -Nix.
|
||||
<details>
|
||||
<summary>Elvish</summary>
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.elvish/rc.elv`:
|
||||
|
||||
```sh
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
#### Ion
|
||||
Note: Only Elvish v0.18+ is supported
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.config/ion/initrc`:
|
||||
</details>
|
||||
|
||||
```sh
|
||||
# ~/.config/ion/initrc
|
||||
<details>
|
||||
<summary>Fish</summary>
|
||||
|
||||
eval $(starship init ion)
|
||||
```
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.config/fish/config.fish`:
|
||||
|
||||
```fish
|
||||
starship init fish | source
|
||||
```
|
||||
|
||||
#### Elvish
|
||||
</details>
|
||||
|
||||
**ئاگادارکردنەوە** تەنها elvish v0.15 یان بەرزتر پشتگیری کراوە. ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.elvish/rc.elv`:
|
||||
<details>
|
||||
<summary>Ion</summary>
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.config/ion/initrc`:
|
||||
|
||||
eval (starship init elvish)
|
||||
```
|
||||
```sh
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
#### Tcsh
|
||||
<details>
|
||||
<summary>Nushell</summary>
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.tcshrc`:
|
||||
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
```sh
|
||||
mkdir ~/.cache/starship
|
||||
starship init nu | save ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
|
||||
|
||||
```sh
|
||||
source ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
#### Xonsh
|
||||
Note: Only Nushell v0.61+ is supported
|
||||
|
||||
ئەمەی دێت زیادبکە بۆ کۆتایی پەڕگەی `~/.xonshrc`:
|
||||
</details>
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
<details>
|
||||
<summary>PowerShell</summary>
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`):
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
</details>
|
||||
|
||||
**ئاگادارکردنەوە** ئەمە لە داهاتوودا دەگۆڕێت. تەنها وەشانی v0.33 یان بەرزتری nu پشتگیریکراوە. ئەمەی خوارەوە زیادبکە بۆ پەڕگەی ڕێکخستنی nuـەکەت. ئەتوانی شوێنی ئەم پەڕگەیە بپشکنی بە جێبەجێکردنی `config path` لە nu دا.
|
||||
<details>
|
||||
<summary>Tcsh</summary>
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
"mkdir ~/.cache/starship",
|
||||
"starship init nu | save ~/.cache/starship/init.nu",
|
||||
"source ~/.cache/starship/init.nu"
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Xonsh</summary>
|
||||
|
||||
ئەمەی دێت زیادبکە بۆ کۆتایی پەڕگەی `~/.xonshrc`:
|
||||
|
||||
```python
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Zsh</summary>
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Step 3. Configure Starship
|
||||
|
||||
Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy!
|
||||
|
||||
If you're looking to further customize Starship:
|
||||
|
||||
- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking
|
||||
|
||||
- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others
|
||||
|
||||
## 🤝 بەژداریکردن
|
||||
|
||||
@@ -304,11 +408,11 @@
|
||||
|
||||
تکایە ئەم کارە کۆنانە سەیربکەوە کە ئیلهامی دروستکردنی starship دا. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - یەکێ لە promptـەکانی ZSH بۆ ئاسمانەوانان.
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts.
|
||||
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - ڕووکاری robbyrussellـی شێڵ نەناس کە بە جاڤاسکریپت نووسراوە.
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript.
|
||||
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** - یەکێ لە promptـە شێڵ نەناسە دڵخوازکراوەکان کە لە powerline دەچێ لەگەڵ ئایکۆندا.
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# 🚀 Advanced Installation
|
||||
# Advanced Installation
|
||||
|
||||
To install starship, you need to do two things:
|
||||
|
||||
@@ -32,7 +32,7 @@ pkg install getconf
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
@@ -63,7 +63,6 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
@@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur
|
||||
error_symbol = "[✖](bold red)"
|
||||
```
|
||||
|
||||
*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples.
|
||||
_Note:_ The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples.
|
||||
|
||||
#### Command Duration
|
||||
|
||||
|
||||
@@ -2,535 +2,40 @@
|
||||
|
||||
ئەمە کۆکراوەیەکە لەو پێش ڕێکخستنانەی کە لەلایەن کۆمەڵگاوە نێردراون بۆ Starship. ئەگەر پێش ڕێکخستنێکت هەیە بۆ هاوبەشکردن، تکایە [PRـێک بنێرە](https://github.com/starship/starship/edit/master/docs/presets/README.md) کە ئەم پەڕگەیە نوێبکاتەوە! 😊
|
||||
|
||||
## هێماکانی Nerd Font
|
||||
To get details on how to use a preset, simply click on the image.
|
||||
|
||||
ئەم پێش ڕێکخستنە هیچ شتێک ناگۆڕێت جگە لە هێماکان کە بەکارهاتوون بۆ هەر moduleـێک. ئەگەر ئیمۆجیەکان ئەو شتە نین تۆ حەزت لێیە، ئەمە ڕەنگە سەرنجت ڕاکێشێت!
|
||||
## [هێماکانی Nerd Font](./nerd-font.md)
|
||||
|
||||

|
||||
This preset changes the symbols for each module to use Nerd Font symbols.
|
||||
|
||||
### پێشمەرجەکان
|
||||
[](./nerd-font)
|
||||
|
||||
- [Nerd Font](https://www.nerdfonts.com/)ـێک دامەزرێنراوە و چالاککراوە لە تێرمیناڵەکەتدا (بۆ نموونە Fira Code Nerd Font بەکاردەهێنێ)
|
||||
|
||||
### ڕێکخستن
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[dart]
|
||||
symbol = " "
|
||||
|
||||
[directory]
|
||||
read_only = " "
|
||||
|
||||
[docker_context]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[nim]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[package]
|
||||
symbol = " "
|
||||
|
||||
[perl]
|
||||
symbol = " "
|
||||
|
||||
[php]
|
||||
symbol = " "
|
||||
|
||||
[python]
|
||||
symbol = " "
|
||||
|
||||
[ruby]
|
||||
symbol = " "
|
||||
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## پارچە کەوانەکراوەکان
|
||||
## [پارچە کەوانەکراوەکان](./bracketed-segments.md)
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
پێشتر:
|
||||
[](./bracketed-segments)
|
||||
|
||||

|
||||
## [هێما نووسینەکییە ئاساییەکان](./plain-text.md)
|
||||
|
||||
دواتر:
|
||||
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
|
||||
|
||||

|
||||
[](./plain-text)
|
||||
|
||||
### ڕێکخستن
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[sudo]
|
||||
format = '\[[as $symbol]\]
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## هێما نووسینەکییە ئاساییەکان
|
||||
|
||||
ئەم پێش ڕێکخستنە هێماکان دەگۆڕێت بۆ نووسینی ئاسایی. ئەگەر تێرمیناڵ/فۆنتەکەت ناتوانێ NerdFonts/ئیمۆجییەکان دەربخات، لەوانەیە پیویست بکا ئەم پێش ڕێکخستنە بەکاربهێنیت!
|
||||
|
||||
پێشتر (ڕێکخستنی بنەڕەتی لەگەڵ فۆنتی Fixedsys):
|
||||
|
||||

|
||||
|
||||
دواتر (هێما نووسینەکییە ئاساییەکان):
|
||||
|
||||

|
||||
|
||||
### ڕێکخستن
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[sudo]
|
||||
symbol = "sudo "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## شاردنەوەی وەشانەکانی کاتی جێبەجێکردن
|
||||
## [No Runtime Versions](./no-runtimes.md)
|
||||
|
||||
ئەم پێش ڕێکخستنە وەشانی کاتی جێبەجێکردنی زمانەکان دەشارێتەوە. ئەگەر کاردەکەیت لەگەڵ containerو ژینگە خەیاڵییەکان، ئەمە بۆ تۆیە!
|
||||
|
||||

|
||||
[](./no-runtimes)
|
||||
|
||||
### ڕێکخستن
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
||||
## بێخەوش
|
||||
## [Pure Prompt](./pure-preset.md)
|
||||
|
||||
ئەم پێش ڕێکخستنە لاسایی شێواز و ڕەفتاری [Pure](https://github.com/sindresorhus/pure) دەکاتەوە.
|
||||
|
||||

|
||||
[](./pure-preset)
|
||||
|
||||
### ڕێکخستن
|
||||
## [Pastel Powerline](./pastel-powerline.md)
|
||||
|
||||
```toml
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
```
|
||||
[](./pastel-powerline)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
[Return to Presets](./README.md#bracketed-segments)
|
||||
|
||||
# Bracketed Segments Preset
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||

|
||||
|
||||
### ڕێکخستن
|
||||
|
||||
```sh
|
||||
starship preset bracketed-segments > ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/bracketed-segments.toml)
|
||||
|
||||
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml
|
||||
@@ -0,0 +1,21 @@
|
||||
[Return to Presets](./README.md#nerd-font-symbols)
|
||||
|
||||
# Nerd Font Symbols Preset
|
||||
|
||||
This preset changes the symbols for each module to use Nerd Font symbols.
|
||||
|
||||

|
||||
|
||||
### پێشمەرجەکان
|
||||
|
||||
- [Nerd Font](https://www.nerdfonts.com/)ـێک دامەزرێنراوە و چالاککراوە لە تێرمیناڵەکەتدا (بۆ نموونە Fira Code Nerd Font بەکاردەهێنێ)
|
||||
|
||||
### ڕێکخستن
|
||||
|
||||
```sh
|
||||
starship preset nerd-font-symbols > ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/nerd-font-symbols.toml)
|
||||
|
||||
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml
|
||||
@@ -0,0 +1,17 @@
|
||||
[Return to Presets](./README.md#no-runtime-versions)
|
||||
|
||||
# No Runtime Versions Preset
|
||||
|
||||
ئەم پێش ڕێکخستنە وەشانی کاتی جێبەجێکردنی زمانەکان دەشارێتەوە. ئەگەر کاردەکەیت لەگەڵ containerو ژینگە خەیاڵییەکان، ئەمە بۆ تۆیە!
|
||||
|
||||

|
||||
|
||||
### ڕێکخستن
|
||||
|
||||
```sh
|
||||
starship preset no-runtime-versions > ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/no-runtime-versions.toml)
|
||||
|
||||
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml
|
||||
@@ -0,0 +1,21 @@
|
||||
[Return to Presets](./README.md#pastel-powerline)
|
||||
|
||||
# Pastel Powerline Preset
|
||||
|
||||
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
|
||||
|
||||

|
||||
|
||||
### پێشمەرجەکان
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Caskaydia Cove Nerd Font)
|
||||
|
||||
### ڕێکخستن
|
||||
|
||||
```sh
|
||||
starship preset pastel-powerline > ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/pastel-powerline.toml)
|
||||
|
||||
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml
|
||||
@@ -0,0 +1,17 @@
|
||||
[Return to Presets](./README.md#plain-text-symbols)
|
||||
|
||||
## Plain Text Symbols Preset
|
||||
|
||||
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
|
||||
|
||||

|
||||
|
||||
### ڕێکخستن
|
||||
|
||||
```sh
|
||||
starship preset plain-text-symbols > ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/plain-text-symbols.toml)
|
||||
|
||||
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml
|
||||
@@ -0,0 +1,17 @@
|
||||
[Return to Presets](./README.md#pure)
|
||||
|
||||
# Pure Preset
|
||||
|
||||
ئەم پێش ڕێکخستنە لاسایی شێواز و ڕەفتاری [Pure](https://github.com/sindresorhus/pure) دەکاتەوە.
|
||||
|
||||

|
||||
|
||||
### ڕێکخستن
|
||||
|
||||
```sh
|
||||
starship preset pure-preset > ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/pure-preset.toml)
|
||||
|
||||
<<< @/.vuepress/public/presets/toml/pure-preset.toml
|
||||
@@ -18,7 +18,7 @@ features:
|
||||
footer: ICS lizenziert | Copyright © 2019-heute Starship-Mitwirkende
|
||||
#Used for the description meta tag, for SEO
|
||||
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, und PowerShell.
|
||||
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. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@@ -42,8 +42,9 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
|
||||
Mit Shell:
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
Um Starship selbst zu aktualisieren, lasse das Skript oben nochmal laufen. Es wird die vorhandene Version ersetzen, ohne die Konfiguration von Starship zu berühren.
|
||||
|
||||
|
||||
@@ -61,12 +62,12 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
|
||||
scoop install starship
|
||||
```
|
||||
|
||||
1. Füge das init-Skript zur Konfigurationsdatei deiner Shell hinzu:
|
||||
1. Führe den init Befehl zum Start der Shell aus:
|
||||
|
||||
|
||||
#### Bash
|
||||
|
||||
Trage folgendes am Ende der `~/.bashrc` ein:
|
||||
Füge dies ans Ende von `~/.bashrc`:
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
@@ -88,7 +89,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
|
||||
|
||||
#### Zsh
|
||||
|
||||
Trage folgendes am Ende der `~/.zshrc` ein:
|
||||
Füge dies ans Ende von `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
@@ -119,7 +120,11 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning Nur elvish v0.15 oder höher ist unterstützt. :::
|
||||
::: warning
|
||||
|
||||
Only elvish v0.18 or higher is supported.
|
||||
|
||||
:::
|
||||
|
||||
Trage folgendes am Ende von `~/.config/fish/rc.elv` ein:
|
||||
|
||||
@@ -143,17 +148,23 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning Dies wird sich in der Zukunft ändern. Es wird nur nu Version v0.33 oder höher unterstützt. ::: Füge Folgendes zu deiner nu Konfigurationsdatei hinzu. Du kannst den Speicherort dieser Datei überprüfen, indem du `config path` in nu ausführst.
|
||||
::: warning
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
"mkdir ~/.cache/starship",
|
||||
"starship init nu | save ~/.cache/starship/init.nu",
|
||||
"source ~/.cache/starship/init.nu"
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
This will change in the future. Only Nushell v0.61+ is supported.
|
||||
|
||||
:::
|
||||
|
||||
Add the following to 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 ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
|
||||
|
||||
```sh
|
||||
source ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
#### Xonsh
|
||||
|
||||
@@ -164,3 +175,14 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### ⌘ Cmd
|
||||
|
||||
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory:
|
||||
|
||||
```lua
|
||||
-- starship.lua
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
@@ -2,12 +2,82 @@
|
||||
|
||||
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.
|
||||
|
||||
::: Warnung
|
||||
::: warning
|
||||
|
||||
Die hier beschriebenen Konfigurationen werden sich mit kommenden Updates von Starship verändern.
|
||||
|
||||
:::
|
||||
|
||||
## TransientPrompt in PowerShell
|
||||
|
||||
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
|
||||
|
||||
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-TransientFunction {
|
||||
&starship module character
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
|
||||
Enable-TransientPrompt
|
||||
```
|
||||
|
||||
## TransientPrompt and TransientRightPrompt in Cmd
|
||||
|
||||
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <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
|
||||
- `off`: do not replace the prompt (i.e. turn off transience)
|
||||
|
||||
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
|
||||
|
||||
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_prompt_func(prompt)
|
||||
return io.popen("starship module character"
|
||||
.." --keymap="..rl.getvariable('keymap')
|
||||
):read("*a")
|
||||
end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_rprompt_func(prompt)
|
||||
return io.popen("starship module time"):read("*a")
|
||||
end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in Cmd
|
||||
|
||||
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements:
|
||||
|
||||
- To run a custom function right before the prompt is drawn, define a new function called `starship_preprompt_user_func`. This function receives the current prompt as a string that you can utilize. For example, to draw a rocket before the prompt, you would do
|
||||
|
||||
```lua
|
||||
function starship_preprompt_user_func(prompt)
|
||||
print("🚀")
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
- To run a custom function right before a command is executed, define a new function called `starship_precmd_user_func`. This function receives the current commandline as a string that you can utilize. For example, to print the command that's about to be executed, you would do
|
||||
|
||||
```lua
|
||||
function starship_precmd_user_func(line)
|
||||
print("Executing: "..line)
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
## Benutzerdefinierte Pre-Prompt- und Pre-Execution-Befehle in der Bash
|
||||
|
||||
Die Bash Shell hat, im Gegensatz zu vielen anderen Shells, kein konventionelles preexec/precmd Framework. Daher gestaltet es sich schwierig, vollständig anpassbare Hooks für `bash` anzubieten. Starship bietet daher die begrenzte Möglichkeit, eigene Funktionen in das prompt rendering Verfahren einzufügen:
|
||||
@@ -21,14 +91,16 @@ function blastoff(){
|
||||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- Um eine benutzerdefinierte Funktion direkt vor der Ausführung eines Befehls auszulösen, kann man den [`DEBUG` trap](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/) Mechanismus verwenden. Allerdings **muss** das DEBUG Signal *vor* der Initialisierung von Starship getrapped werden! Starship kann den Wert der DEBUG-trap speichern. Wenn der Wert der DEBUG-trap überschrieben wird nachdem Starship gestartet ist kann es zu Fehlern im Bezug auf die verwendete DEBUG-trap kommen.
|
||||
- Um eine benutzerdefinierte Funktion direkt vor der Ausführung eines Befehls auszulösen, kann man den [`DEBUG` trap](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/) Mechanismus verwenden. Allerdings **muss** das DEBUG Signal _vor_ der Initialisierung von Starship getrapped werden! Starship kann den Wert der DEBUG-trap speichern. Wenn der Wert der DEBUG-trap überschrieben wird nachdem Starship gestartet ist kann es zu Fehlern im Bezug auf die verwendete DEBUG-trap kommen.
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
trap blastoff DEBUG # DEBUG-Trap *bevor* Starship läuft
|
||||
trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
set -o functrace
|
||||
eval $(starship init bash)
|
||||
set +o functrace
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
@@ -45,7 +117,7 @@ function Invoke-Starship-PreCommand {
|
||||
|
||||
## Fenstertitel anpassen
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish ist standardmäßig so konfiguriert. Starship ändert standardmäßig den Fenstertitel nicht, aber es ist sehr einfach die Funktion zu `bash` oder `zsh` hinzuzufügen.
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish ist standardmäßig so konfiguriert. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
|
||||
|
||||
Zuerst wird eine Funktion definiert um den Fenstertitel zu ändern ( für bash und zsh ist die Funktion identisch):
|
||||
|
||||
@@ -80,6 +152,16 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
For Cmd, you can change the window title using the `starship_preprompt_user_func` function.
|
||||
|
||||
```lua
|
||||
function starship_preprompt_user_func(prompt)
|
||||
console.settitle(os.getenv('USERNAME').."@"..os.getenv('COMPUTERNAME')..": "..os.getcwd())
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
@@ -95,9 +177,9 @@ 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.
|
||||
`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd.
|
||||
|
||||
### Beispiel
|
||||
|
||||
@@ -117,29 +199,60 @@ Produces a prompt like the following:
|
||||
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||
```
|
||||
|
||||
## Fortsetzungsprompt
|
||||
|
||||
Einige Shells unterstützen einen speziellen Fortsetzungsprompt zusätzlich zum normalen Prompt. Dieser Prompt wird anstelle des normalen Prompts ausgegeben, wenn der Benutzer ein unvollständiges Kommando eingegeben hat (etwa wie eine einzelne linke Klammer oder ein einzelnes Anführungszeichen).
|
||||
|
||||
Starship kann das Aussehen des Fortsetzungs-Prompts mit der `continuation_prompt` Option einstellen. The default prompt is `"[∙](bright-black) "`.
|
||||
|
||||
Hinweis: Die `continuation_prompt` Anweisung sollte auf einen literalen String ohne Variablen gesetzt werden.
|
||||
|
||||
Hinweis: Fortsetzungs-Prompts sind nur für folgende Shells verfügbar:
|
||||
|
||||
- `bash`
|
||||
- `zsh`
|
||||
- `PowerShell`
|
||||
|
||||
### Beispiel
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Ein Fortsetzungs-Prompt der 2 ausgefüllte Pfeile darstellt
|
||||
continuation_prompt = "▶▶"
|
||||
```
|
||||
|
||||
## Style-Strings
|
||||
|
||||
Style-String sind Wortlisten, getrennt durch Leerzeichen. Die Wörter haben keine Groß- und Kleinschreibung (z.B. `bold` und `BoLd` werden als dieselbe Zeichenkette betrachtet). Jedes Wort kann eines der folgenden sein:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `invertiert`
|
||||
- `blink`
|
||||
- `hidden`
|
||||
- `strikethrough`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
wobei `<color>` eine Farbspezifikation ist (siehe unten). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. 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. `inverted` tauscht Hinter- und Vordergrundfarben. Die Reihenfolge der Wörter in der Liste spielt keine Rolle.
|
||||
|
||||
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`. In der Zukunft könnte die Unterstützung von `none` in Verbindung mit anderen Tokens fallen gelassen werden.
|
||||
`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.
|
||||
|
||||
Eine Farbspezifikation kann wie folgt aussehen:
|
||||
|
||||
- Einer der Standardfarben der Konsole: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Optional kann ein `bright-` vorangestellt werden um die helle Version zu erhalten (z.B. `bright-white`).
|
||||
- Eine `#` gefolgt von einer sechsstelligen Hexadezimalnummer. Dies ergibt einen [RGB hex Farbcode](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- Eine Zahl zwischen 0-255. Dies ergibt einen [8-bit ANSI-Farbcode](https://i.stack.imgur.com/KTSQa.png).
|
||||
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
|
||||
- Eine `#` gefolgt von einer sechsstelligen Hexadezimalnummer. Dies ergibt einen [RGB hex Farbcode](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- Eine Zahl zwischen 0-255. Dies ergibt einen [8-bit ANSI-Farbcode](https://i.stack.imgur.com/KTSQa.png).
|
||||
|
||||
Wenn mehrere Farben für Vordergrund oder Hintergrund angegeben werden, hat die letzte Farbe der Zeichenkette Priorität.
|
||||
|
||||
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
|
||||
|
||||
- Many terminals disable support for `blink` by default
|
||||
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
|
||||
- `strikethrough` is not supported by the default macOS Terminal.app
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# FAQ
|
||||
# Frequently Asked Questions
|
||||
|
||||
## Wie ist die Konfiguration im Demo GIF?
|
||||
|
||||
@@ -53,12 +53,12 @@ Die Eingabeaufforderung verwendet so viel Kontext wie möglich, aber keine Flagg
|
||||
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
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?
|
||||
|
||||
@@ -69,13 +69,13 @@ If you see symbols that you don't recognise you can use `starship explain` to ex
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
env STARSHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
env STARSHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
@@ -117,6 +117,6 @@ If Starship was installed using a package manager, please refer to their docs fo
|
||||
Wenn Starship mit Hilfe des Installationsscripts installiert wurde, entfernt der folgende Befehl Starship:
|
||||
|
||||
```sh
|
||||
# Starship binary suchen und löschen
|
||||
sh -c 'rm "$(which starship)"'
|
||||
# Locate and delete the starship binary
|
||||
sh -c 'rm "$(command -v 'starship')"'
|
||||
```
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Crates.io-Version"
|
||||
alt="Crates.io Version"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
@@ -72,6 +72,22 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/id-ID/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-id.png"
|
||||
alt="Bahasa Indonesia"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/it-IT/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-it.png"
|
||||
alt="Italiano"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@@ -123,16 +139,18 @@
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
[](https://vshymanskyy.github.io/StandWithUkraine)
|
||||
|
||||
<h1></h1>
|
||||
|
||||
<img
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship mit iTem2 und dem Theme „Snazzy“"
|
||||
alt="Starship mit iTerm2 und dem Snazzy Thema"
|
||||
width="50%"
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**Der minimalistische, super schnelle und unendlich anpassbare Prompt für jede Shell!**
|
||||
**Minimale, super schnelle und unendlich anpassbare Prompt für jede Shell!**
|
||||
|
||||
- **Schnell:** sie ist schnell – _sehr, sehr_ schnell! 🚀
|
||||
- **Konfigurierbar:** konfiguriere jedes Detail der Prompt.
|
||||
@@ -153,148 +171,234 @@
|
||||
|
||||
- Eine [Nerd Schriftart](https://www.nerdfonts.com/) installiert und im Terminal aktiviert (zum Beispiel [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)).
|
||||
|
||||
### Erste Schritte
|
||||
### Schritt 1. Installiere Starship
|
||||
|
||||
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
|
||||
Wähle dein Betriebssystem aus der Liste für detaillierte Installationsanweisungen:
|
||||
|
||||
1. Installiere **starship**:
|
||||
<details>
|
||||
<summary>Android</summary>
|
||||
|
||||
Install Starship using any of the following package managers:
|
||||
|
||||
#### Neueste Version installieren
|
||||
| Repository | Instructions |
|
||||
| --------------------------------------------------------------------------------- | ---------------------- |
|
||||
| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` |
|
||||
|
||||
</details>
|
||||
|
||||
##### Neuster GitHub Release über die Shell:
|
||||
<details>
|
||||
<summary>BSD</summary>
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
Install Starship using any of the following package managers:
|
||||
|
||||
Um Starship selbst zu aktualisieren, lasse das Skript oben nochmal laufen. Es wird die vorhandene Version ersetzen, ohne die Konfiguration von Starship zu berühren.
|
||||
| Distribution | Repository | Instructions |
|
||||
| ------------ | -------------------------------------------------------- | --------------------------------- |
|
||||
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
|
||||
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
|
||||
|
||||
**Hinweis** - Die Standardwerte des Installationsskripts können überschrieben werden, sehen Sie die integrierte Hilfe.
|
||||
</details>
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
<details>
|
||||
<summary>Linux</summary>
|
||||
|
||||
Install the latest version for your system:
|
||||
|
||||
#### Installation mithilfe eines Paket-Managers
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
Alternatively, install Starship using any of the following package managers:
|
||||
|
||||
##### Mit [Homebrew](https://brew.sh/):
|
||||
| Distribution | Repository | Instructions |
|
||||
| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
|
||||
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
|
||||
| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` |
|
||||
| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` |
|
||||
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` |
|
||||
| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship` <br /> `dnf install starship` |
|
||||
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
|
||||
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
|
||||
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
|
||||
| Manjaro | | `pacman -S starship` |
|
||||
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |
|
||||
| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>macOS</summary>
|
||||
|
||||
##### Mit [scoop](https://scoop.sh):
|
||||
Install the latest version for your system:
|
||||
|
||||
```powershell
|
||||
scoop install starship
|
||||
```
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
2. Füge das init-Skript zur Konfigurationsdatei deiner Shell hinzu:
|
||||
Alternatively, install Starship using any of the following package managers:
|
||||
|
||||
| Repository | Instructions |
|
||||
| -------------------------------------------------------- | --------------------------------------- |
|
||||
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
|
||||
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
|
||||
|
||||
#### Bash
|
||||
</details>
|
||||
|
||||
Trage folgendes am Ende der `~/.bashrc` ein:
|
||||
<details>
|
||||
<summary>Windows</summary>
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
Install the latest version for your system with the MSI-installers from the [releases section](https://github.com/starship/starship/releases/latest).
|
||||
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
Install Starship using any of the following package managers:
|
||||
|
||||
| Repository | Instructions |
|
||||
| -------------------------------------------------------------------------------------------- | --------------------------------------- |
|
||||
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
|
||||
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
|
||||
| [winget](https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/Starship/Starship) | `winget install --id Starship.Starship` |
|
||||
|
||||
#### Fish
|
||||
</details>
|
||||
|
||||
Trage folgendes am Ende der `~/.config/fish/config.fish` ein:
|
||||
### Schritt 2. Richte deine Shell für die Nutzung von Starship ein
|
||||
|
||||
```sh
|
||||
# ~/.config/fish/config.fish
|
||||
Konfigurieren deine Shell um Starship zu initialisieren. Wähle dafür deine Shell aus der Liste aus:
|
||||
|
||||
starship init fish | source
|
||||
```
|
||||
<details>
|
||||
<summary>Bash</summary>
|
||||
|
||||
Füge dies ans Ende von `~/.bashrc`:
|
||||
|
||||
#### Zsh
|
||||
```sh
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
|
||||
Trage folgendes am Ende der `~/.zshrc` ein:
|
||||
</details>
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
<details>
|
||||
<summary>⌘ Cmd</summary>
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
|
||||
|
||||
```lua
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
#### PowerShell
|
||||
</details>
|
||||
|
||||
Füge das folgende zum Ende von `Microsoft.PowerShell_profile.ps1` hinzu. Sie können den Speicherort dieser Datei überprüfen, indem Sie die `$PROFILE` Variable in PowerShell abfragen. Normalerweise ist der Pfad `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` oder `~/.config/powershell/Microsoft.PowerShell_profile.ps1` auf -Nix.
|
||||
<details>
|
||||
<summary>Elvish</summary>
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
Trage folgendes am Ende von `~/.config/fish/rc.elv` ein:
|
||||
|
||||
```sh
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
#### Ion
|
||||
Note: Only Elvish v0.18+ is supported
|
||||
|
||||
Trage folgendes am Ende der `~/.config/ion/initrc` ein:
|
||||
</details>
|
||||
|
||||
```sh
|
||||
# ~/.config/ion/initrc
|
||||
<details>
|
||||
<summary>Fish</summary>
|
||||
|
||||
eval $(starship init ion)
|
||||
```
|
||||
Trage folgendes am Ende der `~/.config/fish/config.fish` ein:
|
||||
|
||||
```fish
|
||||
starship init fish | source
|
||||
```
|
||||
|
||||
#### Elvish
|
||||
</details>
|
||||
|
||||
**Warnung** Nur elvish v0.15 oder höher wird unterstützt. Trage folgendes am Ende von `~/.config/fish/rc.elv` ein:
|
||||
<details>
|
||||
<summary>Ion</summary>
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
Trage folgendes am Ende der `~/.config/ion/initrc` ein:
|
||||
|
||||
eval (starship init elvish)
|
||||
```
|
||||
```sh
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
#### Tcsh
|
||||
<details>
|
||||
<summary>Nushell</summary>
|
||||
|
||||
Trage folgendes am Ende von `~/.bashrc` ein:
|
||||
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
```sh
|
||||
mkdir ~/.cache/starship
|
||||
starship init nu | save ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
|
||||
|
||||
```sh
|
||||
source ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
#### Xonsh
|
||||
Note: Only Nushell v0.61+ is supported
|
||||
|
||||
Füge folgendes an das Ende von `~/.xonshrc` hinzu:
|
||||
</details>
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
<details>
|
||||
<summary>PowerShell</summary>
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`):
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
</details>
|
||||
|
||||
**Warnung** Dies wird sich in Zukunft ändern. Es wird nur nu Version v0.33 oder höher unterstützt. Füge folgendes zu deiner nu Konfigurationsdatei hinzu. Du kannst den Speicherort dieser Datei überprüfen, indem du `config path` in nu ausführst.
|
||||
<details>
|
||||
<summary>Tcsh</summary>
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
"mkdir ~/.cache/starship",
|
||||
"starship init nu | save ~/.cache/starship/init.nu",
|
||||
"source ~/.cache/starship/init.nu"
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
Trage folgendes am Ende von `~/.bashrc` ein:
|
||||
|
||||
```sh
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Xonsh</summary>
|
||||
|
||||
Füge folgendes an das Ende von `~/.xonshrc` hinzu:
|
||||
|
||||
```python
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Zsh</summary>
|
||||
|
||||
Füge dies ans Ende von `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Schritt 3. Starship konfigurieren
|
||||
|
||||
Starte eine neue Shell, um deinen neuen und schönen Prompt zu sehen. Wenn du mit den Defaults zufrieden bist, bist du bereits fertig!
|
||||
|
||||
Falls du Starship weiter anpassen möchtest:
|
||||
|
||||
- **[Konfiguration](https://starship.rs/config/)** - Lerne, wie du Starship deinen Bedürfnissen nach anpassen kannst
|
||||
|
||||
- **[Voreinstellungen](https://starship.rs/presets/)** - lasse dich von vorgefertigter Konfigurationen anderer Benutzenden inspirieren
|
||||
|
||||
## 🤝 Mitwirken
|
||||
|
||||
@@ -302,17 +406,17 @@ Wir laden Leute **aller Erfahrungsstufen** herzlich ein mitzumachen! Falls du di
|
||||
|
||||
Wenn du eine andere Sprache flüssig sprichts, würden wir uns sehr freuen wenn du helfen würdest die Dokumentation in anderen Sprachen auf dem aktuellsten Stand zu halten. Hier kannst du bei der Übersetzung helfen [Starship Crowdin](https://translate.starship.rs/).
|
||||
|
||||
Falls du an Starship mitwirken willst, wirf bitte einen Blick auf den [Leitfaden zum Mitwirken](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Schau auch gerne auf unserem [Discord-Server](https://discord.gg/8Jzqu3T) vorbei. 👋
|
||||
Falls du an Starship mitwirken willst, wirf bitte einen Blick auf den [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Schau auch gerne auf unserem [Discord server](https://discord.gg/8Jzqu3T) vorbei. 👋
|
||||
|
||||
## 💭 Inspiriert durch
|
||||
|
||||
Checkt bitte diese älteren Projekte, die das Entstehen von Starhip inspiriert haben. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Ein ZSH-Prompt für Astronauten.
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts.
|
||||
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Ein Shell-übergreifendes und in JavaScript geschriebenes robbyrussell-Theme.
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript.
|
||||
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** - Shell-übergreifendes, anpassbares und Powerline-ähnliches Prompt mit Symbolen.
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# 🚀 Erweiterte Installation
|
||||
# Erweiterte Installation
|
||||
|
||||
Um Starship zu installieren, musst du zwei Dinge tun:
|
||||
|
||||
@@ -32,7 +32,7 @@ pkg install getconf
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
@@ -63,7 +63,6 @@ Aktivieren Sie das Modul `programs.starship` in Ihrer `home.nix`-Datei und füge
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
@@ -109,7 +109,7 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur
|
||||
error_symbol = "[✖](bold red)"
|
||||
```
|
||||
|
||||
*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples.
|
||||
_Note:_ The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples.
|
||||
|
||||
#### Befehlsdauer
|
||||
|
||||
@@ -235,7 +235,7 @@ behind = "⇣${count}"
|
||||
++ format = '[$symbol\[$env\]]($style) '
|
||||
```
|
||||
|
||||
#### Zeit
|
||||
#### Uhrzeit
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ------------- |
|
||||
|
||||
@@ -2,535 +2,40 @@
|
||||
|
||||
Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊
|
||||
|
||||
## Nerd Font Symbole
|
||||
To get details on how to use a preset, simply click on the image.
|
||||
|
||||
This preset doesn't change anything except for the symbols used for each module. If emojis aren't your thing, this might catch your eye!
|
||||
## [Nerd Font Symbole](./nerd-font.md)
|
||||
|
||||

|
||||
This preset changes the symbols for each module to use Nerd Font symbols.
|
||||
|
||||
### Voraussetzungen
|
||||
[](./nerd-font)
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
|
||||
|
||||
### Konfiguration
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[dart]
|
||||
symbol = " "
|
||||
|
||||
[directory]
|
||||
read_only = " "
|
||||
|
||||
[docker_context]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[nim]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[package]
|
||||
symbol = " "
|
||||
|
||||
[perl]
|
||||
symbol = " "
|
||||
|
||||
[php]
|
||||
symbol = " "
|
||||
|
||||
[python]
|
||||
symbol = " "
|
||||
|
||||
[ruby]
|
||||
symbol = " "
|
||||
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Bracketed Segments
|
||||
## [Bracketed Segments](./bracketed-segments.md)
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
Before:
|
||||
[](./bracketed-segments)
|
||||
|
||||

|
||||
## [Plain Text Symbols](./plain-text.md)
|
||||
|
||||
After:
|
||||
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
|
||||
|
||||

|
||||
[](./plain-text)
|
||||
|
||||
### Konfiguration
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = '\[[⏱ $duration ]($style)\]'
|
||||
|
||||
[cobol]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[sudo]
|
||||
format = '\[[as $symbol]\]
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Plain Text Symbols
|
||||
|
||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||
|
||||
Before (default setting with Fixedsys font):
|
||||
|
||||

|
||||
|
||||
After (Plain Text Symbols):
|
||||
|
||||

|
||||
|
||||
### Konfiguration
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[cobol]
|
||||
symbol = "cobol "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[sudo]
|
||||
symbol = "sudo "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Hide Runtime Versions
|
||||
## [No Runtime Versions](./no-runtimes.md)
|
||||
|
||||
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
|
||||
|
||||

|
||||
[](./no-runtimes)
|
||||
|
||||
### Konfiguration
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[cobol]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[crystal]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dart]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[deno]
|
||||
format = "via [$symbol]($style)"
|
||||
|
||||
[dotnet]
|
||||
format = "[$symbol(🎯 $tfm )]($style)"
|
||||
|
||||
[elixir]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[elm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[erlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[golang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[helm]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[julia]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[kotlin]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[lua]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nim]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[nodejs]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ocaml]
|
||||
format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)'
|
||||
|
||||
[perl]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[red]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[ruby]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[rust]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[swift]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vagrant]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[vlang]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
||||
## Pure
|
||||
## [Pure Prompt](./pure-preset.md)
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||

|
||||
[](./pure-preset)
|
||||
|
||||
### Konfiguration
|
||||
## [Pastel Powerline](./pastel-powerline.md)
|
||||
|
||||
```toml
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
```
|
||||
[](./pastel-powerline)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
[Return to Presets](./README.md#bracketed-segments)
|
||||
|
||||
# Bracketed Segments Preset
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||

|
||||
|
||||
### Konfiguration
|
||||
|
||||
```sh
|
||||
starship preset bracketed-segments > ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/bracketed-segments.toml)
|
||||
|
||||
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml
|
||||
@@ -0,0 +1,21 @@
|
||||
[Return to Presets](./README.md#nerd-font-symbols)
|
||||
|
||||
# Nerd Font Symbols Preset
|
||||
|
||||
This preset changes the symbols for each module to use Nerd Font symbols.
|
||||
|
||||

|
||||
|
||||
### Voraussetzungen
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
|
||||
|
||||
### Konfiguration
|
||||
|
||||
```sh
|
||||
starship preset nerd-font-symbols > ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/nerd-font-symbols.toml)
|
||||
|
||||
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml
|
||||
@@ -0,0 +1,17 @@
|
||||
[Return to Presets](./README.md#no-runtime-versions)
|
||||
|
||||
# No Runtime Versions Preset
|
||||
|
||||
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
|
||||
|
||||

|
||||
|
||||
### Konfiguration
|
||||
|
||||
```sh
|
||||
starship preset no-runtime-versions > ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/no-runtime-versions.toml)
|
||||
|
||||
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml
|
||||
@@ -0,0 +1,21 @@
|
||||
[Return to Presets](./README.md#pastel-powerline)
|
||||
|
||||
# Pastel Powerline Preset
|
||||
|
||||
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
|
||||
|
||||

|
||||
|
||||
### Voraussetzungen
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Caskaydia Cove Nerd Font)
|
||||
|
||||
### Konfiguration
|
||||
|
||||
```sh
|
||||
starship preset pastel-powerline > ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/pastel-powerline.toml)
|
||||
|
||||
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml
|
||||
@@ -0,0 +1,17 @@
|
||||
[Return to Presets](./README.md#plain-text-symbols)
|
||||
|
||||
## Plain Text Symbols Preset
|
||||
|
||||
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
|
||||
|
||||

|
||||
|
||||
### Konfiguration
|
||||
|
||||
```sh
|
||||
starship preset plain-text-symbols > ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/plain-text-symbols.toml)
|
||||
|
||||
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml
|
||||
@@ -0,0 +1,17 @@
|
||||
[Return to Presets](./README.md#pure)
|
||||
|
||||
# Pure Preset
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||

|
||||
|
||||
### Konfiguration
|
||||
|
||||
```sh
|
||||
starship preset pure-preset > ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/pure-preset.toml)
|
||||
|
||||
<<< @/.vuepress/public/presets/toml/pure-preset.toml
|
||||
@@ -18,7 +18,7 @@ features:
|
||||
footer: Bajo una licencia ISC | Derechos de autor © 2019-presente Colaboradores de Starship
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: el prompt multi-intérprete"
|
||||
description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente personalizable para cualquier intérprete de comandos! Muestra la información que necesitas, a la par que es elegante y minimalista. Instalación rápida disponible para Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, y PowerShell.'
|
||||
description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente personalizable para cualquier intérprete de comandos! Muestra la información que necesitas, a la par que es elegante y minimalista. Instalación rápida disponible para Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, y PowerShell.'
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@@ -34,7 +34,7 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
|
||||
|
||||
### Instalación rápida
|
||||
|
||||
1. Instalar el binario de **Starship**:
|
||||
1. Instala el binario de **Starship**:
|
||||
|
||||
|
||||
#### Instalar la última versión
|
||||
@@ -42,14 +42,15 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
|
||||
Con el intérprete de comandos:
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
Para actualizar Starship, vuelve a ejecutar el guión anterior. Reemplazará la versión actual sin tocar la configuración de Starship.
|
||||
|
||||
|
||||
#### Instalar con un gestor de paquetes
|
||||
#### Instalar vía un gestor de paquetes
|
||||
|
||||
Con [Homebrew](https://brew.sh/):
|
||||
Con [Homebew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@@ -66,7 +67,7 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
|
||||
|
||||
#### Bash
|
||||
|
||||
Añade el siguiente código al final de `~/.bashrc`:
|
||||
Añade la siguiente línea al final de `~/.bashrc`:
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
@@ -119,7 +120,11 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: advertencia Solo se admite Elvish v0.15 o superior. :::
|
||||
::: warning
|
||||
|
||||
Sólo se admite elvish v0.18 o superior.
|
||||
|
||||
:::
|
||||
|
||||
Añade el siguiente código al final de `~/.elvish/rc.elv`:
|
||||
|
||||
@@ -143,17 +148,23 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: advertencia Esto cambiará en el futuro. Sólo se admite la versión nu v0.33 o superior. ::: Añade lo siguiente a tu archivo de configuración nu. Puedes comprobar la ubicación de este archivo ejecutando `ruta de configuración` en nu.
|
||||
::: warning
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
"mkdir ~/.cache/starship",
|
||||
"starship init nu | save ~/.cache/starship/init.nu",
|
||||
"source ~/.cache/starship/init.nu"
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
Esto cambiará en el futuro. Sólo se admite Nushell v0.61+.
|
||||
|
||||
:::
|
||||
|
||||
Añade lo siguiente al final de tu archivo Nushell env (encuéntralo ejecutando `$nu.env-path` en Nushell):
|
||||
```sh
|
||||
mkdir ~/.cache/starship
|
||||
starship init nu | save ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
Añade lo siguiente al final de tu configuración de Nushell (encuéntrala ejecutando `$nu.config-path`):
|
||||
|
||||
```sh
|
||||
source ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
#### Xonsh
|
||||
|
||||
@@ -164,3 +175,14 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Cmd
|
||||
|
||||
Necesitas usar [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) con Cmd. Añade lo siguiente a un archivo `starship.lua` y coloca este archivo en el directorio de scripts de Clink:
|
||||
|
||||
```lua
|
||||
-- starship.lua
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
@@ -2,12 +2,82 @@
|
||||
|
||||
Mientras que Starship es un prompt versátil, a veces necesitas más que editar `starhip.toml` para que haga ciertas cosas. Esta página detalla algunas de las técnicas de configuración más avanzadas en Starship.
|
||||
|
||||
::: aviso
|
||||
::: warning
|
||||
|
||||
Las configuraciones de esta sección están sujetos a cambios en futuras versiones de Starship.
|
||||
|
||||
:::
|
||||
|
||||
## TransientPrompt in PowerShell
|
||||
|
||||
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
|
||||
|
||||
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-TransientFunction {
|
||||
&starship module character
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
|
||||
Enable-TransientPrompt
|
||||
```
|
||||
|
||||
## TransientPrompt and TransientRightPrompt in Cmd
|
||||
|
||||
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <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
|
||||
- `off`: do not replace the prompt (i.e. turn off transience)
|
||||
|
||||
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
|
||||
|
||||
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_prompt_func(prompt)
|
||||
return io.popen("starship module character"
|
||||
.." --keymap="..rl.getvariable('keymap')
|
||||
):read("*a")
|
||||
end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_rprompt_func(prompt)
|
||||
return io.popen("starship module time"):read("*a")
|
||||
end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
## Comandos pre-prompt y pre-ejecución personalizados en Cmd
|
||||
|
||||
Clink proporciona una API extremadamente flexible para ejecutar comandos pre-prompt y pre-ejecución en la shell de Cmd. Es bastante sencillo de usar con Starship. Haz los siguientes cambios a tu archivo `starship.lua` según tus requisitos:
|
||||
|
||||
- Para ejecutar una función personalizada justo antes de dibujar la shell, defina una nueva función llamada `starship_preprompt_user_func`. Esta función recibe el prompt actual como una cadena que puedes utilizar. Por ejemplo, para dibujar un cohete antes del prompt, podrías hacer lo siguiente
|
||||
|
||||
```lua
|
||||
function starship_preprompt_user_func(prompt)
|
||||
print("🚀")
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
- Para ejecutar una función personalizada justo antes de ejecutar un comando, define una nueva función llamada `starship_precmd_user_func`. Esta función recibe la línea de comandos actual como una cadena que se puede utilizar. Por ejemplo, para imprimir el comando que va a ser ejecutado, escribirías
|
||||
|
||||
```lua
|
||||
function starship_precmd_user_func(line)
|
||||
print("Executing: "..line)
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
## Comandos pre-prompt y pre-ejecucución personalizados en Bash
|
||||
|
||||
Bash no posee un framework oficial de preexec/precmd como la mayoría de los demás intérpretes de comandos. Debido a esto, es difícil proporcionar "hooks" totalmente personalizables en `Bash`. Sin embargo, Starship te da la posibilidad de insertar de forma limitada tus propias funciones en el proceso de renderizado del prompt:
|
||||
@@ -21,14 +91,16 @@ function blastoff(){
|
||||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- Para ejecutar una función personalizada antes de que un comando sea ejecutado, es posible usar el [mecanismo de trampa `DEBUG`](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). No obstante, ¡**debes** atrapar la señal DEBUG *antes* de inicializar Starship! Starship puede preservar el valor de la trampa DEBUG, pero si la trampa es reemplazada después de que Starship inicie, alguna funcionalidad fallará.
|
||||
- Para ejecutar una función personalizada antes de que un comando sea ejecutado, es posible usar el [mecanismo de trampa `DEBUG`](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). No obstante, ¡**debes** atrapar la señal DEBUG _antes_ de inicializar Starship! Starship puede preservar el valor de la trampa DEBUG, pero si la trampa es reemplazada después de que Starship inicie, alguna funcionalidad fallará.
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
trap blastoff DEBUG # Trampa DEBUG *antes* de la ejecución de Starship
|
||||
trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
set -o functrace
|
||||
eval $(starship init bash)
|
||||
set +o functrace
|
||||
```
|
||||
|
||||
## Comandos pre-prompt y pre-ejecución personalizados en PowerShell
|
||||
@@ -45,13 +117,13 @@ function Invoke-Starship-PreCommand {
|
||||
|
||||
## Cambiar el Título de la Ventana
|
||||
|
||||
Algunos intérpretes de comandos van a cambiar automáticamente el título de la ventana por ti (p. ej., para mostrar tu directorio actual). Fish incluso lo hace por defecto. Starship no hace esto, pero es bastante sencillo añadir esta funcionalidad a `Bash` o `zsh`.
|
||||
Algunos intérpretes de comandos van a cambiar automáticamente el título de la ventana por ti (p. ej., para mostrar tu directorio actual). Fish incluso lo hace por defecto. Starship no hace esto, pero es bastante sencillo añadir esta funcionalidad a `bash`, `zsh`, `cmd` o `powershell`.
|
||||
|
||||
Primero, define una función para el cambio de título de la ventana (idéntico en Bash y zsh):
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; TU_TITULO_DE_VENTANA_AQUI \007"
|
||||
echo -ne "\033]0; TU_TÍTULO_DE_VENTANA_AQUÍ \007"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -80,6 +152,16 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
Para Cmd, puedes cambiar el título de la ventana usando la función `starship_preprompt_user_func`.
|
||||
|
||||
```lua
|
||||
function starship_preprompt_user_func(prompt)
|
||||
console.settitle(os.getenv('USERNAME').."@"..os.getenv('COMPUTERNAME')..": "..os.getcwd())
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
También puede establecer una salida similar con PowerShell creando una función llamada `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
@@ -91,13 +173,13 @@ function Invoke-Starship-PreCommand {
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Habilitar Prompt a la Derecha
|
||||
## Gabilitar Prompt Derecho
|
||||
|
||||
Algunos intérpretes de comandos soportan un prompt derecho que se renderiza en la misma línea que la entrada. Starship puede establecer el contenido del prompt derecho usando la opción `right_format`. Cualquier módulo que pueda ser usado en `format` también es soportado en `right_format`. La variable `$all` solo contendrá módulos no utilizados explícitamente en `format` o `right_format`.
|
||||
Algunos intérpretes de órdenes soportan un prompt derecho que se renderiza en la misma línea que la entrada. Starship puede establecer el contenido del prompt correcto usando la opción `right_format`. Cualquier módulo que pueda ser usado en `format` también es soportado en `right_format`. La variable `$all` solo contendrá módulos no utilizados explícitamente en `format` o `right_format`.
|
||||
|
||||
Nota: El prompt derecho es una sola línea siguiendo la ubicación de entrada. Para alinear módulos arriba de la línea de entrada en un prompt multi-línea, vea el [módulo fill](/config/#fill).
|
||||
Nota: El prompt derecho es una sola línea siguiendo la ubicación de entrada. Para alinear los módulos arriba de la línea de entrada en un prompt multi-línea, vea el [módulo `fill`](/config/#fill).
|
||||
|
||||
`right_format` está actualmente soportado para los siguientes intérpretes de comandos: elvish, fish, zsh.
|
||||
`right_format` está actualmente soportado para los siguientes intérpretes de comandos: elvish, fish, zsh, xonsh, cmd.
|
||||
|
||||
### Ejemplo
|
||||
|
||||
@@ -117,20 +199,45 @@ Produce un prompt como el siguiente:
|
||||
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||
```
|
||||
|
||||
## Prompt de continuación
|
||||
|
||||
## Cadenas de estilo
|
||||
Algunos intérpretes de comandos admiten un prompt de continuacion junto con el prompt normal. Este prompt es renderizado en lugar del prompt normal cuando el usuario ha introducido una orden incompleta (como solamente un paréntesis izquierdo o comilla).
|
||||
|
||||
Las cadenas de estilo son una lista de palabras, separadas por espacios en blanco. Las palabras no son sensibles a mayúsculas (es decir, `bold` y `BoLd` se consideran la misma cadena). Cada palabra puede ser una de las siguientes:
|
||||
Starship puede establecer el prompt de continuación usando la opción `continuation_prompt`. El prompt por defecto es `"[∙](bright-black) "`.
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
Nota: `continuation_prompt` debe establecerse en una cadena literal sin ninguna variable.
|
||||
|
||||
Nota: Los prompts de continuación solo están disponibles en los siguientes intérpretes de comandos:
|
||||
|
||||
- `bash`
|
||||
- `zsh`
|
||||
- `PowerShell`
|
||||
|
||||
### Ejemplo
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Un prompt de continuación que muestra dos flechas rellenas
|
||||
continuation_prompt = "▶▶"
|
||||
```
|
||||
|
||||
## Cadenas de Estilo
|
||||
|
||||
Las cadenas de estilo son una lista de palabras, separadas por espacios en blanco. Las palabras no son sensibles a mayúsculas (es decir, `negrita` y `NeGriTa` se consideran la misma cadena). Cada palabra puede ser una de las siguientes:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `blink`
|
||||
- `hidden`
|
||||
- `strikethrough`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
donde `<color>` es un especificador de color (discutido a continuación). `fg:<color>` y `<color>` hacen actualmente lo mismo, aunque esto puede cambiar en el futuro. `inverted` cambia el fondo y los colores de primer plano. El orden de las palabras en la cadena no importa.
|
||||
|
||||
@@ -138,8 +245,14 @@ El token `none` anula todos los demás tokens en una cadena si no es parte de un
|
||||
|
||||
Un especificador de color puede ser uno de los siguientes:
|
||||
|
||||
- Uno de los colores estándar del terminal: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Opcionalmente puedes agregar el prefijo `bright-` para obtener la versión brillante (por ejemplo, `bright-white`).
|
||||
- Un `#` seguido de un número hexadecimal de seis dígitos. Esto especifica un [código hexadecimal de color RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- Un número entre 0-255. Esto especifica un [Código de color ANSI de 8-bits](https://i.stack.imgur.com/KTSQa.png).
|
||||
- Uno de los colores estándar del terminal: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Opcionalmente puede prefijar estos con `bright-` para obtener la versión brillante (por ejemplo, `bright-white`).
|
||||
- Un `#` seguido de un número hexadecimal de seis dígitos. Esto especifica un [código hexadecimal de color RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- Un número entre 0-255. Esto especifica un [Código de color ANSI de 8-bits](https://i.stack.imgur.com/KTSQa.png).
|
||||
|
||||
Si se especifican varios colores para el primer plano/fondo, el último en la cadena tendrá prioridad.
|
||||
|
||||
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
|
||||
|
||||
- Many terminals disable support for `blink` by default
|
||||
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
|
||||
- `strikethrough` is not supported by the default macOS Terminal.app
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Preguntas frecuentes (FAQ)
|
||||
# Preguntas frecuentes
|
||||
|
||||
## ¿Cuál es la configuración usada en el GIF de demostración?
|
||||
|
||||
@@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
La [implementación de Bash](https://github.com/starship/starship/blob/master/src/init/starship.bash) integrada en Starship es un poco más compleja para permitir funciones avanzadas como el [módulo Duración del Comando](https://starship.rs/config/#command-duration) y para garantizar que Starship sea compatible con las configuraciones de Bash preinstaladas.
|
||||
La [implementación de Bash](https://github.com/starship/starship/blob/master/src/init/starship.bash) en Starship es sensíblemente is ligeramente más compleja para permitir características avanzadas como [el módulo de duración de comando](https://starship.rs/config/#command-duration) y para asegurar que Starship es compatible con las configuraciones preinstaladas de Bash.
|
||||
|
||||
Para obtener una lista de todos los parámetros aceptados por `el prompt de Starship`, usa el siguiente comando:
|
||||
|
||||
@@ -53,37 +53,37 @@ El símbolo de sistema usará tanto contexto como le proveas, pero no hay parám
|
||||
Si obtienes un error como "_version 'GLIBC_2.18' not found (required by starship)_" al usar el binario precompilado (por ejemplo, en CentOS 6 o 7), puedes usar el binario compilado con `musl` en vez de `glibc`:
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
curl -sS https://starship.rs/install.sh | sh -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
## ¿Por qué veo advertencias `Executing command"..." timed out.`?
|
||||
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
Starship ejecuta diferentes comandos para obtener la información que se muestra en el prompt, por ejemplo la versión de un programa o el estado actual de git. Para asegurarse que starship no se quede congelado mientras trata de ejecutar estos comandos, establecimos un límite de tiempo, si un comando tarda más tiempo que este límite starship detendrá la ejecución del comando y mostrara la advertencia anterior, este es el comportamiento esperado. Este límite de tiempo es configurable usando la [llave `command_timeout`](/config/#prompt) así que si lo desea puede aumentar el límite de tiempo. También puedes seguir los pasos de depuración a continuación para ver qué comando está siendo lento y ver si puedes optimizarlo. Finalmente, puedes establecer la variable de entorno `STARSHIP_LOG` a `error` para ocultar estas advertencias.
|
||||
|
||||
## Veo símbolos que no entiendo ni espero, ¿qué significan?
|
||||
|
||||
Si ves símbolos que no reconoces, puedes usar `starship explain` para explicar los módulos que se muestran actualmente.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
## Starship está haciendo algo inesperado, ¿cómo puedo depurarlo?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
Puede habilitar los registros de depuración usando la variable de entorno `STARSHIP_LOG`. Estos registros pueden ser muy detallados así que a menudo es útil utilizar el comando `module` si estás intentando depurar un módulo en particular, por ejemplo, si está intentando depurar el módulo `rust` podrías ejecutar el siguiente comando para obtener los registros de seguimiento y salida del módulo.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
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.
|
||||
Si starship está siendo lento, puedes intentar usar el comando `timings` para ver si hay un módulo en particular o un comando a culpar.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
env STARSHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
Esto producirá el registro de rastreo y un desglose de todos los módulos que tomaron más de 1 ms para ejecutarse o producir alguna salida.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
|
||||
Finalmente, si encuentras un error puedes usar el comando `bug-report` para crear un issue en Github.
|
||||
|
||||
```sh
|
||||
reporte de error starship
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## ¿Por qué no veo un símbolo de glifo en mi prompt?
|
||||
@@ -118,5 +118,5 @@ Si Starship fue instalado usando el guión de instalación, el siguiente comando
|
||||
|
||||
```sh
|
||||
# Localiza y elimina el binario de starship
|
||||
sh -c 'rm "$(which starship)"'
|
||||
sh -c 'rm "$(comando -v 'starship')"'
|
||||
```
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs">Sitio Web</a>
|
||||
·
|
||||
<a href="https://starship.rs">Sitio web</a>
|
||||
|
||||
<a href="#🚀-installation">Instalación</a>
|
||||
·
|
||||
|
||||
<a href="https://starship.rs/config/">Configuración</a>
|
||||
</p>
|
||||
|
||||
@@ -72,6 +72,22 @@
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/id-ID/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-id.png"
|
||||
alt="Bahasa indonesio"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/it-IT/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-it.png"
|
||||
alt="Italiano"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@@ -123,6 +139,8 @@
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
[](https://vshymanskyy.github.io/StandWithUkraine)
|
||||
|
||||
<h1></h1>
|
||||
|
||||
<img
|
||||
@@ -153,166 +171,252 @@
|
||||
|
||||
- Una [Nerd Font](https://www.nerdfonts.com/) instalada y habilitada en tu terminal (por ejemplo, prueba [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)).
|
||||
|
||||
### Comenzar
|
||||
### Paso 1. Instalar Starship
|
||||
|
||||
**Nota**: debido a la proliferación de diferentes plataformas, solo un subconjunto de plataformas soportadas se muestra a continuación. ¿No puedes ver el tuyo? Echa un vistazo a las [instrucciones adicionales de la plataforma](https://starship.rs/installing/).
|
||||
Seleccione su sistema operativo de la lista de abajo para ver las instrucciones de instalación:
|
||||
|
||||
1. Instala el binario de **Starship**:
|
||||
<details>
|
||||
<summary>Android</summary>
|
||||
|
||||
Instalar Starship usando cualquiera de los siguientes gestores de paquetes:
|
||||
|
||||
#### Instalar la última versión
|
||||
| Repositorio | Instrucciones |
|
||||
| --------------------------------------------------------------------------------- | ---------------------- |
|
||||
| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` |
|
||||
|
||||
</details>
|
||||
|
||||
##### Desde un binario preconstruido, con el intérprete de comandos:
|
||||
<details>
|
||||
<summary>BSD</summary>
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
Instalar Starship usando cualquiera de los siguientes gestores de paquetes:
|
||||
|
||||
Para actualizar Starship, vuelve a ejecutar el guión anterior. Reemplazará la versión actual sin tocar la configuración de Starship.
|
||||
| Distribución | Repositorio | Instrucciones |
|
||||
| ---------------- | -------------------------------------------------------- | --------------------------------- |
|
||||
| **_Cualquiera_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
|
||||
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
|
||||
|
||||
**Nota** - Los valores por defecto del guión de instalación se pueden anular (ver la ayuda incorporada).
|
||||
</details>
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
<details>
|
||||
<summary>Linux</summary>
|
||||
|
||||
Instale la última versión para su sistema:
|
||||
|
||||
#### Instalar con un gestor de paquetes
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
Alternativamente, instale Starship usando cualquiera de los siguientes gestores de paquetes:
|
||||
|
||||
##### Con [Homebrew](https://brew.sh/):
|
||||
| Distribución | Repositorio | Instrucciones |
|
||||
| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
|
||||
| **_Cualquiera_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| _Cualquiera_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| _Cualquiera_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
|
||||
| _Cualquiera_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` |
|
||||
| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` |
|
||||
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` |
|
||||
| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship` <br /> `dnf install starship` |
|
||||
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
|
||||
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
|
||||
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
|
||||
| Manjaro | | `pacman -S starship` |
|
||||
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |
|
||||
| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>macOS</summary>
|
||||
|
||||
##### Con [Scoop](https://scoop.sh):
|
||||
Instale la última versión para su sistema:
|
||||
|
||||
```powershell
|
||||
scoop install starship
|
||||
```
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
2. Añade el guión de inicio al archivo de configuración de tu intérprete de comandos:
|
||||
Alternativamente, instale Starship usando cualquiera de los siguientes gestores de paquetes:
|
||||
|
||||
| Repositorio | Instrucciones |
|
||||
| -------------------------------------------------------- | --------------------------------------- |
|
||||
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
|
||||
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
|
||||
|
||||
#### Bash
|
||||
</details>
|
||||
|
||||
Añade el siguiente código al final de `~/.bashrc`:
|
||||
<details>
|
||||
<summary>Windows</summary>
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
Instale la última versión para su sistema con los MSI-Installers de la sección [lanzamientos](https://github.com/starship/starship/releases/latest).
|
||||
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
Instalar Starship usando cualquiera de los siguientes gestores de paquetes:
|
||||
|
||||
| Repositorio | Instrucciones |
|
||||
| -------------------------------------------------------------------------------------------- | --------------------------------------- |
|
||||
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
|
||||
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
|
||||
| [winget](https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/Starship/Starship) | `winget install --id Starship.Starship` |
|
||||
|
||||
#### Fish
|
||||
</details>
|
||||
|
||||
Añade el siguiente código al final de `~/.config/fish/config.fish`:
|
||||
### Paso 2. Configura tu shell para usar Starship
|
||||
|
||||
```sh
|
||||
# ~/.config/fish/config.fish
|
||||
Configure su shell para inicializar starship. Selecciona el tuyo de la lista de abajo:
|
||||
|
||||
starship init fish | source
|
||||
```
|
||||
<details>
|
||||
<summary>Bash</summary>
|
||||
|
||||
Añade la siguiente línea al final de `~/.bashrc`:
|
||||
|
||||
#### Zsh
|
||||
```sh
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
|
||||
Añade el siguiente código al final de `~/.zshrc`:
|
||||
</details>
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
<details>
|
||||
<summary>Cmd</summary>
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
Necesitas usar [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) con Cmd. Crea un archivo en esta ruta `%LocalAppData%\clink\starship.lua` con el siguiente contenido:
|
||||
|
||||
```lua
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
#### PowerShell
|
||||
</details>
|
||||
|
||||
Añade lo siguiente al final de `Microsoft.PowerShell_profile.ps1`. Puedes comprobar la ubicación de este archivo consultando la variable `$PROFILE` en PowerShell. Normalmente la ruta es `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` o `~/.config/powershell/Microsoft.PowerShell_profile.ps1` en -Nix.
|
||||
<details>
|
||||
<summary>Elvish</summary>
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
Añade el siguiente código al final de `~/.elvish/rc.elv`:
|
||||
|
||||
```sh
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
#### Ion
|
||||
Nota: Solo se admite Elvish v0.18+
|
||||
|
||||
Añade el siguiente código al final de `~/.config/ion/initrc`:
|
||||
</details>
|
||||
|
||||
```sh
|
||||
# ~/.config/ion/initrc
|
||||
<details>
|
||||
<summary>Fish</summary>
|
||||
|
||||
eval $(starship init ion)
|
||||
```
|
||||
Añade el siguiente código al final de `~/.config/fish/config.fish`:
|
||||
|
||||
```fish
|
||||
starship init fish | source
|
||||
```
|
||||
|
||||
#### Elvish
|
||||
</details>
|
||||
|
||||
**Advertencia** Sólo se admite Elvish v0.15 o superior. Añade el siguiente código al final de `~/.elvish/rc.elv`:
|
||||
<details>
|
||||
<summary>Ion</summary>
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
Añade el siguiente código al final de `~/.config/ion/initrc`:
|
||||
|
||||
eval (starship init elvish)
|
||||
```
|
||||
```sh
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
#### Tcsh
|
||||
<details>
|
||||
<summary>Nushell</summary>
|
||||
|
||||
Añade el siguiente código al final de `~/.tcshrc`:
|
||||
Añade lo siguiente al final de tu archivo Nushell env (encuéntralo ejecutando `$nu.env-path` en Nushell):
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
```sh
|
||||
mkdir ~/.cache/starship
|
||||
starship init nu | save ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
Añade lo siguiente al final de tu configuración de Nushell (encuéntrala ejecutando `$nu.config-path`):
|
||||
|
||||
```sh
|
||||
source ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
#### Xonsh
|
||||
Nota: Sólo se admite Nushell v0.61+
|
||||
|
||||
Añade lo siguiente al final de `~/.xonshrc`:
|
||||
</details>
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
<details>
|
||||
<summary>PowerShell</summary>
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
Añade lo siguiente al final de tu configuración de PowerShell (encuéntrala ejecutando `$PROFILE`):
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
</details>
|
||||
|
||||
**Advertencia** Esto cambiará en el futuro. Sólo se admite la versión nu v0.33 o superior. Añade lo siguiente a tu archivo de configuración nu. Puedes comprobar la ubicación de este archivo ejecutando `ruta de configuración` en nu.
|
||||
<details>
|
||||
<summary>Tcsh</summary>
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
"mkdir ~/.cache/starship",
|
||||
"starship init nu | save ~/.cache/starship/init.nu",
|
||||
"source ~/.cache/starship/init.nu"
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
Añade el siguiente código al final de `~/.tcshrc`:
|
||||
|
||||
## 🤝 Colaborando
|
||||
```sh
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
¡Siempre estamos buscando colaboradores de **todos los niveles y habilidades**! Si estas buscando una manera fácil de ayudar este proyecto, puedes intentar resolver un problema con la etiqueta "[good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)".
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Xonsh</summary>
|
||||
|
||||
Añade lo siguiente al final de `~/.xonshrc`:
|
||||
|
||||
```python
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Zsh</summary>
|
||||
|
||||
Añade el siguiente código al final de `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Paso 3. Configurar Starship
|
||||
|
||||
Inicia una nueva instancia de shell, y deberías ver tu nuevo y hermoso prompt para shell. Si estás contento con los valores por defecto, ¡disfruta!
|
||||
|
||||
Si estás buscando personalizar Starship:
|
||||
|
||||
- **[Configuración](https://starship.rs/config/)** – aprende a configurar Starship para ajustar el prompt a tu gusto
|
||||
|
||||
- **[Ajustes preestablecidos](https://starship.rs/presets/)** - inspírate en la configuración construida por otros
|
||||
|
||||
## 🤝 Contribuir
|
||||
|
||||
¡Siempre estamos buscando colaboradores de **todos los niveles y habilidades**! Si estás interesado en empezar en el proyecto con algo sencillo, prueba con un problema etiquetado como [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
|
||||
|
||||
Si hablas con fluidez en un idioma que no sea inglés, agradecemos mucho cualquier ayuda para mantener nuestros documentos traducidos y actualizados en otros idiomas. Si quieres ayudar, puedes contribuir con las traducciones en el [Crowdin de Starship](https://translate.starship.rs/).
|
||||
|
||||
Si quieres ayudar a colaborar a Starship, por favor mira nuestra [Guía de Colaboradores](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Además, siéntete libre de entrar en nuestro [servidor de Discord](https://discord.gg/8Jzqu3T) y di "¡Hola!". 👋
|
||||
Si estás interesado en ayudar contribuyendo a starship, por favor échale un vistazo a [Guía de Colaboración](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). También siéntete libre de pasarte por nuestro [servidor de Discord](https://discord.gg/8Jzqu3T) y saludarnos. 👋
|
||||
|
||||
## 💭 Inspirado por
|
||||
|
||||
Por favor, revisa estos proyectos previos que inspiraron la creación de Starship. 🙏
|
||||
Por favor, revisa estos proyectos que inspiraron la creación de Starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Un prompt ZSH para astronautas.
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – Un prompt de ZSH para astronautas.
|
||||
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - robbyrussel, tema multi-intérprete de comandos escrito en JavaScript.
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Tema multi shell robbyrussell escrito en JavaScript.
|
||||
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** - Un prompt multi-intérprete de comandos personalizable, basada en Powerline con iconos.
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** - Un prompt multi-intérprete de comandos personalizable basada en Powerline con iconos.
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
@@ -321,4 +425,4 @@ Por favor, revisa estos proyectos previos que inspiraron la creación de Starshi
|
||||
|
||||
## 📝 Licencia
|
||||
|
||||
Derechos de autor © 2019-presente, [Colaboradores de Starship](https://github.com/starship/starship/graphs/contributors).<br /> Este proyecto está bajo una licencia [ISC](https://github.com/starship/starship/blob/master/LICENSE).
|
||||
Copyright © 2019-actualidad, [Creadores de Starship](https://github.com/starship/starship/graphs/contributors).<br /> Este proyecto está bajo una licencia [ISC](https://github.com/starship/starship/blob/master/LICENSE).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# 🚀 Instalación avanzada
|
||||
# Instalación avanzada
|
||||
|
||||
Para instalar Starship, necesitas hacer dos cosas:
|
||||
|
||||
@@ -32,7 +32,7 @@ pkg install getconf
|
||||
### Instalación
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
@@ -57,13 +57,12 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Declarativo, usuario único, a través de [home-manager](https://github.com/nix-community/home-manager)
|
||||
|
||||
Habilita el módulo `programs.starship` en tu archivo `home.nix` y añade tus configuraciones
|
||||
Activa el módulo `programs.starship` en tu archivo `home.nix` y añade tus ajustes
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuración escrita en ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
@@ -79,10 +78,10 @@ Habilita el módulo `programs.starship` en tu archivo `home.nix` y añade tus co
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
luego ejecutar
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
interruptor home-manager
|
||||
```
|
||||
|
||||
#### Declarativo, en todo el sistema, con NixOS
|
||||
|
||||