docs(i18n): new Crowdin updates (#4687)

This commit is contained in:
Matan Kushner 2022-12-12 14:14:19 +09:00 committed by GitHub
parent 18e714598d
commit 0d98c4c0b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 5739 additions and 31 deletions

View File

@ -534,7 +534,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. |
| `version_format` | `'v${raw}'` | The version format. |
| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. |
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |

View File

@ -534,7 +534,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. |
| `version_format` | `'v${raw}'` | The version format. |
| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. |
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |

View File

@ -534,7 +534,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. |
| `version_format` | `'v${raw}'` | The version format. |
| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. |
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |

View File

@ -534,7 +534,7 @@ El módulo `buf` muestra la versión instalada de [Buf](https://buf.build). Por
| ------------------- | ----------------------------------------------- | ---------------------------------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | El formato para el módulo `buf`. |
| `version_format` | `'v${raw}'` | El formato de versión. |
| `symbol` | `'🦬 '` | El símbolo usado antes de mostrar la versión de Buf. |
| `symbol` | `'🐃 '` | El símbolo usado antes de mostrar la versión de Buf. |
| `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. |

View File

@ -534,7 +534,7 @@ Le module `buf` affiche la version de [Buf](https://buf.build) installée. Par d
| ------------------------------------ | ----------------------------------------------- | ------------------------------------------------------ |
| `format` | `'with [$symbol($version )]($style)'` | Le format du module `buf`. |
| `version_format` | `'v${raw}'` | Le format de la version. |
| `symbol` | `'🦬 '` | Le symbole utilisé avant dafficher la version de Buf. |
| `symbol` | `'🐃 '` | Le symbole utilisé avant dafficher la version de Buf. |
| `detect_extensionsdetect_extensions` | `[]` | Les extensions qui déclenchent ce module. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Les fichiers qui activent ce module. |
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. |

View File

@ -534,7 +534,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `fromat` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. |
| `version_format` | `'v${raw}'` | Format dari versi. |
| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. |
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Ekstensi mana yang sebaiknya memicu modul ini. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | filenames mana yang sebaiknya memicu modul ini. |
| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. |

View File

@ -534,7 +534,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. |
| `version_format` | `'v${raw}'` | Il formato della versione. |
| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. |
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Quali nomi di file dovrebbero attivare questo modulo. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |

View File

@ -534,7 +534,7 @@ discharging_symbol = '💦'
| ------------------- | ----------------------------------------------- | -------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | `buf`モジュールの形式。 |
| `version_format` | `'v${raw}'` | バージョンのフォーマット。 |
| `symbol` | `'🦬 '` | Bufのバージョンを表示する前に使用される記号です。 |
| `symbol` | `'🐃 '` | Bufのバージョンを表示する前に使用される記号です。 |
| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |

View File

@ -534,7 +534,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. |
| `version_format` | `'v${raw}'` | The version format. |
| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. |
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |

View File

@ -534,7 +534,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. |
| `version_format` | `'v${raw}'` | The version format. |
| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. |
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |

187
docs/no-NO/README.md Normal file
View File

@ -0,0 +1,187 @@
---
home: true
heroImage: /logo.svg
heroText:
tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell!
actionText: Get Started →
actionLink: ./guide/
features:
-
title: Compatibility First
details: Works on the most common shells on the most common operating systems. Use it everywhere!
-
title: Rust-Powered
details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible.
-
title: Customizable
details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be.
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
#Used for the description meta tag, for SEO
metaTitle: "Starship: Cross-Shell Prompt"
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell.
---
<div class="center">
<video class="demo-video" muted autoplay loop playsinline>
<source src="/demo.webm" type="video/webm">
<source src="/demo.mp4" type="video/mp4">
</video>
</div>
### Prerequisites
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
### Quick Install
1. Install the **starship** binary:
#### Install Latest Version
With Shell:
```sh
curl -sS https://starship.rs/install.sh | sh
```
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
#### Install via Package Manager
With [Homebrew](https://brew.sh/):
```sh
brew install starship
```
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
winget install starship
```
1. Add the init script to your shell's config file:
#### Bash
Add the following to the end of `~/.bashrc`:
```sh
# ~/.bashrc
eval "$(starship init bash)"
```
#### Fish
Add the following to the end of `~/.config/fish/config.fish`:
```sh
# ~/.config/fish/config.fish
starship init fish | source
```
#### Zsh
Add the following to the end of `~/.zshrc`:
```sh
# ~/.zshrc
eval "$(starship init zsh)"
```
#### Powershell
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
```sh
Invoke-Expression (&starship init powershell)
```
#### Ion
Add the following to the end of `~/.config/ion/initrc`:
```sh
# ~/.config/ion/initrc
eval $(starship init ion)
```
#### Elvish
::: warning
Only elvish v0.18 or higher is supported.
:::
Add the following to the end of `~/.elvish/rc.elv`:
```sh
# ~/.elvish/rc.elv
eval (starship init elvish)
```
#### Tcsh
Add the following to the end of `~/.tcshrc`:
```sh
# ~/.tcshrc
eval `starship init tcsh`
```
#### Nushell
::: warning
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`:
```sh
# ~/.xonshrc
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"))()
```

View File

@ -0,0 +1,286 @@
# Advanced Configuration
While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship.
::: warning
The configurations in this section are subject to change in future releases of Starship.
:::
## TransientPrompt in PowerShell
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
```powershell
function Invoke-Starship-TransientFunction {
&starship module character
}
Invoke-Expression (&starship init powershell)
Enable-TransientPrompt
```
## TransientPrompt and TransientRightPrompt in Cmd
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <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"))()
```
## TransientPrompt and TransientRightPrompt in Fish
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `enable_transience` in the shell session. To make it permanent, put this statement in your `~/.config/fish/config.fish`. Transience can be disabled on-the-fly with `disable_transience`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## Custom pre-prompt and pre-execution Commands in Cmd
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements:
- To run a custom function right before the prompt is drawn, define a new function called `starship_preprompt_user_func`. This function receives the current prompt as a string that you can utilize. For example, to draw a rocket before the prompt, you would do
```lua
function starship_preprompt_user_func(prompt)
print("🚀")
end
load(io.popen('starship init cmd'):read("*a"))()
```
- To run a custom function right before a command is executed, define a new function called `starship_precmd_user_func`. This function receives the current commandline as a string that you can utilize. For example, to print the command that's about to be executed, you would do
```lua
function starship_precmd_user_func(line)
print("Executing: "..line)
end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Bash
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
```bash
function blastoff(){
echo "🚀"
}
starship_precmd_user_func="blastoff"
```
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
```bash
function blastoff(){
echo "🚀"
}
trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash)
set +o functrace
```
## Custom pre-prompt and pre-execution Commands in PowerShell
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
Create a function named `Invoke-Starship-PreCommand`
```powershell
function Invoke-Starship-PreCommand {
$host.ui.Write("🚀")
}
```
## Change Window Title
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
First, define a window title change function (identical in bash and zsh):
```bash
function set_win_title(){
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007"
}
```
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
In `bash`, set this function to be the precmd starship function:
```bash
starship_precmd_user_func="set_win_title"
```
In `zsh`, add this to the `precmd_functions` array:
```bash
precmd_functions+=(set_win_title)
```
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
```bash
function set_win_title(){
echo -ne "\033]0; $(basename "$PWD") \007"
}
starship_precmd_user_func="set_win_title"
```
For Cmd, you can change the window title using the `starship_preprompt_user_func` function.
```lua
function starship_preprompt_user_func(prompt)
console.settitle(os.getenv('USERNAME').."@"..os.getenv('COMPUTERNAME')..": "..os.getcwd())
end
load(io.popen('starship init cmd'):read("*a"))()
```
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
```powershell
# edit $PROFILE
function Invoke-Starship-PreCommand {
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
}
Invoke-Expression (&starship init powershell)
```
## Enable Right Prompt
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill).
`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell.
Note: Nushell 0.71.0 or later is required
### Example
```toml
# ~/.config/starship.toml
# A minimal left prompt
format = """$character"""
# move the rest of the prompt to the right
right_format = """$all"""
```
Produces a prompt like the following:
```
▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
```
## Continuation Prompt
Some shells support a continuation prompt along with the normal prompt. This prompt is rendered instead of the normal prompt when the user has entered an incomplete statement (such as a single left parenthesis or quote).
Starship can set the continuation prompt using the `continuation_prompt` option. The default prompt is `"[∙](bright-black) "`.
Note: `continuation_prompt` should be set to a literal string without any variables.
Note: Continuation prompts are only available in the following shells:
- `bash`
- `zsh`
- `PowerShell`
### Example
```toml
# ~/.config/starship.toml
# A continuation prompt that displays two filled in arrows
continuation_prompt = "▶▶"
```
## Style Strings
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `blink`
- `hidden`
- `strikethrough`
- `bg:<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.
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
A color specifier can be one of the following:
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
- Many terminals disable support for `blink` by default
- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564).
- `strikethrough` is not supported by the default macOS Terminal.app

4091
docs/no-NO/config/README.md Normal file

File diff suppressed because it is too large Load Diff

122
docs/no-NO/faq/README.md Normal file
View File

@ -0,0 +1,122 @@
# Frequently Asked Questions
## What is the configuration used in the demo GIF?
- **Terminal Emulator**: [iTerm2](https://iterm2.com/)
- **Theme**: Minimal
- **Color Scheme**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
- **Font**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
- **Shell**: [Fish Shell](https://fishshell.com/)
- **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
- **Prompt**: [Starship](https://starship.rs/)
## How do I get command completion as shown in the demo GIF?
Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions).
## Do top level `format` and `<module>.disabled` do the same thing?
Yes, they can both be used to disable modules in the prompt. If all you plan to do is disable modules, `<module>.disabled` is the preferred way to do so for these reasons:
- Disabling modules is more explicit than omitting them from the top level `format`
- Newly created modules will be added to the prompt as Starship is updated
## The docs say Starship is cross-shell. Why isn't my preferred shell supported?
The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used.
Here's a small example getting Starship working with bash:
```sh
# Get the status code from the last command executed
STATUS=$?
# Get the number of jobs running.
NUM_JOBS=$(jobs -p | wc -l)
# Set the prompt to the output of `starship prompt`
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
```
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
For a list of all flags accepted by `starship prompt`, use the following command:
```sh
starship prompt --help
```
The prompt will use as much context as is provided, but no flags are "required".
## How do I run Starship on Linux distributions with older versions of glibc?
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
```sh
curl -sS https://starship.rs/install.sh | sh -s -- --platform unknown-linux-musl
```
## Why do I see `Executing command "..." timed out.` warnings?
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
## I see symbols I don't understand or expect, what do they mean?
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
## Starship is doing something unexpected, how can I debug it?
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
```sh
env STARSHIP_LOG=trace starship module rust
```
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
```sh
env STARSHIP_LOG=trace starship timings
```
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
```sh
starship bug-report
```
## Why don't I see a glyph symbol in my prompt?
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/).
- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice.
- You are using a [Nerd Font](https://www.nerdfonts.com/).
To test your system, run the following commands in a terminal:
```sh
echo -e "\xf0\x9f\x90\x8d"
echo -e "\xee\x82\xa0"
```
The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
## How do I uninstall Starship?
Starship is just as easy to uninstall as it is to install in the first place.
1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship.
1. Delete the Starship binary.
If Starship was installed using a package manager, please refer to their docs for uninstallation instructions.
If Starship was installed using the install script, the following command will delete the binary:
```sh
# Locate and delete the starship binary
sh -c 'rm "$(command -v 'starship')"'
```

434
docs/no-NO/guide/README.md Normal file
View File

@ -0,0 +1,434 @@
<p align="center">
<img
width="400"
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
alt="Starship Cross-shell prompt"
/>
</p>
<p align="center">
<a href="https://github.com/starship/starship/actions"
><img
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
alt="GitHub Actions workflow status"
/></a>
<a href="https://crates.io/crates/starship"
><img
src="https://img.shields.io/crates/v/starship?style=flat-square"
alt="Crates.io version"
/></a>
<a href="https://repology.org/project/starship/versions"
><img
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
alt="Packaging status" /></a
><br />
<a href="https://discord.gg/starship"
><img
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
alt="Chat on Discord"
/></a>
<a href="https://twitter.com/StarshipPrompt"
><img
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Follow @StarshipPrompt on Twitter"
/></a>
</p>
<p align="center">
<a href="https://starship.rs">Website</a>
·
<a href="#🚀-installation">Installation</a>
·
<a href="https://starship.rs/config/">Configuration</a>
</p>
<p align="center">
<a href="https://github.com/starship/starship/blob/master/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
alt="English"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
alt="Deutsch"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
alt="Español"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
alt="Français"
/></a>
&nbsp;
<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>
&nbsp;
<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>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
alt="日本語"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
alt="Português do Brasil"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
alt="Русский"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
alt="Tiếng Việt"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
alt="简体中文"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
alt="繁體中文"
/></a>
</p>
[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
<h1></h1>
<img
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
alt="Starship with iTerm2 and the Snazzy theme"
width="50%"
align="right"
/>
**The minimal, blazing-fast, and infinitely customizable prompt for any shell!**
- **Fast:** it's fast _really really_ fast! 🚀
- **Customizable:** configure every aspect of your prompt.
- **Universal:** works on any shell, on any operating system.
- **Intelligent:** shows relevant information at a glance.
- **Feature rich:** support for all your favorite tools.
- **Easy:** quick to install  start using it in minutes.
<p align="center">
<a href="https://starship.rs/config/"><strong>Explore the Starship docs&nbsp;&nbsp;</strong></a>
</p>
<a name="🚀-installation"></a>
## 🚀 Installation
### Prerequisites
- 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)).
### Step 1. Install Starship
Select your operating system from the list below to view installation instructions:
<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>
Install Starship using any of the following package managers:
| 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>
<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:
| 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` |
| 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` |
</details>
<details>
<summary>macOS</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:
| 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` |
</details>
<details>
<summary>Windows</summary>
Install the latest version for your system with the MSI-installers from the [releases section](https://github.com/starship/starship/releases/latest).
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` |
</details>
### Step 2. Setup your shell to use Starship
Configure your shell to initialize starship. Select yours from the list below:
<details>
<summary>Bash</summary>
Add the following to the end of `~/.bashrc`:
```sh
eval "$(starship init bash)"
```
</details>
<details>
<summary>Cmd</summary>
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"))()
```
</details>
<details>
<summary>Elvish</summary>
Add the following to the end of `~/.elvish/rc.elv`:
```sh
eval (starship init elvish)
```
Note: Only Elvish v0.18+ is supported
</details>
<details>
<summary>Fish</summary>
Add the following to the end of `~/.config/fish/config.fish`:
```fish
starship init fish | source
```
</details>
<details>
<summary>Ion</summary>
Add the following to the end of `~/.config/ion/initrc`:
```sh
eval $(starship init ion)
```
</details>
<details>
<summary>Nushell</summary>
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
```sh
mkdir ~/.cache/starship
starship init nu | save ~/.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
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/).
If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋
## 💭 Inspired By
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/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.
## ❤️ Sponsors
Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website.
**Supporter Tier**
- [Dimension](https://dimension.dev/)
<p align="center">
<br>
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
</p>
## 📝 License
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.

View File

@ -0,0 +1,93 @@
# Advanced Installation
To install starship, you need to do two things:
1. Get the **starship** binary onto your computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
## [Chocolatey](https://chocolatey.org)
### Prerequisites
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
### Installation
```powershell
choco install starship
```
## [termux](https://termux.com)
### Prerequisites
```sh
pkg install getconf
```
### Installation
```sh
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /data/data/com.termux/files/usr/bin
```
## [Funtoo Linux](https://www.funtoo.org/Welcome)
### Installation
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
```sh
emerge app-shells/starship
```
## [Nix](https://nixos.wiki/wiki/Nix)
### Getting the Binary
#### Imperatively
```sh
nix-env -iA nixos.starship
```
#### Declarative, single user, via [home-manager](https://github.com/nix-community/home-manager)
Enable the `programs.starship` module in your `home.nix` file, and add your settings
```nix
{
programs.starship = {
enable = true;
# Configuration written to ~/.config/starship.toml
settings = {
# add_newline = false;
# character = {
# success_symbol = "[➜](bold green)";
# error_symbol = "[➜](bold red)";
# };
# package.disabled = true;
};
};
}
```
then run
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```

View File

@ -0,0 +1,267 @@
# Migrating to v0.45.0
Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization.
This guide is intended to walk you through the breaking changes.
## `prompt_order` has been replaced by a root-level `format`
Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship.
Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves.
**Example pre-v0.45.0 configuration**
```toml
prompt_order = [
"username",
"hostname",
"directory",
"git_branch",
"git_commit",
"git_state",
"git_status",
"cmd_duration",
"custom",
"line_break",
"jobs",
"battery",
"time",
"character",
]
```
**Example v0.45.0 configuration**
```toml
format = """\
$username\
$hostname\
$directory\
$git_branch\
$git_commit\
$git_state\
$git_status\
$cmd_duration\
$custom\
$line_break\
$jobs\
$battery\
$time\
$character\
"""
```
## Module `prefix` and `suffix` have been replaced by `format`
Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered.
Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output.
**Example pre-v0.45.0 configuration**
```toml
[cmd_duration]
prefix = "took "
```
**Example v0.45.0 configuration**
```toml
[cmd_duration]
# $duration The command duration (e.g. "15s")
# $style The default style of the module (e.g. "bold yellow")
format = "took [$duration]($style) "
```
### Affected Modules
#### Character
| Removed Property | Replacement |
| ----------------------- | ---------------- |
| `symbol` | `success_symbol` |
| `use_symbol_for_status` | `error_symbol` |
| `style_success` | `success_symbol` |
| `style_failure` | `error_symbol` |
**Changes to the Default Configuration**
```diff
[character]
-- symbol = ""
-- error_symbol = "✖"
-- use_symbol_for_status = true
-- vicmd_symbol = ""
++ success_symbol = "[](bold green)"
++ error_symbol = "[](bold red)"
++ vicmd_symbol = "[](bold green)"
```
Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code.
With the release of v0.45.0, we now always use `error_symbol` after non-zero status codes, unifying `use_symbol_for_status` and `error_symbol` properties.
To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file:
```toml
[character]
error_symbol = "[✖](bold red)"
```
_Note:_ The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples.
#### Command Duration
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
**Changes to the Default Configuration**
```diff
[cmd_duration]
-- prefix = "took "
++ format = "took [$duration]($style) "
```
#### Directory
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
**Changes to the Default Configuration**
```diff
[directory]
-- prefix = "in "
++ format = "[$path]($style)[$read_only]($read_only_style) "
```
#### Environment Variable
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
**Changes to the Default Configuration**
```diff
[env_var]
-- prefix = ""
-- suffix = ""
++ format = "with [$env_value]($style) "
```
#### Git Commit
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
**Changes to the Default Configuration**
```diff
[git_commit]
-- prefix = "("
-- suffix = ")"
++ format = '[\($hash\)]($style) '
```
#### Git Status
| Removed Property | Replacement |
| ----------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
| `show_sync_count` | `format` |
**Changes to the Default Configuration**
```diff
[git_status]
-- prefix = "["
-- suffix = "]"
-- show_sync_count = false
++ format = '([\[$all_status$ahead_behind\]]($style) )'
```
Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch.
With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`.
To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file:
```toml
[git_status]
ahead = "⇡${count}"
diverged = "⇕⇡${ahead_count}⇣${behind_count}"
behind = "⇣${count}"
```
#### Hostname
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
**Changes to the Default Configuration**
```diff
[hostname]
-- prefix = ""
-- suffix = ""
++ format = "[$hostname]($style) in "
```
#### Singularity
| Removed Property | Replacement |
| ---------------- | ----------- |
| `label` | `format` |
| `prefix` | `format` |
| `suffix` | `format` |
**Changes to the Default Configuration**
```diff
[singularity]
-- prefix = ""
-- suffix = ""
++ format = '[$symbol\[$env\]]($style) '
```
#### Time
| Removed Property | Replacement |
| ---------------- | ------------- |
| `format` | `time_format` |
**Changes to the Default Configuration**
```diff
[time]
-- format = "🕙[ %T ]"
++ time_format = "%T"
++ format = "at 🕙[$time]($style) "
```
#### Custom Commands
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
**Changes to the Default Configuration**
```diff
[custom.example]
-- prefix = ""
-- suffix = ""
++ format = "[$symbol$output]($style) "
```

View File

@ -0,0 +1,61 @@
# Presets
Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊
To get details on how to use a preset, simply click on the image.
## [Nerd Font Symbols](./nerd-font.md)
This preset changes the symbols for each module to use Nerd Font symbols.
[![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font)
## [No Nerd Fonts](./no-nerd-font.md)
This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt.
::: tip This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). :::
[Click to view No Nerd Font preset](./no-nerd-font)
## [Bracketed Segments](./bracketed-segments.md)
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
[![Screenshot of Bracketed Segments preset](/presets/img/bracketed-segments.png "Click to view Bracketed Segments preset")](./bracketed-segments)
## [Plain Text Symbols](./plain-text.md)
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
[![Screenshot of Plain Text Symbols preset](/presets/img/plain-text-symbols.png "Click to view Plain Text Symbols preset")](./plain-text)
## [No Runtime Versions](./no-runtimes.md)
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
[![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes)
## [No Empty Icons](./no-empty-icons.md)
This preset does not show icons if the toolset is not found.
[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md)
## [Pure Prompt](./pure-preset.md)
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
[![Screenshot of Pure preset](/presets/img/pure-preset.png "Click to view Pure Prompt preset")](./pure-preset)
## [Pastel Powerline](./pastel-powerline.md)
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
[![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline)
## [Tokyo Night](./tokyo-night.md)
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night)

View File

@ -0,0 +1,17 @@
[Return to Presets](./README.md#bracketed-segments)
# Bracketed Segments Preset
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
![Screenshot of Bracketed Segments preset](/presets/img/bracketed-segments.png)
### Configuration
```sh
starship preset bracketed-segments > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml

View File

@ -0,0 +1,21 @@
[Return to Presets](./README.md#nerd-font-symbols)
# Nerd Font Symbols Preset
This preset changes the symbols for each module to use Nerd Font symbols.
![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png)
### Prerequisites
- 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

View File

@ -0,0 +1,17 @@
[Return to Presets](./README.md#no-empty-icons)
# No Empty Icons Preset
If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined.
![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png)
### Configuration
```sh
starship preset no-empty-icons > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/no-empty-icons.toml)
<<< @/.vuepress/public/presets/toml/no-empty-icons.toml

View File

@ -0,0 +1,19 @@
[Return to Presets](./README.md#no-nerd-fonts)
# No Nerd Fonts Preset
This preset restricts the use of symbols to those from emoji and powerline sets.
This means that even without a Nerd Font installed, you should be able to view all module symbols.
This preset will become the default preset in a future release of starship.
### Configuration
```sh
starship preset no-nerd-font > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/no-nerd-font.toml)
<<< @/.vuepress/public/presets/toml/no-nerd-font.toml

View File

@ -0,0 +1,17 @@
[Return to Presets](./README.md#no-runtime-versions)
# No Runtime Versions Preset
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png)
### Configuration
```sh
starship preset no-runtime-versions > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/no-runtime-versions.toml)
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml

View File

@ -0,0 +1,21 @@
[Return to Presets](./README.md#pastel-powerline)
# Pastel Powerline Preset
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png)
### Prerequisites
- 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

View File

@ -0,0 +1,17 @@
[Return to Presets](./README.md#plain-text-symbols)
## Plain Text Symbols Preset
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
![Screenshot of Plain Text Symbols preset](/presets/img/plain-text-symbols.png)
### Configuration
```sh
starship preset plain-text-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/plain-text-symbols.toml)
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml

View File

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

View File

@ -0,0 +1,21 @@
[Return to Presets](./README.md#pastel-powerline)
# Tokyo Night Preset
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png)
### Prerequisites
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal
### Configuration
```sh
starship preset tokyo-night > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/tokyo-night.toml)
<<< @/.vuepress/public/presets/toml/tokyo-night.toml

View File

@ -534,7 +534,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. |
| `version_format` | `'v${raw}'` | The version format. |
| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. |
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |

View File

@ -534,7 +534,7 @@ O módulo `buf` mostra a versão instalada do [Buf](https://buf.build). Por padr
| ------------------- | ----------------------------------------------- | ------------------------------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | O formato do módulo `buf`. |
| `version_format` | `'v${raw}'` | A versão formatada. |
| `symbol` | `'🦬 '` | O símbolo usado antes de exibir a versão do Buf. |
| `symbol` | `'🐃 '` | O símbolo usado antes de exibir a versão do Buf. |
| `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Quais nomes de arquivos devem ativar este módulo. |
| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. |

View File

@ -534,7 +534,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. |
| `version_format` | `'v${raw}'` | The version format. |
| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. |
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |

View File

@ -534,7 +534,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. |
| `version_format` | `'v${raw}'` | The version format. |
| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. |
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |

View File

@ -534,7 +534,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. |
| `version_format` | `'v${raw}'` | The version format. |
| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. |
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |

View File

@ -1,16 +1,16 @@
# Advanced Configuration
# Розширені налаштування
While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship.
Хоч Starship і універсальна оболонка, іноді необхідно зробити більше ніж просто відредагувати `star.toml`, щоб можна було робити певні речі. Ця сторінка містить деякі з найбільш просунутих методів конфігурації, які використовуються у starship.
::: warning
The configurations in this section are subject to change in future releases of Starship.
Налаштування у цьому розділі можуть відрізнятись у майбутніх релізах Starship.
:::
## TransientPrompt in PowerShell
## TransientPrompt у 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`.
Можна замінити попередню підказку на власний рядок. Це корисно у випадках, коли вся інформація з підказки не завжди потрібна. Щоб увімкнути це, запустіть `Enable-TransientPrompt` в сеансі консолі. Щоб зробити цю зміну постійною, додайте цю команду у ваш `$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
@ -26,7 +26,7 @@ Enable-TransientPrompt
## TransientPrompt and TransientRightPrompt in Cmd
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
Clink allows you to replace the previous-printed prompt with custom strings. Це корисно у випадках, коли вся інформація з підказки не завжди потрібна. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
- `always`: always replace the previous prompt
- `same_dir`: replace the previous prompt only if the working directory is same
@ -56,7 +56,7 @@ load(io.popen('starship init cmd'):read("*a"))()
## TransientPrompt and TransientRightPrompt in Fish
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `enable_transience` in the shell session. To make it permanent, put this statement in your `~/.config/fish/config.fish`. Transience can be disabled on-the-fly with `disable_transience`.
Можна замінити попередню підказку на власний рядок. Це корисно у випадках, коли вся інформація з підказки не завжди потрібна. To enable this, run `enable_transience` in the shell session. To make it permanent, put this statement in your `~/.config/fish/config.fish`. Transience can be disabled on-the-fly with `disable_transience`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.

View File

@ -534,7 +534,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. |
| `version_format` | `'v${raw}'` | The version format. |
| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. |
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |

View File

@ -3,7 +3,7 @@
Щоб установити starship, Ви мусите зробити дві речі:
1. Завантажити бінарний файл **starship** на Ваш комп'ютер
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
1. Сказати вашій консолі використовувати бінарний файл starship у якості командного рядка, змінивши його скрипти ініціалізації
Для більшості користувачів чудово підійдуть інструкції на [головній сторінці](/guide/#🚀-installation). Однак, для деяких більш спеціалізованих платформ потрібні інші інструкції.

View File

@ -534,7 +534,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. |
| `version_format` | `'v${raw}'` | The version format. |
| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. |
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Những tên tệp nào sẽ kích hoạt mô-đun này. |
| `detect_folders` | `[]` | Những thư mục nào nên kích hoạt các mô đun này. |

View File

@ -534,7 +534,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. |
| `version_format` | `'v${raw}'` | The version format. |
| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. |
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |

View File

@ -24,7 +24,7 @@ success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set
disabled = true
```
### Config File Location
### 配置文件路徑
你可以透過更改環境變數 `STARSHIP_CONFIG` 來變更設定檔存放的位置:
@ -32,13 +32,13 @@ disabled = true
export STARSHIP_CONFIG=~/example/non/default/path/starship.toml
```
等同於在 PowersShellWindows`$PROFILE` 中添加下列文字:
等同於在 PowerShellWindows`$PROFILE` 中添加下列文字:
```powershell
$ENV:STARSHIP_CONFIG = "$HOME\example\non\default\path\starship.toml"
```
Or for Cmd (Windows) would be adding this line to your `starship.lua`:
或用命令提示字元 (cmd) (Windows) 的話,加下面這行至 `starship.lua`
```lua
os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\starship.toml')
@ -58,7 +58,7 @@ export STARSHIP_CACHE=~/.starship/cache
$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
```
Or for Cmd (Windows) would be adding this line to your `starship.lua`:
或用命令提示字元 (cmd) (Windows) 的話,加下面這行至 `starship.lua`
```lua
os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp')
@ -534,7 +534,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. |
| `version_format` | `'v${raw}'` | The version format. |
| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. |
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |