From 3a4c9063e90e8671fb99c977f7079d980933ae07 Mon Sep 17 00:00:00 2001
From: Matan Kushner
+ alt="GitHub Actions workflow status" + /> + alt="Crates.io version" + /> + alt="Chat on Discord" + /> + alt="Follow @StarshipPrompt on Twitter" + />
@@ -42,63 +47,72 @@ > + alt="English" + /> + alt="日本語" + /> + alt="繁體中文" + /> + alt="Русский" + /> + alt="Deutsch" + /> + alt="简体中文" + /> + alt="Español" + /> + alt="Français" + /> + alt="Tiếng Việt" + />
@@ -107,7 +121,8 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif" alt="Starship with iTerm2 and the Snazzy theme" width="50%" - align="right" /> + align="right" + /> **The minimal, blazing-fast, and infinitely customizable prompt for any shell!** @@ -229,6 +244,17 @@ eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + ## 🤝 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). diff --git a/docs/ar-SA/installing/README.md b/docs/ar-SA/installing/README.md index 52c0ac4c..73b998f7 100644 --- a/docs/ar-SA/installing/README.md +++ b/docs/ar-SA/installing/README.md @@ -8,13 +8,29 @@ To install starship, you need to do two things: 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! -## [termux](https://termux.com) + +## [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 -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin ``` @@ -31,7 +47,29 @@ nix-env -iA nixos.starship #### Declarative, single user, via [home-manager](home-manager) -Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run +Enable the `programs.starship` module in your `home.nix` file, and add your settings + +```nix +{ + programs.starship = { + enable = true; + enableZshIntegration = 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 @@ -39,18 +77,8 @@ home-manager switch #### Declarative, system-wide, with NixOS -Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch ``` - -### Modifying Init Scripts - -#### With Nix and home-manager, using zsh: - -Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run - -```sh -home-manager switch -``` diff --git a/docs/ar-SA/presets/README.md b/docs/ar-SA/presets/README.md index 746364fa..c4b2f7ca 100644 --- a/docs/ar-SA/presets/README.md +++ b/docs/ar-SA/presets/README.md @@ -16,7 +16,7 @@ This preset doesn't change anything except for the symbols used for each module. ```toml [aws] -symbol = " " +symbol = " " [conda] symbol = " " @@ -84,6 +84,9 @@ symbol = " " [rust] symbol = " " +[scala] +symbol = " " + [swift] symbol = "ﯣ " ``` diff --git a/docs/ckb-IR/README.md b/docs/ckb-IR/README.md index 5887681e..eb5b35ff 100644 --- a/docs/ckb-IR/README.md +++ b/docs/ckb-IR/README.md @@ -123,3 +123,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + diff --git a/docs/ckb-IR/config/README.md b/docs/ckb-IR/config/README.md index 6484c7d5..3a9111cd 100644 --- a/docs/ckb-IR/config/README.md +++ b/docs/ckb-IR/config/README.md @@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file: ```toml -# Don't print a new line at the start of the prompt -add_newline = false +# Inserts a blank line between shell prompts +add_newline = true # Replace the "❯" symbol in the prompt with "➜" [character] # The name of the module we are configuring is "character" @@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri For example: - `[on](red bold)` will print a string `on` with bold text colored red. -- `[⬢ $version](bold green)` will print a symbol `⬢` followed by the content of variable `version`, with bold text colored green. +- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green. - `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green. #### Style Strings @@ -146,7 +146,7 @@ This is the list of prompt-wide configuration options. | -------------- | ------------------------------ | ----------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configure the format of the prompt. | | `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | -| `add_newline` | `true` | Add a new line before the start of the prompt. | +| `add_newline` | `true` | Inserts blank line between shell prompts. | ### Example @@ -162,7 +162,7 @@ format = """ # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 -# Disable the newline at the start of the prompt +# Disable the blank line at the start of the prompt add_newline = false ``` @@ -207,6 +207,7 @@ $purescript\ $python\ $ruby\ $rust\ +$scala\ $swift\ $terraform\ $vagrant\ @@ -237,15 +238,17 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var. +When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. + ### Options -| Option | Default | Description | -| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | -| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | -| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `AWS` module. | +| Option | Default | Description | +| ---------------- | --------------------------------------------------- | --------------------------------------------------------------- | +| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | +| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `AWS` module. | ### Variables @@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re # ~/.config/starship.toml [aws] -format = 'on [$symbol$profile(\($region\))]($style) ' +format = 'on [$symbol($profile )(\($region\) )]($style)' style = "bold blue" symbol = "🅰 " [aws.region_aliases] @@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th | Option | Default | Description | | ------------------- | -------------------------------------- | -------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `symbol` | `"△ "` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this moudle | | `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | @@ -1343,6 +1346,12 @@ symbol = "🌟 " The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. +::: warning + +This module is not supported on tcsh. + +::: + ### Options | Option | Default | Description | @@ -1737,7 +1746,7 @@ The `nodejs` module shows the currently installed version of NodeJS. By default | Option | Default | Description | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. | +| `symbol` | `" "` | A format string representing the symbol of NodeJS. | | `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. | | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | @@ -2158,6 +2167,48 @@ By default the `rust` module shows the currently installed version of Rust. The format = "via [⚙️ $version](red bold)" ``` + +## Scala + +The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file +- The current directory contains a file with the `.scala` or `.sbt` extension +- The current directory contains a directory named `.metals` + +### Options + + +| Option | Default | Description | +| ------------------- | ---------------------------------------- | ------------------------------------------------- | +| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | +| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | +| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | +| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | +| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | +| `style` | `"red dimmed"` | The style for the module. | +| `disabled` | `false` | Disables the `scala` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `2.13.5` | The version of `scala` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[scala] +symbol = "🌟 " +``` + + ## Shell The `shell` module shows an indicator for currently used shell. @@ -2178,6 +2229,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `powershell_indicator` | `psh` | A format string used to represent powershell. | | `ion_indicator` | `ion` | A format string used to represent ion. | | `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | | `format` | `$indicator` | The format for the module. | | `disabled` | `true` | Disables the `shell` module. | diff --git a/docs/ckb-IR/faq/README.md b/docs/ckb-IR/faq/README.md index 9bb23bf9..d3c6d238 100644 --- a/docs/ckb-IR/faq/README.md +++ b/docs/ckb-IR/faq/README.md @@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l) 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. +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: @@ -56,6 +56,10 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship) curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl ``` +## 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. + ## 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: diff --git a/docs/ckb-IR/guide/README.md b/docs/ckb-IR/guide/README.md index 445e3027..fd107ff3 100644 --- a/docs/ckb-IR/guide/README.md +++ b/docs/ckb-IR/guide/README.md @@ -2,18 +2,21 @@ + alt="Starship – Cross-shell prompt" + />+ alt="GitHub Actions workflow status" + /> + alt="Crates.io version" + /> + alt="Chat on Discord" + /> + alt="Follow @StarshipPrompt on Twitter" + />
@@ -42,63 +47,72 @@ > + alt="English" + /> + alt="日本語" + /> + alt="繁體中文" + /> + alt="Русский" + /> + alt="Deutsch" + /> + alt="简体中文" + /> + alt="Español" + /> + alt="Français" + /> + alt="Tiếng Việt" + />
@@ -107,7 +121,8 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif" alt="Starship with iTerm2 and the Snazzy theme" width="50%" - align="right" /> + align="right" + /> **The minimal, blazing-fast, and infinitely customizable prompt for any shell!** @@ -229,6 +244,17 @@ eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + ## 🤝 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). diff --git a/docs/ckb-IR/installing/README.md b/docs/ckb-IR/installing/README.md index 52c0ac4c..73b998f7 100644 --- a/docs/ckb-IR/installing/README.md +++ b/docs/ckb-IR/installing/README.md @@ -8,13 +8,29 @@ To install starship, you need to do two things: 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! -## [termux](https://termux.com) + +## [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 -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin ``` @@ -31,7 +47,29 @@ nix-env -iA nixos.starship #### Declarative, single user, via [home-manager](home-manager) -Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run +Enable the `programs.starship` module in your `home.nix` file, and add your settings + +```nix +{ + programs.starship = { + enable = true; + enableZshIntegration = 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 @@ -39,18 +77,8 @@ home-manager switch #### Declarative, system-wide, with NixOS -Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch ``` - -### Modifying Init Scripts - -#### With Nix and home-manager, using zsh: - -Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run - -```sh -home-manager switch -``` diff --git a/docs/ckb-IR/presets/README.md b/docs/ckb-IR/presets/README.md index 746364fa..c4b2f7ca 100644 --- a/docs/ckb-IR/presets/README.md +++ b/docs/ckb-IR/presets/README.md @@ -16,7 +16,7 @@ This preset doesn't change anything except for the symbols used for each module. ```toml [aws] -symbol = " " +symbol = " " [conda] symbol = " " @@ -84,6 +84,9 @@ symbol = " " [rust] symbol = " " +[scala] +symbol = " " + [swift] symbol = "ﯣ " ``` diff --git a/docs/de-DE/README.md b/docs/de-DE/README.md index 88bd159c..0ea6a097 100644 --- a/docs/de-DE/README.md +++ b/docs/de-DE/README.md @@ -123,3 +123,14 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + diff --git a/docs/de-DE/config/README.md b/docs/de-DE/config/README.md index f00396f7..54a94bbc 100644 --- a/docs/de-DE/config/README.md +++ b/docs/de-DE/config/README.md @@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Die gesamte Konfiguration von Starship wird über diese [TOML](https://github.com/toml-lang/toml)-Datei durchgeführt: ```toml -# Don't print a new line at the start of the prompt -add_newline = false +# Inserts a blank line between shell prompts +add_newline = true # Replace the "❯" symbol in the prompt with "➜" [character] # The name of the module we are configuring is "character" @@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri For example: - `[on](red bold)` will print a string `on` with bold text colored red. -- `[⬢ $version](bold green)` will print a symbol `⬢` followed by the content of variable `version`, with bold text colored green. +- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green. - `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green. #### Style-Strings @@ -146,7 +146,7 @@ Dies ist eine Liste mit Prompt-weiten Konfigurationsoptionen. | -------------- | ------------------------------ | ------------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configure the format of the prompt. | | `scan_timeout` | `30` | Timeout für das Scannen von Dateien (in Millisekunden). | -| `add_newline` | `true` | Neuer Zeilenumbruch bei Start des Prompts. | +| `add_newline` | `true` | Inserts blank line between shell prompts. | ### Beispiel @@ -162,7 +162,7 @@ format = """ # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 -# Disable the newline at the start of the prompt +# Disable the blank line at the start of the prompt add_newline = false ``` @@ -207,6 +207,7 @@ $purescript\ $python\ $ruby\ $rust\ +$scala\ $swift\ $terraform\ $vagrant\ @@ -237,15 +238,17 @@ Das `aws`-Modul zeigt das aktuelle AWS-Profil an. Dies basiert auf den Umgebungs When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var. +When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. + ### Optionen -| Option | Standardwert | Beschreibung | -| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | -| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | Symbol das vor dem aktuellen AWS-Profil angezeigt wird. | -| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | Stil für dieses Modul. | -| `disabled` | `false` | Deaktiviert das `aws`-Modul. | +| Option | Standardwert | Beschreibung | +| ---------------- | --------------------------------------------------- | --------------------------------------------------------------- | +| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. | +| `symbol` | `"☁️ "` | Symbol das vor dem aktuellen AWS-Profil angezeigt wird. | +| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | +| `style` | `"bold yellow"` | Stil für dieses Modul. | +| `disabled` | `false` | Deaktiviert das `aws`-Modul. | ### Variables @@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re # ~/.config/starship.toml [aws] -format = 'on [$symbol$profile(\($region\))]($style) ' +format = 'on [$symbol($profile )(\($region\) )]($style)' style = "bold blue" symbol = "🅰 " [aws.region_aliases] @@ -301,7 +304,7 @@ symbol = "🅰 " ## Akkustand -Das `battery` Modul zeigt, wie hoch der Akku des Geräts geladen ist und den aktuellen Ladestatus. Das Modul ist nur sichtbar, wenn der Akku des Geräts unter 10% geladen ist. +The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. ### Optionen @@ -330,7 +333,7 @@ discharging_symbol = "💀" ### Anzeige des Akkustandes -Die `display` Konfiguration "threshold" stellt ein ab wann die Akkuanzeige eingeblendet wird. Mit "style" wird das Erscheinungsbild festgelegt. Wenn `display` nicht angegeben ist. Die Standardwerte sind folgende: +The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. Die Standardwerte sind folgende: ```toml [[battery.display]] @@ -340,7 +343,7 @@ style = "bold red" #### Optionen -Die `display`-Option beinhaltet ein Array mit den folgenden Werten. +The `display` option is an array of the following table. | Option | Beschreibung | | ----------- | ------------------------------------------------------- | @@ -364,9 +367,9 @@ style = "bold yellow" ## Zeichen -Das `character` Modul zeigt ein Zeichen ( meistens einen Pfeil "❯") vor der Texteingabe an. +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -Das Zeichen zeigt an ob der letzte Befehl erfolgreich war, oder einen Fehler erzeugt hat. It can do this in two ways: +The character will tell you whether the last command was successful or not. It can do this in two ways: - changing color (`red`/`green`) - changing shape (`❯`/`✖`) @@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th | Option | Standardwert | Beschreibung | | ------------------- | -------------------------------------- | -------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `symbol` | `"△ "` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this moudle | | `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | @@ -453,15 +456,15 @@ The `cmake` module shows the currently installed version of CMake. By default th ## Befehlsdauer -Das `cmd_duration` Modul zeigt an wie lange der letzte Befehl ausgeführt wurde. Das Modul wird nur angezeigt wenn der letzte Befehl länger als zwei Sekunden ausgeführt wurde. Mit der `min_time` Option kann die Zeit eingestellt werden ab der `cmd_duration` angezeigt wird. +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. -::: warning Nicht die DEBUG-trap in der Bash hooken +::: warning Do not hook the DEBUG trap in Bash -Ist `bash` die Konsole der Wahl, dann nicht die `DEBUG`-trap nach der Ausführung von `eval $(starship init $0)` hooken, andernfalls **wird** dieses Modul unweigerlich untergehen. +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -Bash Nutzer, die eine "preexec" ähnliche Funktion benötigen, können [rcaloras bash_preexec Framework](https://github.com/rcaloras/bash-preexec) verwenden. Definieren Sie einfach die Arrays `preexec_functions` und `precmd_functions` bevor sie `eval $(starship init $0)` ausführen, und fahren Sie dann wie gewohnt fort. +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### Optionen @@ -475,7 +478,7 @@ Bash Nutzer, die eine "preexec" ähnliche Funktion benötigen, können [rcaloras | `show_notifications` | `false` | Show desktop notifications when command completes. | | `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | -::: Tipp +::: tip Showing desktop notifications requires starship to be built with `rust-notify` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. @@ -502,11 +505,11 @@ format = "underwent [$duration](bold yellow)" ## Conda -Das `conda`-Modul zeigt dessen aktuelle Umgebung an, sofern `$CONDA_DEFAULT_ENV` gesetzt ist. +The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set. -::: Tipp +::: tip -Hinweis: Dies unterdrückt nicht conda's eigenen Prompt-Modifikator, sie können jedoch conda mit `conda config --set changeps1 False` konfigurieren, um die Ausgabe von conda selbst auszuschalten. +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. ::: @@ -619,7 +622,7 @@ format = "via [🔰 $version](bold red) " ## Verzeichnis -Das `directory` -Modul zeigt den Pfad zu Ihrem aktuellen Verzeichnis an, abgeschnitten auf drei übergeordnete Ordner. Your directory will also be truncated to the root of the git repo that you're currently in. +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. @@ -640,7 +643,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `home_symbol` | `"~"` | The symbol indicating home directory. |+ alt="Workflow-Status der GitHub Actions" + /> + alt="Crates.io-Version" + /> + alt="Chat auf Discord" + /> + alt="Folge @StarshipPrompt auf Twitter" + />
@@ -42,63 +47,72 @@ > + alt="Englisch" + /> + alt="日本語" + /> + alt="繁體中文" + /> + alt="Russisch" + /> + alt="Deutsch" + /> + alt="简体中文" + /> + alt="Español" + /> + alt="Français" + /> + alt="Tiếng Việt" + />
@@ -107,7 +121,8 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif" alt="Starship mit iTem2 und dem Theme „Snazzy“" width="50%" - align="right" /> + align="right" + /> **Minimale, super schnelle und unendlich anpassbare Prompt für jede Shell!** @@ -229,6 +244,17 @@ eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + ## 🤝 Mitwirken Wir laden Leute **aller Erfahrungsstufen** herzlich ein mitzumachen! Falls du dich mit dem Projekt vertaut machen willst, versuche ein [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). diff --git a/docs/de-DE/installing/README.md b/docs/de-DE/installing/README.md index b98ddce3..aa64a272 100644 --- a/docs/de-DE/installing/README.md +++ b/docs/de-DE/installing/README.md @@ -1,6 +1,6 @@ # 🚀 Advanced Installation -To install starship, you need to do two things: +Um starship zu installieren, musst du zwei Dinge tun: 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 @@ -8,13 +8,29 @@ To install starship, you need to do two things: 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! -## [termux](https://termux.com) + +## [Chocolatey](https://chocolatey.org) + ### Voraussetzungen + +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) + +### Voraussetzungen + ```sh pkg install getconf ``` ### Installation + ```sh curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin ``` @@ -31,7 +47,29 @@ nix-env -iA nixos.starship #### Declarative, single user, via [home-manager](home-manager) -Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run +Enable the `programs.starship` module in your `home.nix` file, and add your settings + +```nix +{ + programs.starship = { + enable = true; + enableZshIntegration = 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 @@ -39,18 +77,8 @@ home-manager switch #### Declarative, system-wide, with NixOS -Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch ``` - -### Modifying Init Scripts - -#### With Nix and home-manager, using zsh: - -Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run - -```sh -home-manager switch -``` diff --git a/docs/de-DE/presets/README.md b/docs/de-DE/presets/README.md index 5fc21866..01e037d0 100644 --- a/docs/de-DE/presets/README.md +++ b/docs/de-DE/presets/README.md @@ -16,7 +16,7 @@ This preset doesn't change anything except for the symbols used for each module. ```toml [aws] -symbol = " " +symbol = " " [conda] symbol = " " @@ -84,6 +84,9 @@ symbol = " " [rust] symbol = " " +[scala] +symbol = " " + [swift] symbol = "ﯣ " ``` diff --git a/docs/es-ES/README.md b/docs/es-ES/README.md index 994c2cec..8f0990d8 100644 --- a/docs/es-ES/README.md +++ b/docs/es-ES/README.md @@ -8,17 +8,17 @@ actionLink: ./guide/ features: - title: Compatibilidad primero - details: Funciona en las shells más comunes en los sistemas operativos más comunes. ¡Úsalo en todas partes! + details: Funciona en los intérprete de comandos más comunes de los sistemas operativos más comunes. ¡Úsalo en todas partes! - title: Desarrollado en Rust details: Obtén la mayor velocidad y seguridad de Rust, para hacer tu prompt lo más rápida y segura posible. - title: Personalizable - details: Puedes personalizar cada pequeño detalle a tu gusto, de manera que puedes tener una interfaz minimalista o rica en funcionalidades. + details: Puedes personalizar cada pequeño detalle a tu gusto, de manera que puedes tener un prompt minimalista o rico en funcionalidades. footer: Bajo una licencia ISC | Derechos de autor © 2019-presente Colaboradores de Starship #Used for the description meta tag, for SEO -metaTitle: "Starship: el indicador de comando multi-intérprete" -description: Starship es el símbolo de sistema minimalista, ultrarápido e infinitamente customizable 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 y PowerShell. +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 y PowerShell.' ---+ alt="Estado del flujo de trabajo de GitHub Actions" + /> + alt="Versión de Crates.io" + /> + alt="Chat en Discord" + /> + alt="Sigue a @StarshipPrompt en Twitter" + />
@@ -42,63 +47,72 @@ > + alt="English" + /> + alt="日本語" + /> + alt="繁體中文" + /> + alt="Русский" + /> + alt="Deutsch" + /> + alt="简体中文" + /> + alt="Español" + /> + alt="Francés" + /> + alt="Tiếng Việt" + />
@@ -107,7 +121,8 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif" alt="Starship con iTerm 2 y el tema Snazzy" width="50%" - align="right" /> + align="right" + /> **¡El prompt minimalista, ultrarápido e infinitamente personalizable para cualquier intérprete de comandos!** @@ -163,7 +178,7 @@ scoop install starship ``` -2. Añade el script de inicio al archivo de configuración de tu interfaz de línea de comandos: +2. Añade el guión de inicio al archivo de configuración de tu intérprete de comandos: #### Bash @@ -229,6 +244,17 @@ eval (starship init elvish) ``` + + #### Tcsh + + Añade el siguiente código al final de `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + ## 🤝 Colaborando ¡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)". @@ -269,11 +295,11 @@ Apoya este proyecto con tu organización. Su logo se mostrará aquí con un enla Por favor, revisa estos trabajos previos que ayudaron a inspirar la creación de starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Una prompt ZSH para astronautas. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Un prompt 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)** - robbyrussel, tema multi-intérprete de comandos escrito en JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** - Una 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.
diff --git a/docs/es-ES/installing/README.md b/docs/es-ES/installing/README.md
index 71226790..0294b582 100644
--- a/docs/es-ES/installing/README.md
+++ b/docs/es-ES/installing/README.md
@@ -3,25 +3,41 @@
Para instalar Starship, necesitas hacer dos cosas:
1. Consigue el binario de **Starship** en tu ordenador
-1. Decirle a tu shell que use el binario de Starship como su prompt modificando sus guiones de inicio
+1. Decirle a tu intérprete de comandos que use el binario de Starship como su prompt modificando sus guiones de inicio
Para la mayoría de los usuarios, las instrucciones en [la página principal](/guide/#🚀-installation) funcionarán genial. Sin embargo, para algunas plataformas más especializadas, se necesitan diferentes instrucciones.
Hay tantas plataformas ahí fuera que no cabían en el README.md principal, así que aquí están algunas instrucciones de instalación para otras plataformas de la comunidad. ¿No está usted aquí? ¡Por favor, añádelo aquí si lo encuentras!
-## [termux](https://termux.com)
+
+## [Chocolatey](https://chocolatey.org)
+
### Prerequisitos
+
+Dirígete a la página de instalación de [Chocolatey](https://chocolatey.org/install) y sigue las instrucciones para instalar Chocolatey.
+
+### Instalación
+
+```powershell
+choco install starship
+```
+
+## [termux](https://termux.com)
+
+### Prerequisitos
+
```sh
pkg install getconf
```
-### Installation
+### Instalación
+
```sh
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
```
## [Nix](https://nixos.wiki/wiki/Nix)
-### Getting the Binary
+### Obtener el binario
#### Imperativamente
@@ -31,26 +47,38 @@ nix-env -iA nixos.starship
#### Declarativo, usuario único, a través de [home-manager](home-manager)
-Añade `pkgs.starship` a tu `home.packages` en tu archivo `home.nix` y luego ejecuta
+Activa el módulo `programs.starship` en tu archivo `home.nix` y añade tus ajustes
+
+```nix
+{
+ programs.starship = {
+ enable = true;
+ enableZshIntegration = true;
+ # Configuration written to ~/.config/starship.toml
+ settings = {
+ # add_newline = false;
+
+ # character = {
+ # success_symbol = "[➜](bold green)";
+ # error_symbol = "[➜](bold red)";
+ # };
+
+ # package.disabled = true;
+ };
+ };
+}
+```
+
+luego ejecutar
```sh
-interruptor home-manager
+home-manager switch
```
#### Declarativo, en todo el sistema, con NixOS
-Añade `pkgs.starship` a `environment.packages` en tu `configuration.nix`, luego ejecuta
+Añade `pkgs.starship` a `environment.systemPackages` en tu `configuration.nix`, luego ejecuta
```sh
sudo nixos-rebuild switch
```
-
-### Modifying Init Scripts
-
-#### Con Nix y home-manager, usando zsh:
-
-Añade lo siguiente a `programs.zsh.initExtra` en tu archivo `home.nix` y luego ejecutar
-
-```sh
-interruptor home-manager
-```
diff --git a/docs/es-ES/migrating-to-0.45.0/README.md b/docs/es-ES/migrating-to-0.45.0/README.md
index 23d1a4f1..3c1748f0 100644
--- a/docs/es-ES/migrating-to-0.45.0/README.md
+++ b/docs/es-ES/migrating-to-0.45.0/README.md
@@ -6,7 +6,7 @@ Esta guía pretende guiarle a través de los cambios de ruptura.
## `prompt_order` ha sido reemplazado por un "nivel raíz" `format`
-Anterioramente a v0.45.0, `prompt_order` aceptaría un array de nombres de módulos en el orden que deberían ser renderizados por Starship.
+Anterioramente a v0.45.0, `prompt_order` aceptaría un arreglo de nombres de módulos en el orden que deberían ser renderizados por Starship.
En su lugar, Starship v0.45.0 acepta un valor de `format`, permitiendo la personalización del indicador fuera de los propios módulos.
@@ -70,7 +70,7 @@ prefix = "tomó "
```toml
[cmd_duration]
# $duration – La duración del comando (p. ej. "15s")
-# $style – El estilo predeterminado del módulo (p. ej. "bold yellow")
+# $style – El estilo por defecto del módulo (p. ej. "bold yellow")
format = "tomó [$duration]($style) "
```
diff --git a/docs/es-ES/presets/README.md b/docs/es-ES/presets/README.md
index b9042b4b..6ee28ef2 100644
--- a/docs/es-ES/presets/README.md
+++ b/docs/es-ES/presets/README.md
@@ -1,12 +1,12 @@
-# Ajustes predeterminados
+# Ajustes por defecto
-Aqui hay una colección de ajustes predeterminados creados por la comunidad de Starship. ¡Si quieres compartir un ajuste predeterminado, por favor, [envía un PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) actualizando este archivo! 😊
+Aquí hay una colección de ajustes por defecto creados por la comunidad de Starship. ¡Si quieres compartir un ajuste por defecto, por favor, [envía un PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) actualizando este archivo! 😊
## Símbolos de Nerd Font
-Este ajuste predeterminado no modifica nada excepto los símbolos usados para cada módulo. Si los emojis no son lo tuyo, ¡esto podría llamar tu atención!
+Este ajuste por defecto no modifica nada excepto los símbolos usados para cada módulo. Si los emojis no son lo tuyo, ¡esto podría llamar tu atención!
-![Captura de pantalla de los ajustes predeterminados de los Símbolos de Nerd Font](/presets/nerd-font-symbols.png)
+![Captura de pantalla de los ajustes por defecto de los Símbolos de Nerd Font](/presets/nerd-font-symbols.png)
### Prerequisitos
@@ -16,7 +16,7 @@ Este ajuste predeterminado no modifica nada excepto los símbolos usados para ca
```toml
[aws]
-symbol = " "
+symbol = " "
[conda]
symbol = " "
@@ -84,6 +84,9 @@ symbol = " "
[rust]
symbol = " "
+[scala]
+symbol = " "
+
[swift]
symbol = "ﯣ "
```
diff --git a/docs/fr-FR/README.md b/docs/fr-FR/README.md
index 88a1784b..61a2512d 100644
--- a/docs/fr-FR/README.md
+++ b/docs/fr-FR/README.md
@@ -123,3 +123,14 @@ description: Starship est un invite minimaliste, ultra-rapide et hautement perso
eval (starship init elvish)
```
+
+ #### Tcsh
+
+ Add the following to the end of `~/.tcshrc`:
+
+ ```sh
+ # ~/.tcshrc
+
+ eval `starship init tcsh`
+ ```
+
diff --git a/docs/fr-FR/config/README.md b/docs/fr-FR/config/README.md
index 4a8d1879..45a2c623 100644
--- a/docs/fr-FR/config/README.md
+++ b/docs/fr-FR/config/README.md
@@ -9,14 +9,14 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
Toute la configuration de starship est faite dans ce fichier [TOML](https://github.com/toml-lang/toml):
```toml
-# N'écrivez pas une nouvelle ligne au début de la console
-add_newline = false
+# Inserts a blank line between shell prompts
+add_newline = true
-# Remplacez le symbole "❯" dans la console avec "➜"
-[character] # Le nom du module que nous configurons est "character"
-success_symbol = "[➜](bold green)" # Le segment "success_symbol" est mis comme "➜" avec la couleur "bold green"
+# Replace the "❯" symbol in the prompt with "➜"
+[character] # The name of the module we are configuring is "character"
+success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
-# Désactivez le module package, le masquant complètement dans la console
+# Disable the package module, hiding it from the prompt completely
[package]
disabled = true
```
@@ -80,7 +80,7 @@ La deuxième partie, qui est entourée par `()`, est une [chaîne de style](#sty
Par exemple :
- `[on](red bold)` affichera une chaîne de caractères `on` avec un texte gras de couleur rouge.
-- `[⬢ $version](bold green)` affichera un symbole `⬢` suivi du contenu de la variable `version`, avec un texte en gras de couleur verte.
+- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
- `[a [b](red) c](green)` affichera `a b c` avec `b` rouge, et `a` et `c` vert.
#### Chaînes de style
@@ -146,7 +146,7 @@ Voici la liste des options de configuration de l'invite en lui-même.
| -------------- | ------------------------------ | -------------------------------------------------------------------------- |
| `format` | [lien](#default-prompt-format) | Configure le format de l'invite. |
| `scan_timeout` | `30` | Délai d'attente avant que starship scanne les fichiers (en millisecondes). |
-| `add_newline` | `true` | Ajoute une nouvelle ligne a début de l'invite. |
+| `add_newline` | `true` | Inserts blank line between shell prompts. |
### Exemple
@@ -162,7 +162,7 @@ format = """
# Attendez 10 millisecondes pour que starship vérifie les fichiers dans le répertoire de travail.
scan_timeout = 10
-# Désactive la nouvelle ligne au démarrage de l'invite
+# Disable the blank line at the start of the prompt
add_newline = false
```
@@ -207,6 +207,7 @@ $purescript\
$python\
$ruby\
$rust\
+$scala\
$swift\
$terraform\
$vagrant\
@@ -237,15 +238,17 @@ Le module `aws` affiche la région et le profil AWS courant. Ces informations so
Quand [aws-vault](https://github.com/99designs/aws-vault) est utilisé, la valeur du profil est lu dans la variable d'environnement: `AWS_VAULT`.
+When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
+
### Options
-| Option | Default | Description |
-| ---------------- | ------------------------------------------------ | -------------------------------------------------------- |
-| `format` | `'on [$symbol$profile(\($region\))]($style) '` | Format du module. |
-| `symbol` | `"☁️ "` | Le symbole affiché avant le profil AWS actuel. |
-| `region_aliases` | | Table des alias de région à afficher en plus du nom AWS. |
-| `style` | `"bold yellow"` | Le style du module. |
-| `disabled` | `false` | Désactive le module `AWS`. |
+| Option | Default | Description |
+| ---------------- | --------------------------------------------------- | -------------------------------------------------------- |
+| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | Format du module. |
+| `symbol` | `"☁️ "` | Le symbole affiché avant le profil AWS actuel. |
+| `region_aliases` | | Table des alias de région à afficher en plus du nom AWS. |
+| `style` | `"bold yellow"` | Le style du module. |
+| `disabled` | `false` | Désactive le module `AWS`. |
### Variables
@@ -256,7 +259,7 @@ Quand [aws-vault](https://github.com/99designs/aws-vault) est utilisé, la valeu
| symbol | | Reflète la valeur de l'option `symbol` |
| style\* | | Reflète la valeur de l'option `style` |
-\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
+\*: This variable can only be used as a part of a style string
### Exemples
@@ -266,7 +269,7 @@ Quand [aws-vault](https://github.com/99designs/aws-vault) est utilisé, la valeu
# ~/.config/starship.toml
[aws]
-format = 'on [$symbol$profile(\($region\))]($style) '
+format = 'on [$symbol($profile )(\($region\) )]($style)'
style = "bold blue"
symbol = "🅰 "
[aws.region_aliases]
@@ -301,7 +304,7 @@ symbol = "🅰 "
## Battery
-Le module `battery` montre à quel point la batterie de l'appareil est chargée et son état de charge actuel. Ce module n'est visible que lorsque la batterie de l'appareil est inférieure à 10%.
+The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%.
### Options
@@ -330,7 +333,7 @@ discharging_symbol = "💀"
### Indicateur de batterie
-L'option de configuration `display` est utilisée pour définir quand l'indicateur de batterie doit être affiché (seuil) et à quoi il ressemble (style). Si aucun `display` n'est fourni. La valeur par défaut est la suivante :
+The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. La valeur par défaut est la suivante :
```toml
[[battery.display]]
@@ -340,7 +343,7 @@ style = "bold red"
#### Options
-L'option `display` est une array de la table suivante.
+The `display` option is an array of the following table.
| Option | Description |
| ----------- | -------------------------------------------------- |
@@ -364,14 +367,14 @@ style = "bold yellow"
## Caractères
-Le module `character` affiche un caractère (habituellement une flèche) à côté de l'endroit où le texte est entré dans votre terminal.
+The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
-Le caractère vous dira si la dernière commande a été réussie ou pas. Cela peut être fait de deux manières:
+The character will tell you whether the last command was successful or not. It can do this in two ways:
- changement de couleur (`red`/`green`)
- changement de forme (`❯`/`✖`)
-Par défaut, il ne change que la couleur. Si vous voulez également changer sa forme, jetez un œil à [cet exemple](#with-custom-error-shape).
+By default it only changes color. If you also want to change it's shape take a look at [this example](#with-custom-error-shape).
::: warning `error_symbol` is not supported on elvish shell. :::
@@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th
| Option | Défaut | Description |
| ------------------- | -------------------------------------- | --------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | Format du module. |
-| `symbol` | `"喝 "` | Le symbole utilisé avant la version de cmake. |
+| `symbol` | `"△ "` | Le symbole utilisé avant la version de cmake. |
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
| `detect_folders` | `[]` | Which folders should trigger this module |
@@ -449,19 +452,19 @@ The `cmake` module shows the currently installed version of CMake. By default th
| symbol | | Reflète la valeur de l'option `symbol` |
| style\* | | Reflète la valeur de l'option `style` |
-\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
+\*: This variable can only be used as a part of a style string
## Temps d'exécution
-Le module `cmd_duration` montre le temps qu'a pris la dernière commande a pris pour s'exécuter. Le module ne sera affiché que si la commande a pris plus de deux secondes, ou si la valeur de configuration `min_time` existe.
+The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
-::: attention, n'accrochez pas la trappe DEBUG en Bash
+::: warning Do not hook the DEBUG trap in Bash
-Si vous utilisez starship en `bash`, n'accrochez pas `DEBUG` après avoir exécuté `eval $(starship init $0)`, ou ce module **cassera**.
+If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
:::
-Les utilisateurs de Bash qui ont besoin de fonctionnalité pré-exec peuvent utiliser [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Définissez simplement les array `preexec_functions` et `precmd_functions` avant d'éxécuter `eval $(starship init $0)`, puis procédez comme d'habitude.
+Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
### Options
@@ -477,7 +480,7 @@ Les utilisateurs de Bash qui ont besoin de fonctionnalité pré-exec peuvent uti
::: tip
-L'affichage des notifications de bureau nécessite que starship soit compilé avec la prise en charge de `rust-notify`. Vérifiez si starship supporte les notifications en exécutant `STARSHIP_LOG=debug starship module cmd_duration -d 60000` lorsque `show_notifications` est défini à `true`.
+Showing desktop notifications requires starship to be built with `rust-notify` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`.
:::
@@ -488,7 +491,7 @@ L'affichage des notifications de bureau nécessite que starship soit compilé av
| duration | `16m40s` | Le temps nécessaire pour exécuter la commande |
| style\* | | Reflète la valeur de l'option `style` |
-\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
+\*: This variable can only be used as a part of a style string
### Exemple
@@ -502,11 +505,11 @@ format = "underwent [$duration](bold yellow)"
## Conda
-Le module `conda` affiche l'environnement conda actuel, si `$CONDA_DEFAULT_ENV` est défini.
+The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
::: tip
-Cela ne supprime pas le modificateur d'invite de conda, vous pouvez exécuter `conda config --set changeps1 False`.
+This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`.
:::
@@ -529,7 +532,7 @@ Cela ne supprime pas le modificateur d'invite de conda, vous pouvez exécuter `c
| symbol | | Reflète la valeur de l'option `symbol` |
| style\* | | Reflète la valeur de l'option `style` |
-\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
+\*: This variable can only be used as a part of a style string
### Exemple
@@ -542,7 +545,7 @@ format = "[$symbol$environment](dimmed green) "
## Crystal
-Le module `crystal` affiche la version actuellement installée de Crystal. By default the module will be shown if any of the following conditions are met:
+The `crystal` module shows the currently installed version of Crystal. By default the module will be shown if any of the following conditions are met:
- Le répertoire courant contient un fichier `shard.yml`
- Le répertoire courant contient un fichier `.cr`
@@ -567,7 +570,7 @@ Le module `crystal` affiche la version actuellement installée de Crystal. By de
| symbol | | Reflète la valeur de l'option `symbol` |
| style\* | | Reflète la valeur de l'option `style` |
-\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
+\*: This variable can only be used as a part of a style string
### Exemple
@@ -580,7 +583,7 @@ format = "via [✨ $version](bold blue) "
## Dart
-Le module `dart` affiche la version courante installée de Dart. By default the module will be shown if any of the following conditions are met:
+The `dart` module shows the currently installed version of Dart. By default the module will be shown if any of the following conditions are met:
- Le répertoire courant contient un fichier `.dart`
- Le répertoire courant contient un répertoire `.dart_tool`
@@ -606,7 +609,7 @@ Le module `dart` affiche la version courante installée de Dart. By default the
| symbol | | Reflète la valeur de l'option `symbol` |
| style\* | | Reflète la valeur de l'option `style` |
-\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
+\*: This variable can only be used as a part of a style string
### Exemple
@@ -619,11 +622,11 @@ format = "via [🔰 $version](bold red) "
## Dossier
-Le mode `directory` montre le chemin de votre dossier actuel, tronqué aux 3 dossiers parents. Votre répertoire sera également tronqué à la racine du repo git dans lequel vous vous trouvez actuellement.
+The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in.
-Quand vous utilisez le style pwd de fish, au lieu de cacher le chemin qui est tronqué, vous verrez un nom raccourci de chaque dossier basé sur le nombre établi pour l'option.
+When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option.
-Par exemple, donné `~/Dev/Nix/nixpkgs/pkgs` où `nixpkgs` est la racine du repo, et l'option définie à `1`. Vous verrez maintenant `~/D/N/nixpkgs/pkgs`, alors que vous auriez vu `nixpkgs/pkgs` avant.
+For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`.
### Options
@@ -640,7 +643,7 @@ Par exemple, donné `~/Dev/Nix/nixpkgs/pkgs` où `nixpkgs` est la racine du repo
| `home_symbol` | `"~"` | The symbol indicating home directory. |
Ce module possède quelques options de configuration avancées qui contrôlent l'affichage du répertoire.
+This module has a few advanced configuration options that control how the directory is displayed.
| Options avancées | Défaut | Description |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -667,7 +670,7 @@ Par exemple, donné `~/Dev/Nix/nixpkgs/pkgs` où `nixpkgs` est la racine du repo
| path | `"D:/Projects"` | Le chemin du répertoire courant |
| style\* | `"black bold dimmed"` | Reflète la valeur de l'option `style` |
-\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
+\*: This variable can only be used as a part of a style string
### Exemple
@@ -704,7 +707,7 @@ The `docker_context` module shows the currently active [Docker context](https://
| symbol | | Reflète la valeur de l'option `symbol` |
| style\* | | Reflète la valeur de l'option `style` |
-\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
+\*: This variable can only be used as a part of a style string
### Exemple
@@ -759,7 +762,7 @@ The module will also show the Target Framework Moniker (
+ alt="Statut du workflow actions GitHub" + /> + alt="Version Crates.io" + /> + alt="Discuter sur Discord" + /> + alt="Suivez @StarshipPrompt sur Twitter" + />
@@ -42,63 +47,72 @@ > + alt="English" + /> + alt="日本語" + /> + alt="繁體中文" + /> + alt="Русский" + /> + alt="Deutsch" + /> + alt="简体中文" + /> + alt="Espagnol" + /> + alt="Français" + /> + alt="Tiếng Việt" + />
@@ -107,7 +121,8 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif" alt="Starship avec iTerm2 et le thème Snazzy" width="50%" - align="right" /> + align="right" + /> **L'invite minimaliste, ultra-rapide et personnalisable à l'infini pour n'importe quel shell !** @@ -229,6 +244,17 @@ eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + ## 🤝Contribution Nous sommes toujours à la recherche de contributeurs de **tous niveaux de compétence**! Si vous cherchez à faciliter votre entrée dans le projet, essayez un [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). diff --git a/docs/fr-FR/installing/README.md b/docs/fr-FR/installing/README.md index f8c99532..0426c742 100644 --- a/docs/fr-FR/installing/README.md +++ b/docs/fr-FR/installing/README.md @@ -8,13 +8,29 @@ Pour installer starship, vous devez faire deux choses: Pour la plupart des utilisateurs, les instructions sur [la page principale](/guide/#🚀-installation) fonctionneront bien. Cependant, pour certaines plateformes plus spécialisées, des instructions différentes sont nécessaires. Il y a tellement de plates-formes, qu'il aurait été déraisonnable de les faire apparaître dans le README principal, voici donc quelques instructions d'installation supplémentaires pour celles-ci, écrient par la commaunauté. La vôtre n'est-elle pas là ? S'il vous plaît, ajoutez-la ici pour les suivants ! -## [termux](https://termux.com) + +## [Chocolatey](https://chocolatey.org) + ### Pré-requis + +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) + +### Pré-requis + ```sh pkg install getconf ``` ### Installation + ```sh curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin ``` @@ -31,7 +47,29 @@ nix-env -iA nixos.starship #### Déclaration, utilisateur unique, via [home-manager](home-manager) -Ajoutez `pkgs.starship` à votre `home.packages` dans votre fichier `home.nix` puis exécutez +Enable the `programs.starship` module in your `home.nix` file, and add your settings + +```nix +{ + programs.starship = { + enable = true; + enableZshIntegration = 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 @@ -39,18 +77,8 @@ home-manager switch #### Déclaration, au niveau du système, avec NixOS -Ajoutez `pkgs.starship` à `environment.packages` dans votre `configuration.nix`, puis exécutez +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch ``` - -### Modifying Init Scripts - -#### Avec Nix et home manager, en utilisant zsh : - -Ajoutez les éléments suivants à `programs.zsh.initExtra` dans votre fichier `home.nix` puis exécuter - -```sh -home-manager switch -``` diff --git a/docs/fr-FR/presets/README.md b/docs/fr-FR/presets/README.md index c926b285..8fd5fb83 100644 --- a/docs/fr-FR/presets/README.md +++ b/docs/fr-FR/presets/README.md @@ -16,7 +16,7 @@ Cette configuration ne modifie rien sauf les symboles utilisés pour chaque modu ```toml [aws] -symbol = " " +symbol = " " [conda] symbol = " " @@ -84,6 +84,9 @@ symbol = " " [rust] symbol = " " +[scala] +symbol = " " + [swift] symbol = "ﯣ " ``` diff --git a/docs/it-IT/README.md b/docs/it-IT/README.md index 210fe85d..131620da 100644 --- a/docs/it-IT/README.md +++ b/docs/it-IT/README.md @@ -38,7 +38,7 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per Con Shell: ```sh - curl -fsSL https://starship.rs/install.sh | bash + curl -fsSL https://starship.rs/install.sh+ alt="GitHub Actions workflow status" + /> + alt="Versione Crates.io" + /> + alt="Chat su Discord" + /> + alt="Segui @StarshipPrompt su Twitter" + />
@@ -42,63 +47,72 @@ > + alt="Inglese" + /> + alt="日本語" + /> + alt="繁體中文" + /> + alt="Russo" + /> + alt="Tedesco" + /> + alt="简体中文" + /> + alt="Spagnolo" + /> + alt="Francese" + /> + alt="Tiếng Việt" + />
@@ -107,7 +121,8 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif" alt="Starship con iTerm2 e il tema Snazzy" width="50%" - align="right" /> + align="right" + /> **Il prompt minimalista, super veloce e infinitamente personalizzabile per qualsiasi shell!** @@ -229,6 +244,17 @@ eval (starship init elvish) ``` + + #### Tcsh + + Aggiungi quanto segue alla fine di `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + ## 🤝 Contribuire Siamo sempre alla ricerca di collaboratori di **tutti i livelli**! Se stai cercando di entrare facilmente nel progetto, prova un [buon primo problema](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). diff --git a/docs/it-IT/installing/README.md b/docs/it-IT/installing/README.md index 07925d0f..ebc3ef35 100644 --- a/docs/it-IT/installing/README.md +++ b/docs/it-IT/installing/README.md @@ -8,13 +8,29 @@ To install starship, you need to do two things: 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! -## [termux](https://termux.com) + +## [Chocolatey](https://chocolatey.org) + ### Prerequisiti + +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) + +### Prerequisiti + ```sh pkg install getconf ``` ### Installation + ```sh curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin ``` @@ -31,7 +47,29 @@ nix-env -iA nixos.starship #### Declarative, single user, via [home-manager](home-manager) -Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run +Enable the `programs.starship` module in your `home.nix` file, and add your settings + +```nix +{ + programs.starship = { + enable = true; + enableZshIntegration = 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 @@ -39,18 +77,8 @@ home-manager switch #### Declarative, system-wide, with NixOS -Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch ``` - -### Modifying Init Scripts - -#### With Nix and home-manager, using zsh: - -Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run - -```sh -home-manager switch -``` diff --git a/docs/it-IT/presets/README.md b/docs/it-IT/presets/README.md index 4b8ab1e7..dd6bf225 100644 --- a/docs/it-IT/presets/README.md +++ b/docs/it-IT/presets/README.md @@ -16,7 +16,7 @@ Questo preset non cambia nulla tranne i simboli utilizzati per ogni modulo. Se g ```toml [aws] -symbol = " " +symbol = " " [conda] symbol = " " @@ -84,6 +84,9 @@ symbol = " " [rust] symbol = " " +[scala] +symbol = " " + [swift] symbol = "ﯣ " ``` diff --git a/docs/ja-JP/README.md b/docs/ja-JP/README.md index b72c9a54..652266bc 100644 --- a/docs/ja-JP/README.md +++ b/docs/ja-JP/README.md @@ -94,7 +94,7 @@ description: Starship はミニマルで、非常に高速で、カスタマイ #### 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. + 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. 通常、パスは `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` または -Nix 上では `~/.config/powershell/Microsoft.PowerShell_profile.ps1` です。 ```sh Invoke-Expression (&starship init powershell) @@ -115,7 +115,7 @@ description: Starship はミニマルで、非常に高速で、カスタマイ ::: warning Only elvish v0.15 or higher is supported. ::: - Add the following to the end of `~/.elvish/rc.elv`: + `~/.elvish/rc.elv` の最後に以下を追記してください。 ```sh # ~/.elvish/rc.elv @@ -123,3 +123,14 @@ description: Starship はミニマルで、非常に高速で、カスタマイ eval (starship init elvish) ``` + + #### Tcsh + + `~/.tcshrc` の最後に以下を追加します: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + diff --git a/docs/ja-JP/advanced-config/README.md b/docs/ja-JP/advanced-config/README.md index b2d47a9c..267220a9 100644 --- a/docs/ja-JP/advanced-config/README.md +++ b/docs/ja-JP/advanced-config/README.md @@ -82,7 +82,7 @@ starship_precmd_user_func="set_win_title" ここで、 `デフォルトでは、システムスワップの合計がゼロ以外の場合、スワップ使用量が表示されます。
+By default the swap usage is displayed if the total system swap is non-zero. -::: tip
+::: tip -このモジュールはデフォルトで無効になっています。
-有効にするには、設定ファイルでdisabled`を`false`に設定します。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -1611,7 +1619,7 @@ style = "bold dimmed green"
## Mercurial ブランチ
-` hg_branch `モジュールは、現在のディレクトリにあるリポジトリのアクティブなブランチを示します。
+The `hg_branch` module shows the active branch of the repo in your current directory.
### オプション
@@ -1632,7 +1640,7 @@ style = "bold dimmed green"
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -1674,7 +1682,7 @@ The `nim` module shows the currently installed version of Nim. By default the mo
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -1688,7 +1696,7 @@ symbol = "🎣 "
## Nix-shell
-`nix_shell`モジュールは、nix-shell環境を示しています。 このモジュールは、nixシェル環境内にあるときに表示されます。
+The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
### オプション
@@ -1710,7 +1718,7 @@ symbol = "🎣 "
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -1726,7 +1734,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
## NodeJS
-`nodejs`モジュールは、現在インストールされているNodeJSのバージョンを示します。 By default the module will be shown if any of the following conditions are met:
+The `nodejs` module shows the currently installed version of NodeJS. By default the module will be shown if any of the following conditions are met:
- カレントディレクトリに`package.json`ファイルが含まれている
- The current directory contains a `.node-version` file
@@ -1739,7 +1747,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
-| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
+| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. |
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
@@ -1755,7 +1763,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -1797,7 +1805,7 @@ The `ocaml` module shows the currently installed version of OCaml. By default th
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -1830,7 +1838,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -1845,7 +1853,7 @@ symbol = "☁️ "
## パッケージのバージョン
-`package`モジュールは、現在のディレクトリがパッケージのリポジトリである場合に表示され、現在のバージョンが表示されます。 The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
+The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
- **npm** – `npm`パッケージバージョンは、現在のディレクトリにある`package.json`から抽出されます
- **cargo** – `cargo`パッケージバージョンは、現在のディレクトリにある`Cargo.toml`から抽出されます。
@@ -1878,7 +1886,7 @@ symbol = "☁️ "
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -1930,7 +1938,7 @@ format = "via [🦪 $version]($style) "
## PHP
-`php`モジュールは、現在インストールされているPHPのバージョンを示します。 By default the module will be shown if any of the following conditions are met:
+The `php` module shows the currently installed version of PHP. By default the module will be shown if any of the following conditions are met:
- カレントディレクトリに`composer.json`ファイルが含まれている
- The current directory contains a `.php-version` file
@@ -1956,7 +1964,7 @@ format = "via [🦪 $version]($style) "
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -1994,7 +2002,7 @@ The `purescript` module shows the currently installed version of PureScript vers
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -2007,7 +2015,7 @@ format = "via [$symbol$version](bold white)"
## Python
-`python` モジュールは現在インストールされているPythonのバージョンと アクティブ化されている場合は現在のPython仮想環境を表示します。
+The `python` module shows the currently installed version of Python and the current Python virtual environment if one is activated.
If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`.
@@ -2085,7 +2093,7 @@ detect_extensions = []
## Ruby
-By default the `ruby` module shows the currently installed version of Ruby. 次の条件のいずれかが満たされると、モジュールが表示されます。
+By default the `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met:
- カレントディレクトリに`Gemfile`ファイルが含まれている
- The current directory contains a `.ruby-version` file
@@ -2111,7 +2119,7 @@ By default the `ruby` module shows the currently installed version of Ruby. 次
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -2124,7 +2132,7 @@ symbol = "🔺 "
## Rust
-By default the `rust` module shows the currently installed version of Rust. 次の条件のいずれかが満たされると、モジュールが表示されます。
+By default the `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met:
- カレントディレクトリに`Cargo.toml`ファイルが含まれている
- カレントディレクトリに`.rs`の拡張子のファイルが含まれている
@@ -2149,7 +2157,7 @@ By default the `rust` module shows the currently installed version of Rust. 次
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -2160,13 +2168,55 @@ By default the `rust` module shows the currently installed version of Rust. 次
format = "via [⚙️ $version](red bold)"
```
+
+## Scala
+
+The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met:
+
+- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file
+- The current directory contains a file with the `.scala` or `.sbt` extension
+- The current directory contains a directory named `.metals`
+
+### オプション
+
+
+| オプション | デフォルト | 説明 |
+| ------------------- | ---------------------------------------- | ------------------------------------------------- |
+| `format` | `"via [${symbol}(${version} )]($style)"` | moduleのフォーマットです。 |
+| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
+| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
+| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. |
+| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. |
+| `style` | `"red dimmed"` | モジュールのスタイルです。 |
+| `disabled` | `false` | Disables the `scala` module. |
+
+### 変数
+
+| 変数 | 設定例 | 説明 |
+| --------- | -------- | ---------------------- |
+| version | `2.13.5` | The version of `scala` |
+| symbol | | オプション `記号` の値をミラーする |
+| style\* | | オプション `style` の値をミラーする |
+
+\*: This variable can only be used as a part of a style string
+
+### 設定例
+
+```toml
+# ~/.config/starship.toml
+
+[scala]
+symbol = "🌟 "
+```
+
+
## Shell
The `shell` module shows an indicator for currently used shell.
::: tip
-このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -2180,6 +2230,7 @@ The `shell` module shows an indicator for currently used shell.
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
| `ion_indicator` | `ion` | A format string used to represent ion. |
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
+| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `format` | `$indicator` | moduleのフォーマットです。 |
| `disabled` | `true` | Disables the `shell` module. |
@@ -2222,7 +2273,7 @@ The `shlvl` module shows the current SHLVL ("shell level") environment variable,
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -2256,7 +2307,7 @@ The `singularity` module shows the current singularity image, if inside a contai
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -2273,7 +2324,7 @@ The `status` module displays the exit code of the previous command. The module w
::: tip
-このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -2307,7 +2358,7 @@ The `status` module displays the exit code of the previous command. The module w
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -2326,7 +2377,7 @@ disabled = false
## Swift
-By default the `swift` module shows the currently installed version of Swift. 次の条件のいずれかが満たされると、モジュールが表示されます。
+By default the `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met:
- The current directory contains a `Package.swift` file
- The current directory contains a file with the `.swift` extension
@@ -2351,7 +2402,7 @@ By default the `swift` module shows the currently installed version of Swift.
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -2374,7 +2425,7 @@ By default the terraform version is not shown, since this is slow for current ve
By default the module will be shown if any of the following conditions are met:
-- カレントディレクトリに`.terraform`フォルダが含まれている
+- The current directory contains a `.terraform` folder
- Current directory contains a file with the `.tf` or `.hcl` extensions
### オプション
@@ -2398,7 +2449,7 @@ By default the module will be shown if any of the following conditions are met:
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -2426,7 +2477,7 @@ The `time` module shows the current **local** time. The `format` configuration v
::: tip
-このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -2451,7 +2502,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
| time | `13:08:10` | The current time. |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -2468,12 +2519,12 @@ time_range = "10:00:00-14:00:00"
## Username
-The `username` module shows active user's username. 次の条件のいずれかが満たされると、モジュールが表示されます。
+The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
-- カレントユーザーがroot
-- カレントユーザーが、ログインしているユーザーとは異なる
-- ユーザーがSSHセッションとして接続されている
-- `show_always`変数がtrueに設定されている
+- The current user is root
+- The current user isn't the same as the one that is logged in
+- The user is currently connected as an SSH session
+- The variable `show_always` is set to true
::: tip
@@ -2537,7 +2588,7 @@ The `vagrant` module shows the currently installed version of Vagrant. By defaul
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -2550,7 +2601,7 @@ format = "via [⍱ $version](bold white) "
## Zig
-By default the the `zig` module shows the currently installed version of Zig. 次の条件のいずれかが満たされると、モジュールが表示されます。
+By default the the `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met:
- The current directory contains a `.zig` file
@@ -2574,7 +2625,7 @@ By default the the `zig` module shows the currently installed version of Zig.
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
### 設定例
@@ -2638,7 +2689,7 @@ The order in which custom modules are shown can be individually set by including
| symbol | オプション `記号` の値をミラーする |
| style\* | オプション `style` の値をミラーする |
-\*: この変数はスタイル文字列の一部としてのみ使用できます
+\*: This variable can only be used as a part of a style string
#### Custom command shell
diff --git a/docs/ja-JP/faq/README.md b/docs/ja-JP/faq/README.md
index 72403331..aafcc372 100644
--- a/docs/ja-JP/faq/README.md
+++ b/docs/ja-JP/faq/README.md
@@ -10,22 +10,22 @@
- **設定**: [matchaiのDotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
- **プロンプト**: [Starship](https://starship.rs/)
-## How do I get command completion as shown in the demo GIF?
+## デモの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).
+補完サポート、または自動補完は選択したシェルによって提供されます。 デモ中では、デフォルトの[Fish Shell](https://fishshell.com/)によって補完されています。 Z Shell (zsh) を利用しているのであれば、[zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions)を照参してください。
-## Do top level `format` and `
LC_ALL`がUTF-8値でない場合、[変更する必要があります](https://www.tecmint.com/set-system-locales-in-linux/)。
-- 絵文字フォントがインストールされています。 ほとんどのシステムにはデフォルトで絵文字フォントが付属していますが、 一部(特にArch Linux) はそうではありません。 通常、システムの パッケージマネージャーからインストールすることができます--[noto emoji](https://www.google.com/get/noto/help/emoji/)は人気な選択肢です。
-- [Nerd Font](https://www.nerdfonts.com/)を使用しています。
+## 私のプロンプトで記号のグリフがないのはなぜですか?
-システムをテストするには、ターミナルで次のコマンドを実行します。
+よくある原因はシステム上での設定ミスです。 いくつかのLinuxディストリビューションの初期設定にフォントサポートがありません。 次のことを確認してください。
+
+- ロケールが、`de_DE.UTF-8`や` ja_JP.UTF-8`などのUTF-8に設定されている。 `LC_ALL`がUTF-8でない場合、[変更する必要があります](https://www.tecmint.com/set-system-locales-in-linux/)。
+- 絵文字フォントがインストールされている。 ほとんどのシステムにはデフォルトで絵文字フォントが付属していますが、 一部 (特にArch Linux) はそうではありません。 通常、システムの パッケージマネージャーからインストールすることができます。--[noto emoji](https://www.google.com/get/noto/help/emoji/)は一般的な選択肢です。
+- [Nerd Font](https://www.nerdfonts.com/)を使用している。
+
+ターミナルで以下のコマンドを実行することでテストできます。
```sh
echo -e "\xf0\x9f\x90\x8d"
echo -e "\xee\x82\xa0"
```
-1行目は[snake emoji](https://emojipedia.org/snake/)を生成し、2行目は[powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs)を生成するはずです。
+一行目は[蛇の絵文字](https://emojipedia.org/snake/)、二行目は[powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs)が表示されるはずです。
-いずれかのシンボルが正しく表示されない場合でも、システムの設定が間違っています。 残念ながら、フォント設定を正しくするのは難しい場合があります。 Discordのユーザーがお役に立てるかもしれません。 両方の記号が正しく表示されているにもかかわらず、まだStarshipに表示されていない場合は、[バグ報告をしてください!](https://github.com/starship/starship/issues/new/choose)
+もし、どちらの記号とも正しく表示されない場合は、システムの設定が間違っています。 不幸にも、正しくフォントを設定するのは難しいものです。 Discordのユーザーが助けてくれるかもしれません! もし記号が正しく表示されているのにもかかわらず、Starshipが正しく表示されていない場合は、[バグの報告](https://github.com/starship/starship/issues/new/choose)をお願いします。
-## Starshipをアンインストールするにはどうすればいいですか?
+## Starshipをアンインストールしたい
-Starshipは、最初の場所にインストールするのと同じくらい簡単にアンインストールできます。
+Starshipのアンインストールはインストールと同じぐらい簡単です。
-1. Starshipを初期化するために使用されるシェル設定の行を削除します(例:`~/.bashrc`)。
+1. Starshipを初期化するために使用した、シェルの設定行を削除します (例:`~/.bashrc`)。
1. Starshipのバイナリを削除します。
-Starship がパッケージマネージャを使用してインストールされている場合は、アンインストール手順については、そのドキュメントを参照してください。
+パッケージマネージャーを使用してStarshipをインストールした場合は、パッケージマネージャーのアンインストールガイドを参照してください。
-Starship が `curl | bash` スクリプトを使用してインストールされた場合、次のコマンドはバイナリを削除します:
+`curl | bash` スクリプトを使用してStarshipをインストールした場合は、以下のコマンドでバイナリを削除してください。
```sh
-# starshipバイナリを見つけて削除します
+# starshipバイナリを見つけて削除
rm "$(which starship)"
```
diff --git a/docs/ja-JP/guide/README.md b/docs/ja-JP/guide/README.md
index 7643e056..751c8f54 100644
--- a/docs/ja-JP/guide/README.md
+++ b/docs/ja-JP/guide/README.md
@@ -2,18 +2,21 @@
+ alt="Starship – Cross-shell prompt"
+ />
+ alt="GitHub Actions workflow status" + /> + alt="Crates.io version" + /> + alt="Chat on Discord" + /> + alt="Follow @StarshipPrompt on Twitter" + />
@@ -42,63 +47,72 @@ > + alt="English" + /> + alt="日本語" + /> + alt="繁體中文" + /> + alt="Русский" + /> + alt="Deutsch" + /> + alt="简体中文" + /> + alt="Español" + /> + alt="Français" + /> + alt="Tiếng Việt" + />
@@ -107,7 +121,8 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif" alt="Starship with iTerm2 and the Snazzy theme" width="50%" - align="right" /> + align="right" + /> **シェル用の最小限の、非常に高速で、無限にカスタマイズ可能なプロンプトです!** @@ -132,7 +147,7 @@ ### 入門 -**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/). +**注意**: さまざまなプラットフォームが急増しているため、ここでは対応プラットフォームの一部だけを挙げています。 自分が使っているシェルがありませんか? [extra platform instructions](https://starship.rs/installing/) を確認してください。 1. **Starship** のバイナリをインストール @@ -150,7 +165,7 @@ #### パッケージマネージャー経由でインストール - ##### Example: [Homebrew](https://brew.sh/): + ##### 例: [Homebrew の場合](https://brew.sh/): ```sh brew install starship @@ -201,7 +216,7 @@ #### 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. + `Microsoft.PowerShell_profile.ps1` の最後に以下を追記してください。 PowerShell 上で `$PROFILE` 変数を問い合わせると、ファイルの場所を確認できます。 通常、パスは `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` または -Nix 上では `~/.config/powershell/Microsoft.PowerShell_profile.ps1` です。 ```powershell Invoke-Expression (&starship init powershell) @@ -221,7 +236,7 @@ #### Elvish - **Warning** Only elvish v0.15 or higher is supported. Add the following to the end of `~/.elvish/rc.elv`: + **警告** elvish v0.15 以上のみがサポートされています。 `~/.elvish/rc.elv` の最後に以下を追記してください。 ```sh # ~/.elvish/rc.elv @@ -229,11 +244,22 @@ eval (starship init elvish) ``` + + #### Tcsh + + `~/.tcshrc` の最後に以下を追加します: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + ## 🤝 貢献 私たちは常に**すべてのスキルレベル**の貢献者を探しています! もし簡単にプロジェクトへ参加する方法をお探しなら、 [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/). +あなたが英語以外の言語に堪能な場合、ドキュメントの翻訳と更新に協力していただけると嬉しいです。 協力してくれる場合、翻訳は [Starship Crowdin](https://translate.starship.rs/) から貢献できます。 もしあなたが Starship への貢献に興味がある場合は、我々の[貢献ガイド](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)をご覧ください。 また、気軽に我々の[Discord サーバー](https://discord.gg/8Jzqu3T)へ顔を出してください。 👋 diff --git a/docs/ja-JP/installing/README.md b/docs/ja-JP/installing/README.md index c8487ef4..df63b3c9 100644 --- a/docs/ja-JP/installing/README.md +++ b/docs/ja-JP/installing/README.md @@ -8,13 +8,29 @@ To install starship, you need to do two things: 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! -## [termux](https://termux.com) + +## [Chocolatey](https://chocolatey.org) + ### 必要なもの + +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) + +### 必要なもの + ```sh pkg install getconf ``` ### Installation + ```sh curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin ``` @@ -31,7 +47,29 @@ nix-env -iA nixos.starship #### Declarative, single user, via [home-manager](home-manager) -Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run +Enable the `programs.starship` module in your `home.nix` file, and add your settings + +```nix +{ + programs.starship = { + enable = true; + enableZshIntegration = 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 @@ -39,18 +77,8 @@ home-manager switch #### Declarative, system-wide, with NixOS -Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch ``` - -### Modifying Init Scripts - -#### With Nix and home-manager, using zsh: - -Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run - -```sh -home-manager switch -``` diff --git a/docs/ja-JP/presets/README.md b/docs/ja-JP/presets/README.md index 4861c7f9..fe55b21c 100644 --- a/docs/ja-JP/presets/README.md +++ b/docs/ja-JP/presets/README.md @@ -16,7 +16,7 @@ ```toml [aws] -symbol = " " +symbol = " " [conda] symbol = " " @@ -84,6 +84,9 @@ symbol = " " [rust] symbol = " " +[scala] +symbol = " " + [swift] symbol = "ﯣ " ``` diff --git a/docs/ko-KR/README.md b/docs/ko-KR/README.md index ee4bc3ee..e7ba257f 100644 --- a/docs/ko-KR/README.md +++ b/docs/ko-KR/README.md @@ -28,7 +28,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p+ alt="깃헙 액션 워크풀로 상태" + /> + alt="Crates.io 버전" + /> + alt="디스코드에 채팅을 하세요" + /> + alt="트위터에서 @StarshipPrompt를 팔로우 하세요" + />
@@ -42,63 +47,72 @@ > + alt="English" + /> + alt="日本語" + /> + alt="繁體中文" + /> + alt="Русский" + /> + alt="Deutsch" + /> + alt="简体中文" + /> + alt="Español" + /> + alt="Français" + /> + alt="Tiếng Việt" + />
@@ -107,7 +121,8 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif" alt="Starship with iTerm2 and the Snazzy theme" width="50%" - align="right" /> + align="right" + /> **The minimal, blazing-fast, and infinitely customizable prompt for any shell!** @@ -201,7 +216,7 @@ #### 파워셀 - 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. + `Microsoft.PowerShell_profile.ps1`의 끝부분에 아래 내용을 추가. 해당 설정파일은 파워쉘에서 `$PROFILE` 변수 확인을 통해 확인 가능. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. ```powershell Invoke-Expression (&starship init powershell) @@ -229,6 +244,17 @@ eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + ## 🤝 기여 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). diff --git a/docs/ko-KR/installing/README.md b/docs/ko-KR/installing/README.md index 52c0ac4c..73b998f7 100644 --- a/docs/ko-KR/installing/README.md +++ b/docs/ko-KR/installing/README.md @@ -8,13 +8,29 @@ To install starship, you need to do two things: 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! -## [termux](https://termux.com) + +## [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 -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin ``` @@ -31,7 +47,29 @@ nix-env -iA nixos.starship #### Declarative, single user, via [home-manager](home-manager) -Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run +Enable the `programs.starship` module in your `home.nix` file, and add your settings + +```nix +{ + programs.starship = { + enable = true; + enableZshIntegration = 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 @@ -39,18 +77,8 @@ home-manager switch #### Declarative, system-wide, with NixOS -Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch ``` - -### Modifying Init Scripts - -#### With Nix and home-manager, using zsh: - -Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run - -```sh -home-manager switch -``` diff --git a/docs/ko-KR/presets/README.md b/docs/ko-KR/presets/README.md index 746364fa..c4b2f7ca 100644 --- a/docs/ko-KR/presets/README.md +++ b/docs/ko-KR/presets/README.md @@ -16,7 +16,7 @@ This preset doesn't change anything except for the symbols used for each module. ```toml [aws] -symbol = " " +symbol = " " [conda] symbol = " " @@ -84,6 +84,9 @@ symbol = " " [rust] symbol = " " +[scala] +symbol = " " + [swift] symbol = "ﯣ " ``` diff --git a/docs/nl-NL/README.md b/docs/nl-NL/README.md index 5887681e..eb5b35ff 100644 --- a/docs/nl-NL/README.md +++ b/docs/nl-NL/README.md @@ -123,3 +123,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + diff --git a/docs/nl-NL/config/README.md b/docs/nl-NL/config/README.md index 6484c7d5..3a9111cd 100644 --- a/docs/nl-NL/config/README.md +++ b/docs/nl-NL/config/README.md @@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file: ```toml -# Don't print a new line at the start of the prompt -add_newline = false +# Inserts a blank line between shell prompts +add_newline = true # Replace the "❯" symbol in the prompt with "➜" [character] # The name of the module we are configuring is "character" @@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri For example: - `[on](red bold)` will print a string `on` with bold text colored red. -- `[⬢ $version](bold green)` will print a symbol `⬢` followed by the content of variable `version`, with bold text colored green. +- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green. - `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green. #### Style Strings @@ -146,7 +146,7 @@ This is the list of prompt-wide configuration options. | -------------- | ------------------------------ | ----------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configure the format of the prompt. | | `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | -| `add_newline` | `true` | Add a new line before the start of the prompt. | +| `add_newline` | `true` | Inserts blank line between shell prompts. | ### Example @@ -162,7 +162,7 @@ format = """ # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 -# Disable the newline at the start of the prompt +# Disable the blank line at the start of the prompt add_newline = false ``` @@ -207,6 +207,7 @@ $purescript\ $python\ $ruby\ $rust\ +$scala\ $swift\ $terraform\ $vagrant\ @@ -237,15 +238,17 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var. +When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. + ### Options -| Option | Default | Description | -| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | -| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | -| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `AWS` module. | +| Option | Default | Description | +| ---------------- | --------------------------------------------------- | --------------------------------------------------------------- | +| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | +| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `AWS` module. | ### Variables @@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re # ~/.config/starship.toml [aws] -format = 'on [$symbol$profile(\($region\))]($style) ' +format = 'on [$symbol($profile )(\($region\) )]($style)' style = "bold blue" symbol = "🅰 " [aws.region_aliases] @@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th | Option | Default | Description | | ------------------- | -------------------------------------- | -------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `symbol` | `"△ "` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this moudle | | `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | @@ -1343,6 +1346,12 @@ symbol = "🌟 " The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. +::: warning + +This module is not supported on tcsh. + +::: + ### Options | Option | Default | Description | @@ -1737,7 +1746,7 @@ The `nodejs` module shows the currently installed version of NodeJS. By default | Option | Default | Description | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. | +| `symbol` | `" "` | A format string representing the symbol of NodeJS. | | `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. | | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | @@ -2158,6 +2167,48 @@ By default the `rust` module shows the currently installed version of Rust. The format = "via [⚙️ $version](red bold)" ``` + +## Scala + +The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file +- The current directory contains a file with the `.scala` or `.sbt` extension +- The current directory contains a directory named `.metals` + +### Options + + +| Option | Default | Description | +| ------------------- | ---------------------------------------- | ------------------------------------------------- | +| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | +| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | +| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | +| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | +| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | +| `style` | `"red dimmed"` | The style for the module. | +| `disabled` | `false` | Disables the `scala` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `2.13.5` | The version of `scala` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[scala] +symbol = "🌟 " +``` + + ## Shell The `shell` module shows an indicator for currently used shell. @@ -2178,6 +2229,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `powershell_indicator` | `psh` | A format string used to represent powershell. | | `ion_indicator` | `ion` | A format string used to represent ion. | | `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | | `format` | `$indicator` | The format for the module. | | `disabled` | `true` | Disables the `shell` module. | diff --git a/docs/nl-NL/faq/README.md b/docs/nl-NL/faq/README.md index 9bb23bf9..d3c6d238 100644 --- a/docs/nl-NL/faq/README.md +++ b/docs/nl-NL/faq/README.md @@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l) 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. +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: @@ -56,6 +56,10 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship) curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl ``` +## 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. + ## 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: diff --git a/docs/nl-NL/guide/README.md b/docs/nl-NL/guide/README.md index 445e3027..fd107ff3 100644 --- a/docs/nl-NL/guide/README.md +++ b/docs/nl-NL/guide/README.md @@ -2,18 +2,21 @@ + alt="Starship – Cross-shell prompt" + />+ alt="GitHub Actions workflow status" + /> + alt="Crates.io version" + /> + alt="Chat on Discord" + /> + alt="Follow @StarshipPrompt on Twitter" + />
@@ -42,63 +47,72 @@ > + alt="English" + /> + alt="日本語" + /> + alt="繁體中文" + /> + alt="Русский" + /> + alt="Deutsch" + /> + alt="简体中文" + /> + alt="Español" + /> + alt="Français" + /> + alt="Tiếng Việt" + />
@@ -107,7 +121,8 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif" alt="Starship with iTerm2 and the Snazzy theme" width="50%" - align="right" /> + align="right" + /> **The minimal, blazing-fast, and infinitely customizable prompt for any shell!** @@ -229,6 +244,17 @@ eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + ## 🤝 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). diff --git a/docs/nl-NL/installing/README.md b/docs/nl-NL/installing/README.md index 52c0ac4c..73b998f7 100644 --- a/docs/nl-NL/installing/README.md +++ b/docs/nl-NL/installing/README.md @@ -8,13 +8,29 @@ To install starship, you need to do two things: 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! -## [termux](https://termux.com) + +## [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 -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin ``` @@ -31,7 +47,29 @@ nix-env -iA nixos.starship #### Declarative, single user, via [home-manager](home-manager) -Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run +Enable the `programs.starship` module in your `home.nix` file, and add your settings + +```nix +{ + programs.starship = { + enable = true; + enableZshIntegration = 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 @@ -39,18 +77,8 @@ home-manager switch #### Declarative, system-wide, with NixOS -Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch ``` - -### Modifying Init Scripts - -#### With Nix and home-manager, using zsh: - -Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run - -```sh -home-manager switch -``` diff --git a/docs/nl-NL/presets/README.md b/docs/nl-NL/presets/README.md index 746364fa..c4b2f7ca 100644 --- a/docs/nl-NL/presets/README.md +++ b/docs/nl-NL/presets/README.md @@ -16,7 +16,7 @@ This preset doesn't change anything except for the symbols used for each module. ```toml [aws] -symbol = " " +symbol = " " [conda] symbol = " " @@ -84,6 +84,9 @@ symbol = " " [rust] symbol = " " +[scala] +symbol = " " + [swift] symbol = "ﯣ " ``` diff --git a/docs/pl-PL/README.md b/docs/pl-PL/README.md index 5887681e..eb5b35ff 100644 --- a/docs/pl-PL/README.md +++ b/docs/pl-PL/README.md @@ -123,3 +123,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + diff --git a/docs/pl-PL/config/README.md b/docs/pl-PL/config/README.md index 6484c7d5..3a9111cd 100644 --- a/docs/pl-PL/config/README.md +++ b/docs/pl-PL/config/README.md @@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file: ```toml -# Don't print a new line at the start of the prompt -add_newline = false +# Inserts a blank line between shell prompts +add_newline = true # Replace the "❯" symbol in the prompt with "➜" [character] # The name of the module we are configuring is "character" @@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri For example: - `[on](red bold)` will print a string `on` with bold text colored red. -- `[⬢ $version](bold green)` will print a symbol `⬢` followed by the content of variable `version`, with bold text colored green. +- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green. - `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green. #### Style Strings @@ -146,7 +146,7 @@ This is the list of prompt-wide configuration options. | -------------- | ------------------------------ | ----------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configure the format of the prompt. | | `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | -| `add_newline` | `true` | Add a new line before the start of the prompt. | +| `add_newline` | `true` | Inserts blank line between shell prompts. | ### Example @@ -162,7 +162,7 @@ format = """ # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 -# Disable the newline at the start of the prompt +# Disable the blank line at the start of the prompt add_newline = false ``` @@ -207,6 +207,7 @@ $purescript\ $python\ $ruby\ $rust\ +$scala\ $swift\ $terraform\ $vagrant\ @@ -237,15 +238,17 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var. +When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. + ### Options -| Option | Default | Description | -| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | -| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | -| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `AWS` module. | +| Option | Default | Description | +| ---------------- | --------------------------------------------------- | --------------------------------------------------------------- | +| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | +| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `AWS` module. | ### Variables @@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re # ~/.config/starship.toml [aws] -format = 'on [$symbol$profile(\($region\))]($style) ' +format = 'on [$symbol($profile )(\($region\) )]($style)' style = "bold blue" symbol = "🅰 " [aws.region_aliases] @@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th | Option | Default | Description | | ------------------- | -------------------------------------- | -------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `symbol` | `"△ "` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this moudle | | `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | @@ -1343,6 +1346,12 @@ symbol = "🌟 " The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. +::: warning + +This module is not supported on tcsh. + +::: + ### Options | Option | Default | Description | @@ -1737,7 +1746,7 @@ The `nodejs` module shows the currently installed version of NodeJS. By default | Option | Default | Description | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. | +| `symbol` | `" "` | A format string representing the symbol of NodeJS. | | `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. | | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | @@ -2158,6 +2167,48 @@ By default the `rust` module shows the currently installed version of Rust. The format = "via [⚙️ $version](red bold)" ``` + +## Scala + +The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file +- The current directory contains a file with the `.scala` or `.sbt` extension +- The current directory contains a directory named `.metals` + +### Options + + +| Option | Default | Description | +| ------------------- | ---------------------------------------- | ------------------------------------------------- | +| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | +| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | +| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | +| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | +| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | +| `style` | `"red dimmed"` | The style for the module. | +| `disabled` | `false` | Disables the `scala` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `2.13.5` | The version of `scala` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[scala] +symbol = "🌟 " +``` + + ## Shell The `shell` module shows an indicator for currently used shell. @@ -2178,6 +2229,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `powershell_indicator` | `psh` | A format string used to represent powershell. | | `ion_indicator` | `ion` | A format string used to represent ion. | | `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | | `format` | `$indicator` | The format for the module. | | `disabled` | `true` | Disables the `shell` module. | diff --git a/docs/pl-PL/faq/README.md b/docs/pl-PL/faq/README.md index 9bb23bf9..d3c6d238 100644 --- a/docs/pl-PL/faq/README.md +++ b/docs/pl-PL/faq/README.md @@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l) 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. +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: @@ -56,6 +56,10 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship) curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl ``` +## 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. + ## 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: diff --git a/docs/pl-PL/guide/README.md b/docs/pl-PL/guide/README.md index 445e3027..fd107ff3 100644 --- a/docs/pl-PL/guide/README.md +++ b/docs/pl-PL/guide/README.md @@ -2,18 +2,21 @@ + alt="Starship – Cross-shell prompt" + />+ alt="GitHub Actions workflow status" + /> + alt="Crates.io version" + /> + alt="Chat on Discord" + /> + alt="Follow @StarshipPrompt on Twitter" + />
@@ -42,63 +47,72 @@ > + alt="English" + /> + alt="日本語" + /> + alt="繁體中文" + /> + alt="Русский" + /> + alt="Deutsch" + /> + alt="简体中文" + /> + alt="Español" + /> + alt="Français" + /> + alt="Tiếng Việt" + />
@@ -107,7 +121,8 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif" alt="Starship with iTerm2 and the Snazzy theme" width="50%" - align="right" /> + align="right" + /> **The minimal, blazing-fast, and infinitely customizable prompt for any shell!** @@ -229,6 +244,17 @@ eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + ## 🤝 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). diff --git a/docs/pl-PL/installing/README.md b/docs/pl-PL/installing/README.md index 52c0ac4c..73b998f7 100644 --- a/docs/pl-PL/installing/README.md +++ b/docs/pl-PL/installing/README.md @@ -8,13 +8,29 @@ To install starship, you need to do two things: 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! -## [termux](https://termux.com) + +## [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 -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin ``` @@ -31,7 +47,29 @@ nix-env -iA nixos.starship #### Declarative, single user, via [home-manager](home-manager) -Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run +Enable the `programs.starship` module in your `home.nix` file, and add your settings + +```nix +{ + programs.starship = { + enable = true; + enableZshIntegration = 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 @@ -39,18 +77,8 @@ home-manager switch #### Declarative, system-wide, with NixOS -Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch ``` - -### Modifying Init Scripts - -#### With Nix and home-manager, using zsh: - -Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run - -```sh -home-manager switch -``` diff --git a/docs/pl-PL/presets/README.md b/docs/pl-PL/presets/README.md index 746364fa..c4b2f7ca 100644 --- a/docs/pl-PL/presets/README.md +++ b/docs/pl-PL/presets/README.md @@ -16,7 +16,7 @@ This preset doesn't change anything except for the symbols used for each module. ```toml [aws] -symbol = " " +symbol = " " [conda] symbol = " " @@ -84,6 +84,9 @@ symbol = " " [rust] symbol = " " +[scala] +symbol = " " + [swift] symbol = "ﯣ " ``` diff --git a/docs/pt-BR/README.md b/docs/pt-BR/README.md index 6714e824..db241bf5 100644 --- a/docs/pt-BR/README.md +++ b/docs/pt-BR/README.md @@ -123,3 +123,14 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + diff --git a/docs/pt-BR/config/README.md b/docs/pt-BR/config/README.md index b3f3ae77..cec739eb 100644 --- a/docs/pt-BR/config/README.md +++ b/docs/pt-BR/config/README.md @@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Todas as configurações do starship são feitas neste arquivo [TOML](https://github.com/toml-lang/toml): ```toml -# Don't print a new line at the start of the prompt -add_newline = false +# Inserts a blank line between shell prompts +add_newline = true # Replace the "❯" symbol in the prompt with "➜" [character] # The name of the module we are configuring is "character" @@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri For example: - `[on](red bold)` will print a string `on` with bold text colored red. -- `[⬢ $version](bold green)` will print a symbol `⬢` followed by the content of variable `version`, with bold text colored green. +- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green. - `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green. #### Estilo dos textos @@ -142,11 +142,11 @@ This is the list of prompt-wide configuration options. ### Opções -| Option | Padrão | Descrição | -| -------------- | ------------------------------ | ------------------------------------------------------------- | -| `format` | [link](#default-prompt-format) | Configure the format of the prompt. | -| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | -| `add_newline` | `true` | Adiciona uma nova linha antes que o prompt de comando inicie. | +| Option | Padrão | Descrição | +| -------------- | ------------------------------ | ----------------------------------------------------- | +| `format` | [link](#default-prompt-format) | Configure the format of the prompt. | +| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | +| `add_newline` | `true` | Inserts blank line between shell prompts. | ### Exemplo @@ -162,7 +162,7 @@ format = """ # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 -# Disable the newline at the start of the prompt +# Disable the blank line at the start of the prompt add_newline = false ``` @@ -207,6 +207,7 @@ $purescript\ $python\ $ruby\ $rust\ +$scala\ $swift\ $terraform\ $vagrant\ @@ -237,15 +238,17 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var. +When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. + ### Opções -| Option | Padrão | Descrição | -| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | -| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | -| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | O estilo do módulo. | -| `disabled` | `false` | Disables the `AWS` module. | +| Option | Padrão | Descrição | +| ---------------- | --------------------------------------------------- | --------------------------------------------------------------- | +| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | +| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | +| `style` | `"bold yellow"` | O estilo do módulo. | +| `disabled` | `false` | Disables the `AWS` module. | ### Variables @@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re # ~/.config/starship.toml [aws] -format = 'on [$symbol$profile(\($region\))]($style) ' +format = 'on [$symbol($profile )(\($region\) )]($style)' style = "bold blue" symbol = "🅰 " [aws.region_aliases] @@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th | Option | Padrão | Descrição | | ------------------- | -------------------------------------- | -------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `symbol` | `"△ "` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this moudle | | `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | @@ -455,7 +458,7 @@ The `cmake` module shows the currently installed version of CMake. By default th The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. -::: warning Não utilize o DEBUG-trap no Bash +::: warning Do not hook the DEBUG trap in Bash If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. @@ -1343,6 +1346,12 @@ symbol = "🌟 " The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. +::: warning + +This module is not supported on tcsh. + +::: + ### Opções | Option | Padrão | Descrição | @@ -1737,7 +1746,7 @@ The `nodejs` module shows the currently installed version of NodeJS. By default | Option | Padrão | Descrição | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. | +| `symbol` | `" "` | A format string representing the symbol of NodeJS. | | `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. | | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | @@ -2158,6 +2167,48 @@ By default the `rust` module shows the currently installed version of Rust. The format = "via [⚙️ $version](red bold)" ``` + +## Scala + +The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file +- The current directory contains a file with the `.scala` or `.sbt` extension +- The current directory contains a directory named `.metals` + +### Opções + + +| Option | Padrão | Descrição | +| ------------------- | ---------------------------------------- | ------------------------------------------------- | +| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | +| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | +| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | +| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | +| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | +| `style` | `"red dimmed"` | O estilo do módulo. | +| `disabled` | `false` | Disables the `scala` module. | + +### Variables + +| Variável | Exemplo | Descrição | +| --------- | -------- | ------------------------------------ | +| version | `2.13.5` | The version of `scala` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Exemplo + +```toml +# ~/.config/starship.toml + +[scala] +symbol = "🌟 " +``` + + ## Shell The `shell` module shows an indicator for currently used shell. @@ -2178,6 +2229,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `powershell_indicator` | `psh` | A format string used to represent powershell. | | `ion_indicator` | `ion` | A format string used to represent ion. | | `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | | `format` | `$indicator` | The format for the module. | | `disabled` | `true` | Disables the `shell` module. | diff --git a/docs/pt-BR/faq/README.md b/docs/pt-BR/faq/README.md index 9bb23bf9..d3c6d238 100644 --- a/docs/pt-BR/faq/README.md +++ b/docs/pt-BR/faq/README.md @@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l) 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. +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: @@ -56,6 +56,10 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship) curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl ``` +## 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. + ## 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: diff --git a/docs/pt-BR/guide/README.md b/docs/pt-BR/guide/README.md index 10b243e1..8f27af99 100644 --- a/docs/pt-BR/guide/README.md +++ b/docs/pt-BR/guide/README.md @@ -2,18 +2,21 @@ + alt="Starship – Cross-shell prompt" + />+ alt="Status do workflow Actions do GitHub" + /> + alt="Versão no Crates.io" + /> + alt="Chat no Discord" + /> + alt="Siga o @StarshipPrompt no Twitter" + />
@@ -42,63 +47,72 @@ > + alt="English" + /> + alt="日本語" + /> + alt="繁體中文" + /> + alt="Русский" + /> + alt="Deutsch" + /> + alt="简体中文" + /> + alt="Español" + /> + alt="Français" + /> + alt="Tiếng Việt" + />
@@ -107,7 +121,8 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif" alt="Starship com iTerm2 e o tema Snazzy" width="50%" - align="right" /> + align="right" + /> **O prompt minimalista, extremamente rápido e infinitamente personalizável para qualquer shell!** @@ -229,6 +244,17 @@ eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + ## 🤝 Contribuindo Nós estamos sempre procurando contribuidores de **todos os níveis de conhecimento**! Se você está buscando um caminho mais fácil para começar no projeto, veja essas [boas issues para começar](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). diff --git a/docs/pt-BR/installing/README.md b/docs/pt-BR/installing/README.md index 4eee793c..46fe5891 100644 --- a/docs/pt-BR/installing/README.md +++ b/docs/pt-BR/installing/README.md @@ -8,13 +8,29 @@ To install starship, you need to do two things: 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! -## [termux](https://termux.com) + +## [Chocolatey](https://chocolatey.org) + ### Pré-requisitos + +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) + +### Pré-requisitos + ```sh pkg install getconf ``` ### Installation + ```sh curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin ``` @@ -31,7 +47,29 @@ nix-env -iA nixos.starship #### Declarative, single user, via [home-manager](home-manager) -Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run +Enable the `programs.starship` module in your `home.nix` file, and add your settings + +```nix +{ + programs.starship = { + enable = true; + enableZshIntegration = 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 @@ -39,18 +77,8 @@ home-manager switch #### Declarative, system-wide, with NixOS -Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch ``` - -### Modifying Init Scripts - -#### With Nix and home-manager, using zsh: - -Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run - -```sh -home-manager switch -``` diff --git a/docs/pt-BR/presets/README.md b/docs/pt-BR/presets/README.md index 80a18c3d..2de5bb9b 100644 --- a/docs/pt-BR/presets/README.md +++ b/docs/pt-BR/presets/README.md @@ -16,7 +16,7 @@ Essa predefinição não altera nada exceto os símbolos usados para cada módul ```toml [aws] -symbol = " " +symbol = " " [conda] symbol = " " @@ -84,6 +84,9 @@ symbol = " " [rust] symbol = " " +[scala] +symbol = " " + [swift] symbol = "ﯣ " ``` diff --git a/docs/pt-PT/README.md b/docs/pt-PT/README.md index 5887681e..eb5b35ff 100644 --- a/docs/pt-PT/README.md +++ b/docs/pt-PT/README.md @@ -123,3 +123,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + diff --git a/docs/pt-PT/config/README.md b/docs/pt-PT/config/README.md index 6484c7d5..3a9111cd 100644 --- a/docs/pt-PT/config/README.md +++ b/docs/pt-PT/config/README.md @@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file: ```toml -# Don't print a new line at the start of the prompt -add_newline = false +# Inserts a blank line between shell prompts +add_newline = true # Replace the "❯" symbol in the prompt with "➜" [character] # The name of the module we are configuring is "character" @@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri For example: - `[on](red bold)` will print a string `on` with bold text colored red. -- `[⬢ $version](bold green)` will print a symbol `⬢` followed by the content of variable `version`, with bold text colored green. +- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green. - `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green. #### Style Strings @@ -146,7 +146,7 @@ This is the list of prompt-wide configuration options. | -------------- | ------------------------------ | ----------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configure the format of the prompt. | | `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | -| `add_newline` | `true` | Add a new line before the start of the prompt. | +| `add_newline` | `true` | Inserts blank line between shell prompts. | ### Example @@ -162,7 +162,7 @@ format = """ # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 -# Disable the newline at the start of the prompt +# Disable the blank line at the start of the prompt add_newline = false ``` @@ -207,6 +207,7 @@ $purescript\ $python\ $ruby\ $rust\ +$scala\ $swift\ $terraform\ $vagrant\ @@ -237,15 +238,17 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var. +When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. + ### Options -| Option | Default | Description | -| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | -| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | -| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `AWS` module. | +| Option | Default | Description | +| ---------------- | --------------------------------------------------- | --------------------------------------------------------------- | +| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | +| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `AWS` module. | ### Variables @@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re # ~/.config/starship.toml [aws] -format = 'on [$symbol$profile(\($region\))]($style) ' +format = 'on [$symbol($profile )(\($region\) )]($style)' style = "bold blue" symbol = "🅰 " [aws.region_aliases] @@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th | Option | Default | Description | | ------------------- | -------------------------------------- | -------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `symbol` | `"△ "` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this moudle | | `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | @@ -1343,6 +1346,12 @@ symbol = "🌟 " The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. +::: warning + +This module is not supported on tcsh. + +::: + ### Options | Option | Default | Description | @@ -1737,7 +1746,7 @@ The `nodejs` module shows the currently installed version of NodeJS. By default | Option | Default | Description | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. | +| `symbol` | `" "` | A format string representing the symbol of NodeJS. | | `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. | | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | @@ -2158,6 +2167,48 @@ By default the `rust` module shows the currently installed version of Rust. The format = "via [⚙️ $version](red bold)" ``` + +## Scala + +The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file +- The current directory contains a file with the `.scala` or `.sbt` extension +- The current directory contains a directory named `.metals` + +### Options + + +| Option | Default | Description | +| ------------------- | ---------------------------------------- | ------------------------------------------------- | +| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | +| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | +| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | +| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | +| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | +| `style` | `"red dimmed"` | The style for the module. | +| `disabled` | `false` | Disables the `scala` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `2.13.5` | The version of `scala` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[scala] +symbol = "🌟 " +``` + + ## Shell The `shell` module shows an indicator for currently used shell. @@ -2178,6 +2229,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `powershell_indicator` | `psh` | A format string used to represent powershell. | | `ion_indicator` | `ion` | A format string used to represent ion. | | `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | | `format` | `$indicator` | The format for the module. | | `disabled` | `true` | Disables the `shell` module. | diff --git a/docs/pt-PT/faq/README.md b/docs/pt-PT/faq/README.md index 9bb23bf9..d3c6d238 100644 --- a/docs/pt-PT/faq/README.md +++ b/docs/pt-PT/faq/README.md @@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l) 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. +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: @@ -56,6 +56,10 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship) curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl ``` +## 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. + ## 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: diff --git a/docs/pt-PT/guide/README.md b/docs/pt-PT/guide/README.md index 445e3027..fd107ff3 100644 --- a/docs/pt-PT/guide/README.md +++ b/docs/pt-PT/guide/README.md @@ -2,18 +2,21 @@ + alt="Starship – Cross-shell prompt" + />+ alt="GitHub Actions workflow status" + /> + alt="Crates.io version" + /> + alt="Chat on Discord" + /> + alt="Follow @StarshipPrompt on Twitter" + />
@@ -42,63 +47,72 @@ > + alt="English" + /> + alt="日本語" + /> + alt="繁體中文" + /> + alt="Русский" + /> + alt="Deutsch" + /> + alt="简体中文" + /> + alt="Español" + /> + alt="Français" + /> + alt="Tiếng Việt" + />
@@ -107,7 +121,8 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif" alt="Starship with iTerm2 and the Snazzy theme" width="50%" - align="right" /> + align="right" + /> **The minimal, blazing-fast, and infinitely customizable prompt for any shell!** @@ -229,6 +244,17 @@ eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + ## 🤝 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). diff --git a/docs/pt-PT/installing/README.md b/docs/pt-PT/installing/README.md index 52c0ac4c..73b998f7 100644 --- a/docs/pt-PT/installing/README.md +++ b/docs/pt-PT/installing/README.md @@ -8,13 +8,29 @@ To install starship, you need to do two things: 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! -## [termux](https://termux.com) + +## [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 -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin ``` @@ -31,7 +47,29 @@ nix-env -iA nixos.starship #### Declarative, single user, via [home-manager](home-manager) -Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run +Enable the `programs.starship` module in your `home.nix` file, and add your settings + +```nix +{ + programs.starship = { + enable = true; + enableZshIntegration = 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 @@ -39,18 +77,8 @@ home-manager switch #### Declarative, system-wide, with NixOS -Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch ``` - -### Modifying Init Scripts - -#### With Nix and home-manager, using zsh: - -Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run - -```sh -home-manager switch -``` diff --git a/docs/pt-PT/presets/README.md b/docs/pt-PT/presets/README.md index 746364fa..c4b2f7ca 100644 --- a/docs/pt-PT/presets/README.md +++ b/docs/pt-PT/presets/README.md @@ -16,7 +16,7 @@ This preset doesn't change anything except for the symbols used for each module. ```toml [aws] -symbol = " " +symbol = " " [conda] symbol = " " @@ -84,6 +84,9 @@ symbol = " " [rust] symbol = " " +[scala] +symbol = " " + [swift] symbol = "ﯣ " ``` diff --git a/docs/ru-RU/README.md b/docs/ru-RU/README.md index 9b008285..f4c4b6f4 100644 --- a/docs/ru-RU/README.md +++ b/docs/ru-RU/README.md @@ -123,3 +123,14 @@ description: Starship - минимальная, быстрая и бесконе eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + diff --git a/docs/ru-RU/config/README.md b/docs/ru-RU/config/README.md index becf3a4a..f5578a00 100644 --- a/docs/ru-RU/config/README.md +++ b/docs/ru-RU/config/README.md @@ -9,14 +9,14 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Вся конфигурация Starship выполняется в этом файле [TOML](https://github.com/toml-lang/toml): ```toml -# Не добавлять пустую строку в начале ввода -add_newline = false +# Inserts a blank line between shell prompts +add_newline = true -# Поменять символ "❯" на символ "➜" -[character] # Имя настраемого модуля - "character" -symbol = "➜" # Сегменту "symbol" присваеваем значение "➜" +# Replace the "❯" symbol in the prompt with "➜" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" -# Отключить модуль пакетов, полностью скрывая его из терминала +# Disable the package module, hiding it from the prompt completely [package] disabled = true ``` @@ -80,7 +80,7 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" Например: - `[on](red bold)` будет печатать строку `on` жирным текстом красного цвета. -- `[⬢ $version](bold green)` будет печатать символ `⬢` за которым следует содержимое переменной `версии`, с жирным шрифтом зеленого цвета. +- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green. - `[a [b](red) c](green)` будет печатать `a b c` с `b` красного и `a` и `c` зеленого цвета соответсвенно. #### Строки стиля @@ -142,11 +142,11 @@ format = ''' ### Опции -| Параметр | По умолчанию | Описание | -| -------------- | -------------------------------- | -------------------------------------------------------- | -| `format` | [ссылка](#default-prompt-format) | Настройка форматирования оболочки. | -| `scan_timeout` | `30` | Тайм-аут запуска сканирования файлов (в миллисекундах). | -| `add_newline` | `true` | Добавление пустой строки перед началом командной строки. | +| Параметр | По умолчанию | Описание | +| -------------- | -------------------------------- | ------------------------------------------------------- | +| `format` | [ссылка](#default-prompt-format) | Настройка форматирования оболочки. | +| `scan_timeout` | `30` | Тайм-аут запуска сканирования файлов (в миллисекундах). | +| `add_newline` | `true` | Inserts blank line between shell prompts. | ### Пример @@ -162,7 +162,7 @@ format = """ # Подождите 10 милисекунд пока starship прочитает файлы в этой директории. scan_timeout = 10 -# Выключить новую строку в начале подсказки (prompt) +# Disable the blank line at the start of the prompt add_newline = false ``` @@ -207,6 +207,7 @@ $purescript\ $python\ $ruby\ $rust\ +$scala\ $swift\ $terraform\ $vagrant\ @@ -237,15 +238,17 @@ $character""" При использовании [aws-vault](https://github.com/99designs/aws-vault) профиль читается из переменной среды `AWS_VAULT`. +When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. + ### Опции -| Параметр | По умолчанию | Описание | -| ---------------- | ------------------------------------------------ | -------------------------------------------------------------- | -| `format` | `'on [$symbol$profile(\($region\))]($style) '` | Формат модуля. | -| `symbol` | `"☁️ "` | Символ перед отображением текущего профиля AWS. | -| `region_aliases` | | Таблица региона псевдонимов, отображаемая вместе с именем AWS. | -| `style` | `"bold yellow"` | Стиль модуля. | -| `disabled` | `false` | Отключение модуля `AWS`. | +| Параметр | По умолчанию | Описание | +| ---------------- | --------------------------------------------------- | -------------------------------------------------------------- | +| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | Формат модуля. | +| `symbol` | `"☁️ "` | Символ перед отображением текущего профиля AWS. | +| `region_aliases` | | Таблица региона псевдонимов, отображаемая вместе с именем AWS. | +| `style` | `"bold yellow"` | Стиль модуля. | +| `disabled` | `false` | Отключение модуля `AWS`. | ### Переменные @@ -256,7 +259,7 @@ $character""" | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +\*: This variable can only be used as a part of a style string ### Примеры @@ -266,7 +269,7 @@ $character""" # ~/.config/starship.toml [aws] -format = 'on [$symbol$profile(\($region\))]($style) ' +format = 'on [$symbol($profile )(\($region\) )]($style)' style = "bold blue" symbol = "🅰 " [aws.region_aliases] @@ -301,7 +304,7 @@ symbol = "🅰 " ## Батарея -Модуль `battery` показывает насколько заряжена батарея девайса и статус зарядки на данный момент. Модуль виден только, если заряд батареи устройства меньше 10%. +The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. ### Опции @@ -330,7 +333,7 @@ discharging_symbol = "💀" ### Отображение батареи -Параметр `display` используется для определения того, когда индикатор батареи должен быть показан (threshhold) и как он выглядит (style). Если `display` не предоставлено. Значение по умолчанию: +The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. Значение по умолчанию: ```toml [[battery.display]] @@ -340,7 +343,7 @@ style = "bold red" #### Опции -Опция `display` представляет собой массив следующей таблицы. +The `display` option is an array of the following table. | Параметр | Описание | | ----------- | -------------------------------------------------------- | @@ -364,9 +367,9 @@ style = "bold yellow" ## Символ -Модуль `character` показывает символ (обычно, стрелка) рядом с вводимым текстом в терминале. +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -Символ показывает, была ли последняя команда успешной или нет. It can do this in two ways: +The character will tell you whether the last command was successful or not. It can do this in two ways: - changing color (`red`/`green`) - changing shape (`❯`/`✖`) @@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th | Параметр | По умолчанию | Описание | | ------------------- | -------------------------------------- | -------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `symbol` | `"△ "` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this moudle | | `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | @@ -449,19 +452,19 @@ The `cmake` module shows the currently installed version of CMake. By default th | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +\*: This variable can only be used as a part of a style string ## Длительность команды -Модуль `cmd_duration` показывает время исполнения последней команды. Модуль будет показан только, если команда заняла более двух секунд, или если задан параметр `min_time`. +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. -::: warning Не подключайте ловушку DEBUG к Bash +::: warning Do not hook the DEBUG trap in Bash -Если вы испоьзуете Starship в `bash`, не подключайте ловушку `DEBUG` после запуска `eval $(starship init $0)`, иначе этот модуль сломается. +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -Пользователи Bash, которым нужна функциональность, подобная preexec, могут использовать [фреймворк bash_preexec от rcaloras](https://github.com/rcaloras/bash-preexec). Просто определите массивы `preexec_functions` и `precmd_functions` перед запуском `eval $(starship init $0)`, а затем продолжайте нормально. +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### Опции @@ -488,7 +491,7 @@ Showing desktop notifications requires starship to be built with `rust-notify` s | duration | `16m40s` | The time it took to execute the command | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +\*: This variable can only be used as a part of a style string ### Пример @@ -502,11 +505,11 @@ format = "underwent [$duration](bold yellow)" ## Конда -Модуль `conda` показывает текущее окружение conda, если `$CONDA_DEFAULT_ENV` присвоено значение. +The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set. ::: tip -Это не подавляет модификатор командной строки самой conda. Возможно, вы захотите запустить `conda config --set changeps1 False`. +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. ::: @@ -529,7 +532,7 @@ format = "underwent [$duration](bold yellow)" | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +\*: This variable can only be used as a part of a style string ### Пример @@ -542,7 +545,7 @@ format = "[$symbol$environment](dimmed green) " ## Crystal -Модуль `crystal` показывает установленную версию Crystal. By default the module will be shown if any of the following conditions are met: +The `crystal` module shows the currently installed version of Crystal. By default the module will be shown if any of the following conditions are met: - Текущий каталог содержит файл `shard.yml` - Текущий каталог содержит файл `.cr` @@ -567,7 +570,7 @@ format = "[$symbol$environment](dimmed green) " | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +\*: This variable can only be used as a part of a style string ### Пример @@ -606,7 +609,7 @@ The `dart` module shows the currently installed version of Dart. By default the | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: Эта переменная может использоваться только в качестве части строки style +\*: This variable can only be used as a part of a style string ### Пример @@ -619,11 +622,11 @@ format = "via [🔰 $version](bold red) " ## Каталог -Модуль `directory` показывает путь к вашей текущей директории, усеченной до трех родительских папок. Ваш каталог также будет отсечен до корня git репозитория, в котором вы находитесь. +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. -При использовании стиля оболочки fish, вместо скрытия усеченного каталога, вы увидите укороченное имя каталога, зависимое от числа символов вы установите для этой опции. +When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. -Например, возьмем `~/Dev/Nix/nixpkgs/pkgs` где `nixpkgs` является корневым репозиторием, и в опции установлено `1`. Вы увидите `~/D/N/nixpkgs/pkgs`, а до этого было бы `nixpkgs/pkgs`. +For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`. ### Опции @@ -640,7 +643,7 @@ format = "via [🔰 $version](bold red) " | `home_symbol` | `"~"` | The symbol indicating home directory. |+ alt="Статус GitHub Actions" + /> + alt="Версия Crates.io" + /> + alt="Чат в Discord" + /> + alt="Подпишитесь на @StarshipPrompt в Twitter" + />
@@ -42,63 +47,72 @@ > + alt="English" + /> + alt="日本語" + /> + alt="繁體中文" + /> + alt="Русский" + /> + alt="Deutsch" + /> + alt="简体中文" + /> + alt="Español" + /> + alt="Français" + /> + alt="Tiếng Việt" + />
@@ -107,7 +121,8 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif" alt="Starship в iTerm2 с темой Snazzy" width="50%" - align="right" /> + align="right" + /> **Минималистичная, быстрая и бесконечно настраиваемая командная строка для любой оболочки!** @@ -229,6 +244,17 @@ eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + ## 🤝 Помощь Мы всегда ищем помощь людей **всех уровней навыков**! Если вы хотите облегчить свой путь к проекту, посмотрите хорошие первые ошибки ([first good issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)). diff --git a/docs/ru-RU/installing/README.md b/docs/ru-RU/installing/README.md index d863a445..b8bb38e3 100644 --- a/docs/ru-RU/installing/README.md +++ b/docs/ru-RU/installing/README.md @@ -8,13 +8,29 @@ To install starship, you need to do two things: 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! -## [termux](https://termux.com) + +## [Chocolatey](https://chocolatey.org) + ### Требования + +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) + +### Требования + ```sh pkg install getconf ``` ### Installation + ```sh curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin ``` @@ -31,7 +47,29 @@ nix-env -iA nixos.starship #### Declarative, single user, via [home-manager](home-manager) -Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run +Enable the `programs.starship` module in your `home.nix` file, and add your settings + +```nix +{ + programs.starship = { + enable = true; + enableZshIntegration = 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 @@ -39,18 +77,8 @@ home-manager switch #### Declarative, system-wide, with NixOS -Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch ``` - -### Modifying Init Scripts - -#### With Nix and home-manager, using zsh: - -Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run - -```sh -home-manager switch -``` diff --git a/docs/ru-RU/presets/README.md b/docs/ru-RU/presets/README.md index 57d5334e..0611601e 100644 --- a/docs/ru-RU/presets/README.md +++ b/docs/ru-RU/presets/README.md @@ -16,7 +16,7 @@ ```toml [aws] -symbol = " " +symbol = " " [conda] symbol = " " @@ -84,6 +84,9 @@ symbol = " " [rust] symbol = " " +[scala] +symbol = " " + [swift] symbol = "ﯣ " ``` diff --git a/docs/tr-TR/README.md b/docs/tr-TR/README.md index 5887681e..eb5b35ff 100644 --- a/docs/tr-TR/README.md +++ b/docs/tr-TR/README.md @@ -123,3 +123,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + diff --git a/docs/tr-TR/config/README.md b/docs/tr-TR/config/README.md index 6484c7d5..3a9111cd 100644 --- a/docs/tr-TR/config/README.md +++ b/docs/tr-TR/config/README.md @@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file: ```toml -# Don't print a new line at the start of the prompt -add_newline = false +# Inserts a blank line between shell prompts +add_newline = true # Replace the "❯" symbol in the prompt with "➜" [character] # The name of the module we are configuring is "character" @@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri For example: - `[on](red bold)` will print a string `on` with bold text colored red. -- `[⬢ $version](bold green)` will print a symbol `⬢` followed by the content of variable `version`, with bold text colored green. +- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green. - `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green. #### Style Strings @@ -146,7 +146,7 @@ This is the list of prompt-wide configuration options. | -------------- | ------------------------------ | ----------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configure the format of the prompt. | | `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | -| `add_newline` | `true` | Add a new line before the start of the prompt. | +| `add_newline` | `true` | Inserts blank line between shell prompts. | ### Example @@ -162,7 +162,7 @@ format = """ # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 -# Disable the newline at the start of the prompt +# Disable the blank line at the start of the prompt add_newline = false ``` @@ -207,6 +207,7 @@ $purescript\ $python\ $ruby\ $rust\ +$scala\ $swift\ $terraform\ $vagrant\ @@ -237,15 +238,17 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var. +When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. + ### Options -| Option | Default | Description | -| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | -| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | -| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `AWS` module. | +| Option | Default | Description | +| ---------------- | --------------------------------------------------- | --------------------------------------------------------------- | +| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | +| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `AWS` module. | ### Variables @@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re # ~/.config/starship.toml [aws] -format = 'on [$symbol$profile(\($region\))]($style) ' +format = 'on [$symbol($profile )(\($region\) )]($style)' style = "bold blue" symbol = "🅰 " [aws.region_aliases] @@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th | Option | Default | Description | | ------------------- | -------------------------------------- | -------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `symbol` | `"△ "` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this moudle | | `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | @@ -1343,6 +1346,12 @@ symbol = "🌟 " The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. +::: warning + +This module is not supported on tcsh. + +::: + ### Options | Option | Default | Description | @@ -1737,7 +1746,7 @@ The `nodejs` module shows the currently installed version of NodeJS. By default | Option | Default | Description | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. | +| `symbol` | `" "` | A format string representing the symbol of NodeJS. | | `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. | | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | @@ -2158,6 +2167,48 @@ By default the `rust` module shows the currently installed version of Rust. The format = "via [⚙️ $version](red bold)" ``` + +## Scala + +The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met: + +- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file +- The current directory contains a file with the `.scala` or `.sbt` extension +- The current directory contains a directory named `.metals` + +### Options + + +| Option | Default | Description | +| ------------------- | ---------------------------------------- | ------------------------------------------------- | +| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | +| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | +| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | +| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | +| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | +| `style` | `"red dimmed"` | The style for the module. | +| `disabled` | `false` | Disables the `scala` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `2.13.5` | The version of `scala` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[scala] +symbol = "🌟 " +``` + + ## Shell The `shell` module shows an indicator for currently used shell. @@ -2178,6 +2229,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `powershell_indicator` | `psh` | A format string used to represent powershell. | | `ion_indicator` | `ion` | A format string used to represent ion. | | `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | | `format` | `$indicator` | The format for the module. | | `disabled` | `true` | Disables the `shell` module. | diff --git a/docs/tr-TR/faq/README.md b/docs/tr-TR/faq/README.md index 9bb23bf9..d3c6d238 100644 --- a/docs/tr-TR/faq/README.md +++ b/docs/tr-TR/faq/README.md @@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l) 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. +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: @@ -56,6 +56,10 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship) curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl ``` +## 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. + ## 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: diff --git a/docs/tr-TR/guide/README.md b/docs/tr-TR/guide/README.md index 445e3027..fd107ff3 100644 --- a/docs/tr-TR/guide/README.md +++ b/docs/tr-TR/guide/README.md @@ -2,18 +2,21 @@ + alt="Starship – Cross-shell prompt" + />+ alt="GitHub Actions workflow status" + /> + alt="Crates.io version" + /> + alt="Chat on Discord" + /> + alt="Follow @StarshipPrompt on Twitter" + />
@@ -42,63 +47,72 @@ > + alt="English" + /> + alt="日本語" + /> + alt="繁體中文" + /> + alt="Русский" + /> + alt="Deutsch" + /> + alt="简体中文" + /> + alt="Español" + /> + alt="Français" + /> + alt="Tiếng Việt" + />
@@ -107,7 +121,8 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif" alt="Starship with iTerm2 and the Snazzy theme" width="50%" - align="right" /> + align="right" + /> **The minimal, blazing-fast, and infinitely customizable prompt for any shell!** @@ -229,6 +244,17 @@ eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + ## 🤝 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). diff --git a/docs/tr-TR/installing/README.md b/docs/tr-TR/installing/README.md index 52c0ac4c..73b998f7 100644 --- a/docs/tr-TR/installing/README.md +++ b/docs/tr-TR/installing/README.md @@ -8,13 +8,29 @@ To install starship, you need to do two things: 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! -## [termux](https://termux.com) + +## [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 -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin ``` @@ -31,7 +47,29 @@ nix-env -iA nixos.starship #### Declarative, single user, via [home-manager](home-manager) -Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run +Enable the `programs.starship` module in your `home.nix` file, and add your settings + +```nix +{ + programs.starship = { + enable = true; + enableZshIntegration = 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 @@ -39,18 +77,8 @@ home-manager switch #### Declarative, system-wide, with NixOS -Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch ``` - -### Modifying Init Scripts - -#### With Nix and home-manager, using zsh: - -Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run - -```sh -home-manager switch -``` diff --git a/docs/tr-TR/presets/README.md b/docs/tr-TR/presets/README.md index 746364fa..c4b2f7ca 100644 --- a/docs/tr-TR/presets/README.md +++ b/docs/tr-TR/presets/README.md @@ -16,7 +16,7 @@ This preset doesn't change anything except for the symbols used for each module. ```toml [aws] -symbol = " " +symbol = " " [conda] symbol = " " @@ -84,6 +84,9 @@ symbol = " " [rust] symbol = " " +[scala] +symbol = " " + [swift] symbol = "ﯣ " ``` diff --git a/docs/vi-VN/README.md b/docs/vi-VN/README.md index 70713757..01a3a21c 100644 --- a/docs/vi-VN/README.md +++ b/docs/vi-VN/README.md @@ -123,3 +123,14 @@ eval $(starship init ion) eval (starship init elvish) ``` + + #### Tcsh + + Thêm đoạn dưới vào cuối file `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + diff --git a/docs/vi-VN/config/README.md b/docs/vi-VN/config/README.md index 148ad30d..909fe78d 100644 --- a/docs/vi-VN/config/README.md +++ b/docs/vi-VN/config/README.md @@ -9,14 +9,14 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Tất cả cấu hình của starship đã xong trong tập tin này: [TOML](https://github.com/toml-lang/toml): ```toml -# Không in dòng mới tại điểm bắt đầu của prompt -add_newline = false +# Chèn một dòng trắng vào giữa các dấu nhắc lệnh +add_newline = true -# Thay thế kí hiệu "❯" trong prompt với "➜" -[character] # Tên module chúng ta đang cấu hình là "character" -success_symbol = "[➜](bold green)" # "success_symbol" được thiết lập là "➜" với màu "bold green" +# Thay thế biểu tượng "❯" trong dấu nhắc lệnh bằng "➜" +[character] # Tên mô đun chúng ta đang cấu hình là "character" +success_symbol = "[➜](bold green)" # đoạn "success_symbol" đươc thiết lập thành "➜" với màu "bold green" -# Vô hiệu hoá module, ẩn nó từ prompt hoàn chỉnh +#Vô hiệu mô đun package, ẩn nó hoàn toàn trong dấu nhắc lệnh [package] disabled = true ``` @@ -80,7 +80,7 @@ Phần thứ hai, cái được bao bọc trong một `()`, là một [chuỗi k Ví dụ: - `[on](red bold)` sẽ in một chuỗi `on` với chữ đậm tô màu đỏ. -- `[⬢ $version](bold green)` sẽ in một kí hiệu `⬢` theo sao bởi nội dung của biến `version`, với chữ đậm tô màu xanh lá cây. +- `[⌘ $version](bold green)` sẽ in một biểu tượng `⌘` theo sau là nội dung của biến `version`, với chữ in đậm màu xanh lá cây. - `[a [b](red) c](green)` sẽ in `a b c` với `b` màu đỏ, `a` và `c` màu xanh lá cây. #### Các chuỗi kiểu @@ -146,7 +146,7 @@ Cái này là danh sách các tuỳ chọn cho cấu hình prompt-wide. | -------------- | ------------------------------ | ------------------------------------------------------------------------ | | `format` | [link](#default-prompt-format) | Cấu hình định dạng của prompt. | | `scan_timeout` | `30` | Timeout của starship cho việc quét các tập tin (tính theo milliseconds). | -| `add_newline` | `true` | Thêm một dòng mới trước khi bắt đầu một prompt. | +| `add_newline` | `true` | Chèn dòng trắng giữa các dấu nhắc lệnh. | ### Ví dụ @@ -162,7 +162,7 @@ format = """ # Chờ 10 milliseconds để starship kiểm tra các tập tin trong đường dẫn hiện tại. scan_timeout = 10 -# Vô hiệu hoá dòng mới tại điểm bắt đầu của prompt +# Vô hiệu hóa dòng trắng tại ví trị bắt đầu của dấu nhắc lệnh add_newline = false ``` @@ -173,7 +173,7 @@ Mặc định `format` được sử dụng để định nghĩa định dạng ```toml format = "$all" -# Nó tương đương với +# Which is equivalent to format = """ $username\ $hostname\ @@ -207,6 +207,7 @@ $purescript\ $python\ $ruby\ $rust\ +$scala\ $swift\ $terraform\ $vagrant\ @@ -237,15 +238,17 @@ $character""" Khi sử dụng [aws-vault](https://github.com/99designs/aws-vault) profile được đọc từ biến môt trường `AWS_VAULT`. +When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. + ### Các tuỳ chọn -| Tuỳ chọn | Mặc định | Mô tả | -| ---------------- | ------------------------------------------------ | ---------------------------------------------------- | -| `format` | `'on [$symbol$profile(\($region\))]($style) '` | Định dạng cho module. | -| `symbol` | `"☁️ "` | Kí hiệu sử dụng hiển thị trước profile AWS hiện tại. | -| `region_aliases` | | Bảng của các region alias để hiển thị ngoài tên AWS. | -| `style` | `"bold yellow"` | Kiểu cho module. | -| `disabled` | `false` | Vô hiệu `AWS` module. | +| Tuỳ chọn | Mặc định | Mô tả | +| ---------------- | --------------------------------------------------- | ---------------------------------------------------- | +| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | Định dạng cho module. | +| `symbol` | `"☁️ "` | Kí hiệu sử dụng hiển thị trước profile AWS hiện tại. | +| `region_aliases` | | Bảng của các region alias để hiển thị ngoài tên AWS. | +| `style` | `"bold yellow"` | Kiểu cho module. | +| `disabled` | `false` | Vô hiệu `AWS` module. | ### Các biến @@ -256,7 +259,7 @@ Khi sử dụng [aws-vault](https://github.com/99designs/aws-vault) profile đư | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +\*: This variable can only be used as a part of a style string ### Các vị dụ @@ -266,7 +269,7 @@ Khi sử dụng [aws-vault](https://github.com/99designs/aws-vault) profile đư # ~/.config/starship.toml [aws] -format = 'on [$symbol$profile(\($region\))]($style) ' +format = 'on [$symbol($profile )(\($region\) )]($style)' style = "bold blue" symbol = "🅰 " [aws.region_aliases] @@ -301,7 +304,7 @@ symbol = "🅰 " ## Battery -`battery` module cho biết cách sạc pin của thiết bị là gì và tình trạng sạc hiện tại của nó. Module chỉ được nhìn thấy khi pin của thiết bị dưới 10%. +The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. ### Các tuỳ chọn @@ -330,7 +333,7 @@ discharging_symbol = "💀" ### Hiển thị pin -Tuỳ chọn cấu hình `display` được sử dụng để định nghĩa khi nào pin nên cho biết (threshold) và nó trông như thế nào (style). Nếu `display` không được cung cấp. Mặc định như sau: +The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. Mặc định như sau: ```toml [[battery.display]] @@ -340,11 +343,11 @@ style = "bold red" #### Các tuỳ chọn -Tuỳ chọn `display` là một mảng của của bảng sau. +The `display` option is an array of the following table. | Tuỳ chọn | Mô tả | | ----------- | ---------------------------------------------------------- | -| `threshold` | Cận trên của tuỳ chọn hiển thị. | +| `threshold` | Cận trên cho tuỳ chọn hiển thị. | | `style` | Kiểu sử dụng nếu tuỳ chọn hiển thị được sử dụng bên trong. | #### Ví dụ @@ -364,16 +367,16 @@ style = "bold yellow" ## Character -Module `character` cho biết một kí tự (thường là một mũi tên) bên cạnh nơi văn bản được nhập trong terminal của bạn. +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -Kí tự sẽ nói cho bạn câu lệnh cuối liệu thành công hay thất bại. Nó có thể làm điều này bằng hai cách: +The character will tell you whether the last command was successful or not. It can do this in two ways: - thay đổi màu(`đỏ`/`xanh lá`) - thay đổi hình dạng (`❯`/`✖`) -Mặc định, nó chỉ thay đổi màu. Nếu bạn cũng muốn thay đổi hình dạng, tham khảo [ví dụ này](#with-custom-error-shape). +By default it only changes color. If you also want to change it's shape take a look at [this example](#with-custom-error-shape). -::: warning `error_symbol` không được hỗ trợ trên elvish shell. ::: +::: warning `error_symbol` is not supported on elvish shell. ::: ### Các tuỳ chọn @@ -387,9 +390,9 @@ Mặc định, nó chỉ thay đổi màu. Nếu bạn cũng muốn thay đổi ### Các biến -| Biến | Ví dụ | Mô tả | -| ------ | ----- | --------------------------------------------------------------------- | -| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | +| Biến | Ví dụ | Mô tả | +| ------ | ----- | ----------------------------------------------------------------------------- | +| symbol | | Một phản ánh của một trong `success_symbol`, `error_symbol` or `vicmd_symbol` | ### Các vị dụ @@ -424,7 +427,7 @@ vicmd_symbol = "[V](bold green) " ## CMake -`cmake` module cho biết phiên bản Cmake hiện tại đã được cài đặt. Mặc định module sẽ được kích hoạt nếu thoả mãn bất kì điều kiện nào dưới đây: +The `cmake` module shows the currently installed version of CMake. By default the module will be activated if any of the following conditions are met: - Đường dẫn hiện tại chứa một tập tin `CmakeLists.txt` - Đường dẫn hiện tại chứa một tập tin `CMakeCache.txt` @@ -434,7 +437,7 @@ vicmd_symbol = "[V](bold green) " | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | -------------------------------------- | -------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | -| `symbol` | `"喝 "` | Kí hiệu sử dụng trước phiên bản của cmake. | +| `symbol` | `"△ "` | Kí hiệu sử dụng trước phiên bản của cmake. | | `detect_extensions` | `[]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này | | `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Tên tệp nào sẽ kích hoạt mô-đun này | | `detect_folders` | `[]` | Thư mục nào sẽ kích hoạt mô-đun này | @@ -449,19 +452,19 @@ vicmd_symbol = "[V](bold green) " | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +\*: This variable can only be used as a part of a style string ## Command Duration -Module `cmd_duration`. cho biết câu lệnh cuối cùng thực thi trong bao lâu. Module sẽ được hiện chỉ khi câu lệnh lấy nhiều hơn 2 giây, hoặc giá trị cấu hình `min_time`, nếu nó tồn tại. +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. -::: cảnh báo Không thể hook DEBUG trap trong Bash +::: warning Do not hook the DEBUG trap in Bash -Nếu bạn đang chạy Starship trong `bash`, không thể hook `DEBUG` trap sau khi chạy `eval $(starship init $0)`, hoặc module này **sẽ** ngắt. +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -Người dùng Bash, những người cần chức năng giống preexec có thể sử dụng [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Đơn giản là định nghĩa các mảng `preexec_functions` và `precmd_functions` trước khi chạy `eval $(starship init $0)`, và sau đó thực thi như bình thường. +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### Các tuỳ chọn @@ -475,9 +478,9 @@ Người dùng Bash, những người cần chức năng giống preexec có th | `show_notifications` | `false` | Hiện thông báo desktop khi câu lệnh hoàn thành. | | `min_time_to_notify` | `45_000` | Khoảng thời gian ngắn nhất để thông báo (tính bằng milliseconds). | -::: thử thuật +::: tip -Hiện thông báo desktop yêu cầu starship được built với sự hỗ trợ của `rust-notify`. Bạn kiểm tra nếu starship hỗ trợ các thông báo bằng cách chạy `STARSHIP_LOG=debug starship module cmd_duration -d 60000` khi `show_notifications` được thiết lập là `true`. +Showing desktop notifications requires starship to be built with `rust-notify` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. ::: @@ -488,7 +491,7 @@ Hiện thông báo desktop yêu cầu starship được built với sự hỗ tr | duration | `16m40s` | Thời gian nó lấy để thực thi câu lệnh | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +\*: This variable can only be used as a part of a style string ### Ví dụ @@ -502,11 +505,11 @@ format = "underwent [$duration](bold yellow)" ## Conda -Module `conda` cho biết môi trường conda hiện tại, nếu `$CONDA_DEFAULT_ENV` được thiết lập. +The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set. -::: thử thuật +::: tip -Cái này không loại bỏ conda's prompt mà nó sở hữu, bạn có thể muốn chạy `conda config --set changeps1 False`. +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. ::: @@ -529,7 +532,7 @@ Cái này không loại bỏ conda's prompt mà nó sở hữu, bạn có thể | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +\*: This variable can only be used as a part of a style string ### Ví dụ @@ -542,7 +545,7 @@ format = "[$symbol$environment](dimmed green) " ## Crystal -Module `crystal` cho biết phiên bản hiện tại của Crystal được đã cài đặt. Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: +The `crystal` module shows the currently installed version of Crystal. Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: - Đường dẫn hiện tại chứa một tập tin `shard.yml` - Đường dẫn hiện tại chứa một tập tin `.cr` @@ -567,7 +570,7 @@ Module `crystal` cho biết phiên bản hiện tại của Crystal được đ | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +\*: This variable can only be used as a part of a style string ### Ví dụ @@ -580,7 +583,7 @@ format = "via [✨ $version](bold blue) " ## Dart -Module `dart` cho biết phiên bản của Dart đã cài đặt. Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: +The `dart` module shows the currently installed version of Dart. Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: - Đường dẫn hiện tại chứa một tập tin với phần mở rộng `.dart` - Đường dẫn hiện tại chứa một đường dẫn `.dart_tool` @@ -606,7 +609,7 @@ Module `dart` cho biết phiên bản của Dart đã cài đặt. Mặc định | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: Biến này có thể chỉ được sử dụng như một phần của style string +\*: This variable can only be used as a part of a style string ### Ví dụ @@ -619,7 +622,7 @@ format = "via [🔰 $version](bold red) " ## Đường dẫn -`directory` module hiển thị đường dẫn thư mục hiện hành của bạn,, cắt ngắn ba thư mục cha. Đường dẫn của bạn cũng sẽ được cắt ngắn tới đường dẫn gốc của git repo hiện tại của bạn. +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. @@ -627,22 +630,22 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Các tuỳ chọn -| Tuỳ chọn | Mặc định | Mô tả | -| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | -| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | -| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Định dạng cho module. | -| `style` | `"bold cyan"` | Kiểu cho module. | -| `disabled` | `false` | Disables the `directory` module. | -| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | -| `read_only_style` | `"red"` | The style for the read only symbol. | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | -| `home_symbol` | `"~"` | The symbol indicating home directory. | +| Tuỳ chọn | Mặc định | Mô tả | +| ------------------- | -------------------------------------------------- | ------------------------------------------------------------------ | +| `truncation_length` | `3` | Số lượng thư mục cha của thư mục hiện tại nên được rút gọn. | +| `truncate_to_repo` | `true` | Có hoặc không rút gọn đường dẫn gốc của git repo hiện tại của bạn. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Định dạng cho module. | +| `style` | `"bold cyan"` | Kiểu cho module. | +| `disabled` | `false` | Vô hiệu mô đun `directory`. | +| `read_only` | `"🔒"` | Biểu tượng để nhận biết thư mục hiện tại là chỉ đọc. | +| `read_only_style` | `"red"` | Style cho biểu tượng chỉ đọc. | +| `truncation_symbol` | `""` | Biểu tượng tiền tố cho các đường dẫn rút gọn. ví dụ: "…/" | +| `home_symbol` | `"~"` | Biểu tượng nhận biết thư mục home. |+ alt="Trạng thái GitHub Actions workflow" + /> + alt="Phiên bản Crates.io" + /> + alt="Trò chuyện trên Discord" + /> + alt="Theo dõi @StarshipPrompt trên Twitter" + />
@@ -42,63 +47,72 @@ > + alt="Tiếng Anh" + /> + alt="Tiếng Nhật" + /> + alt="Tiếng Trung hiện đại" + /> + alt="Tiếng Nga" + /> + alt="Tiếng Đức" + /> + alt="Tiếng Trung giản thể" + /> + alt="Tiếng Tây Ban Nha" + /> + alt="Thiếng Pháp" + /> + alt="Tiếng Việt" + />
@@ -107,7 +121,8 @@ src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif" alt="Starship với iTerm2 and chủ đề Snazzy" width="50%" - align="right" /> + align="right" + /> **Nhỏ gọn, cực nhanh, và khả năng tuỳ chỉnh vô hạn prompt cho bất kì shell nào!** @@ -229,6 +244,17 @@ eval (starship init elvish) ``` + + #### Tcsh + + Thêm đoạn sau vào cuối tệp tin `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + ## 🤝 Đóng góp Chúng tôi luôn luôn tìm kiếm những cộng tác viên ở **tất cả các các mức độ về kĩ năng**! Nếu bạn đang tìm kiếm cách dễ dàng để tham gia vào dự án, thử một [good issue đầu tiên](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). diff --git a/docs/vi-VN/installing/README.md b/docs/vi-VN/installing/README.md index 146934c8..313644c2 100644 --- a/docs/vi-VN/installing/README.md +++ b/docs/vi-VN/installing/README.md @@ -8,13 +8,29 @@ Đối với đa số người dùng, các hướng dẫn trên [trang chính](/guide/#🚀-installation) sẽ làm việc tốt. Tuy nhiên, với một vài nền tảng đặc biệt hơn, các hướng dẫn khác nhau là cần thiết. Có rất nhiều nền tảng bên ngoài, rằng chúng đã không khớp như trong tệp tin README.md, do đó đây là vài hướng dẫn cài đặt cho những nền tảng khác đến từ cộng đồng. Của bạn không có ở đây? Xin hãy thêm nó vào đây nếu bạn tìm ra nó! -## [termux](https://termux.com) + +## [Chocolatey](https://chocolatey.org) + ### Yêu cầu + +Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey. + +### Cài đặt + +```powershell +choco install starship +``` + +## [termux](https://termux.com) + +### Yêu cầu + ```sh pkg install getconf ``` -### Installation +### Cài đặt + ```sh curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin ``` @@ -31,7 +47,29 @@ nix-env -iA nixos.starship #### Khai báo, người dùng đơn, thông qua [home-manager](home-manager) -Thêm `pkgs.starship` vào `home.packages` trong tệp tin `home.nix` của bạn, sau đó chạy +Enable the `programs.starship` module in your `home.nix` file, and add your settings + +```nix +{ + programs.starship = { + enable = true; + enableZshIntegration = 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 @@ -39,18 +77,8 @@ home-manager switch #### Khai báo, system-wide, với NixOS -Thêm `pkgs.starship` vào `environment.packages` trong `configuration.nix` của bạn, sau đó chạy +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch ``` - -### Modifying Init Scripts - -#### Với Nix và home-manager, sử dụng zsh: - -Thêm phần sau vào `programs.zsh.initExtra` trong tệp tin `home.nix` của bạn, sau đó chạy - -```sh -home-manager switch -``` diff --git a/docs/vi-VN/migrating-to-0.45.0/README.md b/docs/vi-VN/migrating-to-0.45.0/README.md index ecbc0491..aadc8685 100644 --- a/docs/vi-VN/migrating-to-0.45.0/README.md +++ b/docs/vi-VN/migrating-to-0.45.0/README.md @@ -1,16 +1,16 @@ -# Migrating to v0.45.0 +# Tích hợp sang 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. +Starship v0.45.0 là một bản phát hành chứa nhiều thay đổi trong việc chuẩn bị cho bản thay đổi lớn v1.0.0. Chúng tôi tạo một vài thay đổi xung quanh cách cấu hình được thực hiện trên dáu nhắc lệnh, cho phép tùy biến theo góc độ tốt hơn. -This guide is intended to walk you through the breaking changes. +Hướng dẫn này nhằm hướng dẫn bạn vượt qua những sự thay đổi. -## `prompt_order` has been replaced by a root-level `format` +## `prompt_order` được thay thế boiwr một 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. +Từ trước đế v0.45.0, `prompt_order` sẽ chấp nhận một mảng các tên mô đun theo thứ tự mà chúng nên được render bởi Starship. -Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves. +Starship v0.45.0 thay vì chấp nhận một giá trị `format`, nó cho phép tùy biến dấu nhắc lệnh bên ngoài chính các mô đun đó. -**Example pre-v0.45.0 configuration** +**Ví dụcủa cấu hình pre-v0.45.0** ```toml prompt_order = [ @@ -31,7 +31,7 @@ prompt_order = [ ] ``` -**Example v0.45.0 configuration** +**Ví dụcủa cấu hình v0.45.0** ```toml format = """\ @@ -52,40 +52,40 @@ format = """\ """ ``` -## Module `prefix` and `suffix` have been replaced by `format` +## Mô đun `prefix` và`suffix` thay bằng `format` -Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered. +Từ trước tới v0.45.0, một vài mô đun sẽ chấp nhận `prefix` và/hoặc `suffix` theo thứ tự để stylize các mà các mô đun được render. -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. +Starship v0.45.0 thay vì chấp nhận một giá trị `format`, nó cho phép tùy biến dấu nhắc lệnh bên ngoài chính các mô đun đó. Thay vì định nghĩa một tiền tố và hậu tố cho các giá trị context-based, các giá trị bây giờ có thể được thay thế với một format string, cái đại diện cho đầu ra của module. -**Example pre-v0.45.0 configuration** +**Ví dụ của cấu hình pre-v0.45.0** ```toml [cmd_duration] prefix = "took " ``` -**Example v0.45.0 configuration** +**Ví dụ của cấu hình v0.45.0** ```toml [cmd_duration] -# $duration – The command duration (e.g. "15s") -# $style – The default style of the module (e.g. "bold yellow") +# $duration – Thời gian câu lệnh dùng để thực thi (e.g. "15s") +# $style – Style mặc định của mô đun (e.g. "bold yellow") format = "took [$duration]($style) " ``` -### Affected Modules +### Các mô đun ảnh hưởng #### Character -| Removed Property | Replacement | +| Thuộc tính bị gỡ bỏ | Thay thế bằng | | ----------------------- | ---------------- | | `symbol` | `success_symbol` | | `use_symbol_for_status` | `error_symbol` | | `style_success` | `success_symbol` | | `style_failure` | `error_symbol` | -**Changes to the Default Configuration** +**Các thay đổi về cấu hình mặc định** ```diff [character] @@ -98,26 +98,26 @@ format = "took [$duration]($style) " ++ 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. +Trước đây, thuộc tính `use_symbol_for_status` được sử dụng để cấu hình dấu nhắc lệnh hiển thị `error_symbol` khi câu lệnh cuối cùng trả về kết quả có status code khác 0. -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. +Với bản hát hành v0.45.0, chúng ta bây giờ luôn sử dụng `error_symbol` sau các status khác 0, thống nhất các thuộc tính `use_symbol_for_status` và `error_symbol`. -To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file: +Cấu hình dâu nhắc lệnh để sử dụng cấu hình `use_symbol_for_status = true`, thêm đoạn dưới vào tệp cấu hình của bạn: ```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. +*Lưu ý:* Phần tử `character` tự động thêm vào một khoảng trắng phía sau, so unlike the other `format` strings, we specifically do not add one in the above examples. #### Command Duration -| Removed Property | Replacement | -| ---------------- | ----------- | -| `prefix` | `format` | +| Thuộc tính bị gỡ bỏ | Thay thế bằng | +| ------------------- | ------------- | +| `prefix` | `format` | -**Changes to the Default Configuration** +**Các thay đổi về cấu hình mặc định** ```diff [cmd_duration] @@ -127,11 +127,11 @@ error_symbol = "[✖](bold red)" #### Đường dẫn -| Removed Property | Replacement | -| ---------------- | ----------- | -| `prefix` | `format` | +| Thuộc tính bị gỡ bỏ | Thay thế bằng | +| ------------------- | ------------- | +| `prefix` | `format` | -**Changes to the Default Configuration** +**Các thay đổi về cấu hình mặc định** ```diff [directory] @@ -139,14 +139,14 @@ error_symbol = "[✖](bold red)" ++ format = "[$path]($style)[$read_only]($read_only_style) " ``` -#### Environment Variable +#### Biến môi trường -| Removed Property | Replacement | -| ---------------- | ----------- | -| `prefix` | `format` | -| `suffix` | `format` | +| Thuộc tính bị gỡ bỏ | Thay thế bằng | +| ------------------- | ------------- | +| `prefix` | `format` | +| `suffix` | `format` | -**Changes to the Default Configuration** +**Các thay đổi về cấu hình mặc định** ```diff [env_var] @@ -157,12 +157,12 @@ error_symbol = "[✖](bold red)" #### Git Commit -| Removed Property | Replacement | -| ---------------- | ----------- | -| `prefix` | `format` | -| `suffix` | `format` | +| Thuộc tính bị gỡ bỏ | Thay thế bằng | +| ------------------- | ------------- | +| `prefix` | `format` | +| `suffix` | `format` | -**Changes to the Default Configuration** +**Các thay đổi về cấu hình mặc định** ```diff [git_commit] @@ -173,13 +173,13 @@ error_symbol = "[✖](bold red)" #### Git Status -| Removed Property | Replacement | -| ----------------- | ----------- | -| `prefix` | `format` | -| `suffix` | `format` | -| `show_sync_count` | `format` | +| Thuộc tính bị gỡ bỏ | Thay thế bằng | +| ------------------- | ------------- | +| `prefix` | `format` | +| `suffix` | `format` | +| `show_sync_count` | `format` | -**Changes to the Default Configuration** +**Các thay đổi về cấu hình mặc định** ```diff [git_status] @@ -189,11 +189,11 @@ error_symbol = "[✖](bold red)" ++ 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. +Trước đây, thuộc tính `show_sync_count` được sử dụng để cấu hình dấu nhắc lệnh hiển thị số commit của nhánh ahead hoặc số lượng behind của remote branch. -With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`. +Với bản phát hành v0.45.0, cái này được thay thế bằng ba thuộc tính rời `ahead`, `behind`, và `diverged`. -To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file: +Cấu hình dấu nhắc lệnh sử dụng cấu hình `show_sync_count = true` cũ hơn, thiết lâp như dưới đây trong tệp cấu hình của bạn: ```toml [git_status] @@ -204,12 +204,12 @@ behind = "⇣${count}" #### Hostname -| Removed Property | Replacement | -| ---------------- | ----------- | -| `prefix` | `format` | -| `suffix` | `format` | +| Thuộc tính bị gỡ bỏ | Thay thế bằng | +| ------------------- | ------------- | +| `prefix` | `format` | +| `suffix` | `format` | -**Changes to the Default Configuration** +**Các thay đổi về cấu hình mặc định** ```diff [hostname] @@ -220,13 +220,13 @@ behind = "⇣${count}" #### Singularity -| Removed Property | Replacement | -| ---------------- | ----------- | -| `label` | `format` | -| `prefix` | `format` | -| `suffix` | `format` | +| Thuộc tính bị gỡ bỏ | Thay thế bằng | +| ------------------- | ------------- | +| `nhãn` | `format` | +| `prefix` | `format` | +| `suffix` | `format` | -**Changes to the Default Configuration** +**Các thay đổi về cấu hình mặc định** ```diff [singularity] @@ -235,13 +235,13 @@ behind = "⇣${count}" ++ format = '[$symbol\[$env\]]($style) ' ``` -#### Time +#### Thời gian -| Removed Property | Replacement | -| ---------------- | ------------- | -| `format` | `time_format` | +| Thuộc tính bị gỡ bỏ | Thay thế bằng | +| ------------------- | ------------- | +| `format` | `time_format` | -**Changes to the Default Configuration** +**Các thay đổi về cấu hình mặc định** ```diff [time] @@ -250,14 +250,14 @@ behind = "⇣${count}" ++ format = "at 🕙[$time]($style) " ``` -#### Custom Commands +#### Các câu lệnh tùy biến -| Removed Property | Replacement | -| ---------------- | ----------- | -| `prefix` | `format` | -| `suffix` | `format` | +| Thuộc tính bị gỡ bỏ | Thay thế bằng | +| ------------------- | ------------- | +| `prefix` | `format` | +| `suffix` | `format` | -**Changes to the Default Configuration** +**Các thay đổi về cấu hình mặc định** ```diff [custom.example] diff --git a/docs/vi-VN/presets/README.md b/docs/vi-VN/presets/README.md index 24aca7fb..f21620ba 100644 --- a/docs/vi-VN/presets/README.md +++ b/docs/vi-VN/presets/README.md @@ -16,7 +16,7 @@ Preset này không thay đổi bất kể thứ gì ngoại trừ các kí hiệ ```toml [aws] -symbol = " " +symbol = " " [conda] symbol = " " @@ -84,6 +84,9 @@ symbol = " " [rust] symbol = " " +[scala] +symbol = " " + [swift] symbol = "ﯣ " ``` diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index 336ceacb..987aff89 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -123,3 +123,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p eval (starship init elvish) ``` + + #### Tcsh + + Add the following to the end of `~/.tcshrc`: + + ```sh + # ~/.tcshrc + + eval `starship init tcsh` + ``` + diff --git a/docs/zh-CN/advanced-config/README.md b/docs/zh-CN/advanced-config/README.md index 508b255d..e2055248 100644 --- a/docs/zh-CN/advanced-config/README.md +++ b/docs/zh-CN/advanced-config/README.md @@ -2,7 +2,7 @@ `Starship 功能繁多,有时您必须在编辑starship.toml` 之外做更多工作才能实现某些效果。 此页面详细介绍了一些在 starship 中使用的高级配置技巧。
-::: 警告
+::: warning
本节所述的配置内容可能随 Starship 未来版本的更新而改变。
diff --git a/docs/zh-CN/config/README.md b/docs/zh-CN/config/README.md
index a66118ab..abacfe43 100644
--- a/docs/zh-CN/config/README.md
+++ b/docs/zh-CN/config/README.md
@@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
Starship 的所有配置都在此 [TOML](https://github.com/toml-lang/toml) 配置文件中完成:
```toml
-# Don't print a new line at the start of the prompt
-add_newline = false
+# Inserts a blank line between shell prompts
+add_newline = true
# Replace the "❯" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character"
@@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri
For example:
- `[on](red bold)` will print a string `on` with bold text colored red.
-- `[⬢ $version](bold green)` will print a symbol `⬢` followed by the content of variable `version`, with bold text colored green.
+- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green.
#### 样式设定
@@ -142,11 +142,11 @@ format = '''
### 配置项
-| Option | 默认值 | 描述 |
-| -------------- | ----------------------------- | ----------------------------------- |
-| `format` | [见下文](#default-prompt-format) | Configure the format of the prompt. |
-| `scan_timeout` | `30` | Starship 扫描文件的超时时间(单位:毫秒)。 |
-| `add_newline` | `true` | 在提示符与提示信息间换行。 |
+| Option | 默认值 | 描述 |
+| -------------- | ----------------------------- | ----------------------------------------- |
+| `format` | [见下文](#default-prompt-format) | Configure the format of the prompt. |
+| `scan_timeout` | `30` | Starship 扫描文件的超时时间(单位:毫秒)。 |
+| `add_newline` | `true` | Inserts blank line between shell prompts. |
### 示例
@@ -162,7 +162,7 @@ format = """
# Wait 10 milliseconds for starship to check files under the current directory.
scan_timeout = 10
-# Disable the newline at the start of the prompt
+# Disable the blank line at the start of the prompt
add_newline = false
```
@@ -207,6 +207,7 @@ $purescript\
$python\
$ruby\
$rust\
+$scala\
$swift\
$terraform\
$vagrant\
@@ -237,15 +238,17 @@ $character"""
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
+When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
+
### 配置项
-| Option | 默认值 | 描述 |
-| ---------------- | ------------------------------------------------ | ------------------------- |
-| `format` | `'on [$symbol$profile(\($region\))]($style) '` | 组件格式化模板。 |
-| `symbol` | `"☁️ "` | 这个字段的内容会显示在当前 AWS 配置信息之前。 |
-| `region_aliases` | | 地区缩写列表,用来显示在 AWS 主机名之后。 |
-| `style` | `"bold yellow"` | 此组件的样式。 |
-| `disabled` | `false` | 禁用 `AWS` 组件。 |
+| Option | 默认值 | 描述 |
+| ---------------- | --------------------------------------------------- | ------------------------- |
+| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | 组件格式化模板。 |
+| `symbol` | `"☁️ "` | 这个字段的内容会显示在当前 AWS 配置信息之前。 |
+| `region_aliases` | | 地区缩写列表,用来显示在 AWS 主机名之后。 |
+| `style` | `"bold yellow"` | 此组件的样式。 |
+| `disabled` | `false` | 禁用 `AWS` 组件。 |
### Variables
@@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
# ~/.config/starship.toml
[aws]
-format = 'on [$symbol$profile(\($region\))]($style) '
+format = 'on [$symbol($profile )(\($region\) )]($style)'
style = "bold blue"
symbol = "🅰 "
[aws.region_aliases]
@@ -301,7 +304,7 @@ symbol = "🅰 "
## Battery
-`battery` 组件显示电池充电情况和当前充电状态。 这个组件只会在当前电量低于 10% 时显示。
+The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%.
### 配置项
@@ -330,7 +333,7 @@ discharging_symbol = "💀"
### Battery 组件的显示
-`display` 选项用于定义电池指示器的显示阈值(threshold)和显示效果(style)。 如果 `display` 没有设置, 默认设置如下:
+The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. 默认设置如下:
```toml
[[battery.display]]
@@ -340,7 +343,7 @@ style = "bold red"
#### 配置项
-`display` 字段的子字段如下:
+The `display` option is an array of the following table.
| Option | 描述 |
| ----------- | ---------------- |
@@ -364,9 +367,9 @@ style = "bold yellow"
## Character
-`character` 组件用于在您输入终端的文本旁显示一个字符(通常是一个箭头)。
+The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
-这个字符可以告诉您最后一个命令是否执行成功。 It can do this in two ways:
+The character will tell you whether the last command was successful or not. It can do this in two ways:
- changing color (`red`/`green`)
- changing shape (`❯`/`✖`)
@@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th
| Option | 默认值 | 描述 |
| ------------------- | -------------------------------------- | -------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 |
-| `symbol` | `"喝 "` | The symbol used before the version of cmake. |
+| `symbol` | `"△ "` | The symbol used before the version of cmake. |
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
| `detect_folders` | `[]` | Which folders should trigger this module |
@@ -453,15 +456,15 @@ The `cmake` module shows the currently installed version of CMake. By default th
## Command Duration
-`cmd_duration` 组件显示上一个命令执行的时间。 此组件只在命令执行时间长于两秒时显示,或者当其 `min_time` 字段被设置时,按此值为执行时间的显示下限。
+The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
-::: warning 不要在 Bash 里捕获 DEBUG 信号
+::: warning Do not hook the DEBUG trap in Bash
-如果您正在 `bash` 上使用 Starship,在运行 `eval $(starship)` 后,不要捕获 `DEBUG` 信号,否则此组件**将会**坏掉。
+If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
:::
-需要在自动每一条命令前执行某些操作的 Bash 用户可以使用 [rcaloras 的 bash_preexec 框架](https://github.com/rcaloras/bash-preexec)。 只需要在执行 `eval $(starship init $0)` 前简单地定义 `preexec_functions` 和 `precmd_functions` 两个列表,就可以照常运行了。
+Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
### 配置项
@@ -502,11 +505,11 @@ format = "underwent [$duration](bold yellow)"
## Conda
-`conda` 组件在 `$CONDA_DEFAULT_ENV` 被设置时显示当前 conda 环境。
+The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
::: tip
-此组件没有禁用 conda 自带的提示符修改,您可能需要执行 `conda config --set changeps1 False`。
+This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`.
:::
@@ -619,11 +622,11 @@ format = "via [🔰 $version](bold red) "
## Directory
-`directory` 组件显示当前目录的路径,显示的路径会截断到三个父目录以内。 如果您处于一个 git 仓库中,显示的路径则最多会截断到该仓库的根目录。
+The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in.
-当使用 fish 风格的当前目录显示样式时,您会看到基于您的设置的每个上级目录的短名称,而不是隐藏被截断的上级目录。
+When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option.
-例如,对于 `~/Dev/Nix/nixpkgs/pkgs`,其中 `nixpkgs` 是 git 仓库根目录,fish 风格相关选项设置为 `1`。 您将会看到 `~/D/N/nixpkgs/pkgs`,而在设置 fish 风格之前,当前路径将显示成 `nixpkgs/pkgs`。
+For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`.
### 配置项
@@ -640,7 +643,7 @@ format = "via [🔰 $version](bold red) "
| `home_symbol` | `"~"` | The symbol indicating home directory. |
-此组件有几个高级配置选项来控制当前目录路径的显示方式。
+This module has a few advanced configuration options that control how the directory is displayed.
| Advanced Option | 默认值 | 描述 |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -717,7 +720,7 @@ format = "via [🐋 $context](blue bold)"
## Dotnet
-`dotnet` 模块显示与当前目录下使用的 .NET Core SDK 相关联的版本。 如果当前目录已被绑定了一个版本的 SDK,则显示被帮定的版本。 否则此组件将显示最新安装的 SDK 版本。
+The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK.
By default this module will only be shown in your prompt when one or more of the following files are present in the current directory:
@@ -733,7 +736,7 @@ By default this module will only be shown in your prompt when one or more of the
You'll also need the .NET Core SDK installed in order to use it correctly.
-在内部,此组件使用自己的版本检测机制。 一般来说此组件是直接执行 `dotnet --version` 的两倍快,但当你的 .NET 项目使用了不常见的目录布局时此组件可能显示一个错误的版本。 如果相比于速度您更需要正确的版本号,您可以在组件设置中设置 `heuristic = false` 来禁用该机制。
+Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
The module will also show the Target Framework Moniker () when there is a csproj file in the current directory.
@@ -853,7 +856,7 @@ format = "via [ $version](cyan bold) "
## Environment Variable
-`env_var` 组件显示选定的环境变量的当前值。 此组件只有满足以下条件之一时才会被显示:
+The `env_var` module displays the current value of a selected environment variable. The module will be shown only if any of the following conditions are met:
- 设置的 `variable` 是一个已存在的环境变量
- 未定义 `variable`,但定义了 `default`
@@ -988,7 +991,7 @@ asia-northeast1 = "an1"
## Git Branch
-`git_branch` 组件显示当前目录的 git 仓库的活动分支。
+The `git_branch` module shows the active branch of the repo in your current directory.
### 配置项
@@ -1063,7 +1066,7 @@ tag_symbol = "🔖 "
## Git State
-`git_state` 组件会显示当前目录在哪个 git 仓库中,以及正在进行的操作,例如:_REBASING_,_BISECTING_ 等。 进度信息(例如 REBASING 3/10)如果存在则也会被显示。
+The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
### 配置项
@@ -1103,7 +1106,7 @@ cherry_pick = "[🍒 PICKING](bold red)"
## Git Status
-`git_status`组件通过相应的符号显示您当前目录中 git 仓库的状态。
+The `git_status` module shows symbols representing the state of the repo in your current directory.
### 配置项
@@ -1186,7 +1189,7 @@ behind = "⇣${count}"
## Golang
-`golang` 组件显示当前安装的 Golang 版本。 By default the module will be shown if any of the following conditions are met:
+The `golang` module shows the currently installed version of Golang. By default the module will be shown if any of the following conditions are met:
- 当前目录包含 `go.mod` 文件
- 当前目录包含 `go.sum` 文件
@@ -1268,7 +1271,7 @@ format = "via [⎈ $version](bold white) "
## Hostname
-`hostname` 组件显示系统主机名。
+The `hostname` module shows the system hostname.
### 配置项
@@ -1303,7 +1306,7 @@ disabled = false
## Java
-`java` 组件显示当前安装的 Java 版本。 By default the module will be shown if any of the following conditions are met:
+The `java` module shows the currently installed version of Java. By default the module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
@@ -1341,7 +1344,13 @@ symbol = "🌟 "
## Jobs
-`jobs` 组件显示当前正在运行的任务数量。 仅当有后台任务运行时,此组件才会显示。 如果有超过 1 个作业,模块将显示正在运行的作业数量,如果配置了 `threshold` 字段,则使用它作为显示作业数量的下限。
+The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists.
+
+::: warning
+
+This module is not supported on tcsh.
+
+:::
### 配置项
@@ -1464,7 +1473,7 @@ Displays the current Kubernetes context name and, if set, the namespace from the
::: tip
-此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -1503,7 +1512,7 @@ disabled = false
## Line Break
-`line_break` 组件将提示分隔为两行。
+The `line_break` module separates the prompt into two lines.
### 配置项
@@ -1562,13 +1571,13 @@ format = "via [🌕 $version](bold blue) "
## Memory Usage
-`memory_usage` 组件显示当前系统内存和交换区使用情况。
+The `memory_usage` module shows current system memory and swap usage.
-默认情况下,如果系统交换区使用不为 0,则会显示交换区使用情况。
+By default the swap usage is displayed if the total system swap is non-zero.
::: tip
-此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -1609,7 +1618,7 @@ style = "bold dimmed green"
## Mercurial Branch
-`hg_branch` 组件显示当前目录的 hg 仓库的活动分支。
+The `hg_branch` module shows the active branch of the repo in your current directory.
### 配置项
@@ -1686,7 +1695,7 @@ symbol = "🎣 "
## Nix-shell
-`nix_shell` 组件显示 nix-shell 环境。 当处于一个 nix-shell 环境中时,此组件会被显示。
+The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
### 配置项
@@ -1724,7 +1733,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
## NodeJS
-`nodejs` 组件显示当前安装的 NodeJS 版本。 By default the module will be shown if any of the following conditions are met:
+The `nodejs` module shows the currently installed version of NodeJS. By default the module will be shown if any of the following conditions are met:
- 当前目录包含 `package.json` 文件
- The current directory contains a `.node-version` file
@@ -1737,7 +1746,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
| Option | 默认值 | 描述 |
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 |
-| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
+| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. |
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
@@ -1843,7 +1852,7 @@ symbol = "☁️ "
## Package Version
-当前目录是软件包的代码仓库时,将显示 `package` 组件,并显示软件包当前版本。 The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
+The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
- **npm** —— `npm` 软件包版本从当前目录下的 `package.json` 中得到
- **cargo** —— `cargo` 软件包的版本从当前目录下的 `Cargo.toml` 中得到
@@ -1928,7 +1937,7 @@ format = "via [🦪 $version]($style) "
## PHP
-`php` 组件显示当前安装的 PHP 版本。 By default the module will be shown if any of the following conditions are met:
+The `php` module shows the currently installed version of PHP. By default the module will be shown if any of the following conditions are met:
- 当前目录包含一个 `composer.json` 文件
- The current directory contains a `.php-version` file
@@ -2005,9 +2014,9 @@ format = "via [$symbol$version](bold white)"
## Python
-`python` 组件组件展示已经安装了的Python版本以及如果虚拟环境被激活则会显示当前Python虚拟环境
+The `python` module shows the currently installed version of Python and the current Python virtual environment if one is activated.
-如果`pyenv_version_name`被设置为`true`, 本组件将会展示pyenv版本名。 否则则显示通过`python --version`获得的版本号
+If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`.
By default the module will be shown if any of the following conditions are met:
@@ -2083,7 +2092,7 @@ detect_extensions = []
## Ruby
-By default the `ruby` module shows the currently installed version of Ruby. 此组件将在符合以下任意条件之一时显示:
+By default the `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met:
- 当前目录包含 `Gemfile` 文件
- The current directory contains a `.ruby-version` file
@@ -2122,7 +2131,7 @@ symbol = "🔺 "
## Rust
-By default the `rust` module shows the currently installed version of Rust. 此组件将在符合以下任意条件之一时显示:
+By default the `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met:
- 当前目录包含 `Cargo.toml` 文件
- 当前目录包含一个使用 `.rs` 扩展名的文件
@@ -2158,13 +2167,55 @@ By default the `rust` module shows the currently installed version of Rust. 此
format = "via [⚙️ $version](red bold)"
```
+
+## Scala
+
+The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met:
+
+- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file
+- The current directory contains a file with the `.scala` or `.sbt` extension
+- The current directory contains a directory named `.metals`
+
+### 配置项
+
+
+| Option | 默认值 | 描述 |
+| ------------------- | ---------------------------------------- | ------------------------------------------------- |
+| `format` | `"via [${symbol}(${version} )]($style)"` | 组件格式化模板。 |
+| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
+| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
+| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. |
+| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. |
+| `style` | `"red dimmed"` | 此组件的样式。 |
+| `disabled` | `false` | Disables the `scala` module. |
+
+### Variables
+
+| 字段 | 示例 | 描述 |
+| --------- | -------- | ---------------------- |
+| version | `2.13.5` | The version of `scala` |
+| symbol | | `symbol`对应值 |
+| style\* | | `style`对应值 |
+
+\*: This variable can only be used as a part of a style string
+
+### 示例
+
+```toml
+# ~/.config/starship.toml
+
+[scala]
+symbol = "🌟 "
+```
+
+
## Shell
The `shell` module shows an indicator for currently used shell.
::: tip
-此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -2178,6 +2229,7 @@ The `shell` module shows an indicator for currently used shell.
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
| `ion_indicator` | `ion` | A format string used to represent ion. |
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
+| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `format` | `$indicator` | 组件格式化模板。 |
| `disabled` | `true` | Disables the `shell` module. |
@@ -2271,7 +2323,7 @@ The `status` module displays the exit code of the previous command. The module w
::: tip
-此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -2324,7 +2376,7 @@ disabled = false
## Swift
-By default the `swift` module shows the currently installed version of Swift. 此组件将在符合以下任意条件之一时显示:
+By default the `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met:
- The current directory contains a `Package.swift` file
- The current directory contains a file with the `.swift` extension
@@ -2372,7 +2424,7 @@ By default the terraform version is not shown, since this is slow for current ve
By default the module will be shown if any of the following conditions are met:
-- 当前目录包含 `.terraform` 目录
+- The current directory contains a `.terraform` folder
- Current directory contains a file with the `.tf` or `.hcl` extensions
### 配置项
@@ -2424,7 +2476,7 @@ The `time` module shows the current **local** time. The `format` configuration v
::: tip
-此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -2466,12 +2518,12 @@ time_range = "10:00:00-14:00:00"
## Username
-The `username` module shows active user's username. 此组件将在符合以下任意条件之一时显示:
+The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
-- 当前用户是 root
-- 当前用户与登录用户不相同
-- 用户正通过 SSH 会话连接访问
-- 字段 `show_always` 被设置为 true
+- The current user is root
+- The current user isn't the same as the one that is logged in
+- The user is currently connected as an SSH session
+- The variable `show_always` is set to true
::: tip
@@ -2548,7 +2600,7 @@ format = "via [⍱ $version](bold white) "
## Zig
-By default the the `zig` module shows the currently installed version of Zig. 此组件将在符合以下任意条件之一时显示:
+By default the the `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met:
- The current directory contains a `.zig` file
diff --git a/docs/zh-CN/faq/README.md b/docs/zh-CN/faq/README.md
index ec338c93..ebb72514 100644
--- a/docs/zh-CN/faq/README.md
+++ b/docs/zh-CN/faq/README.md
@@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l)
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
```
-内置于 Starship 的 [Bash 适配](https://github.com/starship/starship/blob/master/src/init/starship.bash) 稍微复杂一些,实现了像 [命令用时统计组件](https://starship.rs/config/#Command-Duration) 这样的功能,还确保 Starship 能与之前设置的 Bash 配置相兼容。
+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.
使用以下命令了解 `starship prompt` 所能接受的所有参数:
@@ -56,6 +56,10 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
```
+## 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.
+
## 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:
diff --git a/docs/zh-CN/guide/README.md b/docs/zh-CN/guide/README.md
index b169189e..73e60e3a 100644
--- a/docs/zh-CN/guide/README.md
+++ b/docs/zh-CN/guide/README.md
@@ -2,18 +2,21 @@
+ alt="Starship – Cross-shell prompt"
+ />
+ alt="GitHub Actions workflow status"
+ />
+ alt="Crates.io version"
+ />
+ alt="加入 Discord"
+ />
+ alt="Follow @StarshipPrompt on Twitter"
+ />
@@ -42,63 +47,72 @@
>
+ alt="English"
+ />
+ alt="日本語"
+ />
+ alt="繁體中文"
+ />
+ alt="Русский"
+ />
+ alt="Deutsch"
+ />
+ alt="简体中文"
+ />
+ alt="Español"
+ />
+ alt="Français"
+ />
+ alt="Tiếng Việt"
+ />
@@ -107,7 +121,8 @@
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
alt="使用 iTerm 和 Snazz 主题的 Starship"
width="50%"
- align="right" />
+ align="right"
+ />
**轻量级、反应迅速,可定制的高颜值终端!**
@@ -229,6 +244,17 @@
eval (starship init elvish)
```
+
+ #### Tcsh
+
+ Add the following to the end of `~/.tcshrc`:
+
+ ```sh
+ # ~/.tcshrc
+
+ eval `starship init tcsh`
+ ```
+
## 🤝 贡献
我们一直在寻找贡献者!你都可以参与贡献 ** 不论你的技能如何 **。 如果您希望快速为项目作出贡献,请尝试解决 [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)。
diff --git a/docs/zh-CN/installing/README.md b/docs/zh-CN/installing/README.md
index 0426225b..82e4b0c4 100644
--- a/docs/zh-CN/installing/README.md
+++ b/docs/zh-CN/installing/README.md
@@ -8,13 +8,29 @@ To install starship, you need to do two things:
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!
-## [termux](https://termux.com)
+
+## [Chocolatey](https://chocolatey.org)
+
### 前置要求
+
+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)
+
+### 前置要求
+
```sh
pkg install getconf
```
### Installation
+
```sh
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
```
@@ -31,7 +47,29 @@ nix-env -iA nixos.starship
#### Declarative, single user, via [home-manager](home-manager)
-Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
+Enable the `programs.starship` module in your `home.nix` file, and add your settings
+
+```nix
+{
+ programs.starship = {
+ enable = true;
+ enableZshIntegration = 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
@@ -39,18 +77,8 @@ home-manager switch
#### Declarative, system-wide, with NixOS
-Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
+Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```
-
-### Modifying Init Scripts
-
-#### With Nix and home-manager, using zsh:
-
-Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
-
-```sh
-home-manager switch
-```
diff --git a/docs/zh-CN/presets/README.md b/docs/zh-CN/presets/README.md
index b97e3888..0977466d 100644
--- a/docs/zh-CN/presets/README.md
+++ b/docs/zh-CN/presets/README.md
@@ -16,7 +16,7 @@
```toml
[aws]
-symbol = " "
+symbol = " "
[conda]
symbol = " "
@@ -84,6 +84,9 @@ symbol = " "
[rust]
symbol = " "
+[scala]
+symbol = " "
+
[swift]
symbol = "ﯣ "
```
diff --git a/docs/zh-TW/README.md b/docs/zh-TW/README.md
index 10da9cda..96ccbb56 100644
--- a/docs/zh-TW/README.md
+++ b/docs/zh-TW/README.md
@@ -2,8 +2,8 @@
home: true
heroImage: /logo.svg
heroText:
-tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell!
-actionText: Get Started →
+tagline: 適合任何 shell 的最小、極速、無限客製化的提示字元!
+actionText: 馬上開始 →
actionLink: ./guide/
features:
-
@@ -17,8 +17,8 @@ features:
details: 任何些微的細節都可以隨你喜愛地客製化,讓你的提示字元可以隨你所欲地最小化或是充滿各種特色。
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
#Used for the description meta tag, for SEO
-metaTitle: "Starship: Cross-Shell Prompt"
-description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell.
+metaTitle: "Starship:跨 Shell 提示字元"
+description: Starship 是適合任何 shell 的最小、極速、高度客製化的提示字元! 顯示你需要的訊息,同時保持順暢與最小化。 有針對 Bash、Fish、ZSH、Ion 與 Powershell 的快速安裝指南。
---
@@ -33,24 +33,24 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
1. 安裝 **starship** 執行檔:
- #### Install Latest Version
+ #### 安裝最新版本
- With Shell:
+ 使用 Shell 安裝:
```sh
curl -fsSL https://starship.rs/install.sh | bash
```
- #### Install via Package Manager
+ #### 使用套件管理器安裝:
- With [Homebrew](https://brew.sh/):
+ 使用 [Homebrew](https://brew.sh/):
```sh
brew install starship
```
- With [Scoop](https://scoop.sh):
+ 使用 [Scoop](https://scoop.sh):
```powershell
scoop install starship
@@ -94,7 +94,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### 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.
+ 將以下內容放到 `Microsoft.PowerShell_profile.ps1` 的結尾。 你可以藉由在 PowerShell 查詢 `$PROFILE` 變數以取得這個檔案的位置。 一般來說檔案會出現在 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 或是在 -Nix 上的話會在 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`。
```sh
Invoke-Expression (&starship init powershell)
@@ -103,7 +103,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Ion
- Add the following to the end of `~/.config/ion/initrc`:
+ 將以下內容放到 `~/.config/ion/initrc` 的結尾:
```sh
# ~/.config/ion/initrc
@@ -113,9 +113,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Elvish
- ::: warning Only elvish v0.15 or higher is supported. :::
+ ::: warning 只有 elvish v0.15 或以上版本才有支援 :::
- Add the following to the end of `~/.elvish/rc.elv`:
+ 將以下內容放到 `~/.elvish/rc.elv` 的結尾:
```sh
# ~/.elvish/rc.elv
@@ -123,3 +123,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
eval (starship init elvish)
```
+
+ #### Tcsh
+
+ 將以下內容放到 `~/.tcshrc` 的結尾:
+
+ ```sh
+ # ~/.tcshrc
+
+ eval `starship init tcsh`
+ ```
+
diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md
index 36daff26..487e27bf 100644
--- a/docs/zh-TW/config/README.md
+++ b/docs/zh-TW/config/README.md
@@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
所有關於 Starship 的設定都在這個 [TOML](https://github.com/toml-lang/toml) 檔案內:
```toml
-# Don't print a new line at the start of the prompt
-add_newline = false
+# Inserts a blank line between shell prompts
+add_newline = true
# Replace the "❯" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character"
@@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri
For example:
- `[on](red bold)` will print a string `on` with bold text colored red.
-- `[⬢ $version](bold green)` will print a symbol `⬢` followed by the content of variable `version`, with bold text colored green.
+- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green.
#### 風格字串
@@ -146,7 +146,7 @@ format = '''
| -------------- | ---------------------------- | ----------------------------------------------------- |
| `format` | [連結](#default-prompt-format) | Configure the format of the prompt. |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
-| `add_newline` | `true` | 在提示字元前面加上換行字元。 |
+| `add_newline` | `true` | Inserts blank line between shell prompts. |
### 範例
@@ -162,7 +162,7 @@ format = """
# Wait 10 milliseconds for starship to check files under the current directory.
scan_timeout = 10
-# Disable the newline at the start of the prompt
+# Disable the blank line at the start of the prompt
add_newline = false
```
@@ -207,6 +207,7 @@ $purescript\
$python\
$ruby\
$rust\
+$scala\
$swift\
$terraform\
$vagrant\
@@ -237,15 +238,17 @@ $character"""
從 `AWS_VAULT`讀取而使用 [aws-vault](https://github.com/99designs/aws-vault) 這個設定檔
+When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
+
### 選項
-| Option | 預設 | 說明 |
-| ---------------- | ------------------------------------------------ | -------------------------- |
-| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. |
-| `symbol` | `"☁️ "` | 顯示在目前 AWS 配置之前的符號。 |
-| `region_aliases` | | 除了AWS名稱外,顯示區域別名表 |
-| `style` | `"bold yellow"` | 這個模組的風格。 |
-| `disabled` | `false` | 停用 `AWS` 模組。 |
+| Option | 預設 | 說明 |
+| ---------------- | --------------------------------------------------- | -------------------------- |
+| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. |
+| `symbol` | `"☁️ "` | 顯示在目前 AWS 配置之前的符號。 |
+| `region_aliases` | | 除了AWS名稱外,顯示區域別名表 |
+| `style` | `"bold yellow"` | 這個模組的風格。 |
+| `disabled` | `false` | 停用 `AWS` 模組。 |
### Variables
@@ -266,7 +269,7 @@ $character"""
# ~/.config/starship.toml
[aws]
-format = 'on [$symbol$profile(\($region\))]($style) '
+format = 'on [$symbol($profile )(\($region\) )]($style)'
style = "bold blue"
symbol = "🅰 "
[aws.region_aliases]
@@ -301,7 +304,7 @@ symbol = "🅰 "
## 電池
-`battery` 模組顯示電池的電量以及現在的充電狀態。 這個模組只會在裝置的電量低於 10% 的時候看見。
+The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%.
### 選項
@@ -330,7 +333,7 @@ discharging_symbol = "💀"
### 電池顯示
-`display` 設定是用來定義甚麼時候電池指示會顯示出來 (threshold),以及它長甚麼樣子 (style)。 如果沒有提供 `display`。 預設如下:
+The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. 預設如下:
```toml
[[battery.display]]
@@ -340,7 +343,7 @@ style = "bold red"
#### 選項
-`display` 選項是一個下列表格的陣列。
+The `display` option is an array of the following table.
| Option | 說明 |
| ----------- | ----------- |
@@ -364,9 +367,9 @@ style = "bold yellow"
## 字元
-`character` 模組在你的文字輸入處旁顯示一個字元 (通常是箭頭)。
+The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
-這個字元會告訴你最後的指令是成功還是失敗。 It can do this in two ways:
+The character will tell you whether the last command was successful or not. It can do this in two ways:
- changing color (`red`/`green`)
- changing shape (`❯`/`✖`)
@@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th
| Option | 預設 | 說明 |
| ------------------- | -------------------------------------- | -------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `symbol` | `"喝 "` | The symbol used before the version of cmake. |
+| `symbol` | `"△ "` | The symbol used before the version of cmake. |
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
| `detect_folders` | `[]` | Which folders should trigger this module |
@@ -453,15 +456,15 @@ The `cmake` module shows the currently installed version of CMake. By default th
## 指令持續時間
-`cmd_duration` 模組顯示最後一個指令執行所花費的時間。 這個模組只會在指令花費超過兩秒或是有設定 `min_time` 時,超過設定值時出現。
+The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
-::: warning 不要在 Bash 中設置 DEBUG trap
+::: warning Do not hook the DEBUG trap in Bash
-如果你在 `bash` 中使用 Starship,不要在執行 `eval $(starship init $0)` 之後設置 `DEBUG` trap,不然這個模組**會**壞掉。
+If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
:::
-想使用類似 preexec 功能的 Bash 使用者可以 [rcaloras 的 bash_preexec 框架](https://github.com/rcaloras/bash-preexec)。 只要在 `eval $(starship init $0)` 之前簡單地定義 `preexec_functions` 與 `precmd_functions` 兩個陣列,然後就可以照常進行。
+Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
### 選項
@@ -502,7 +505,7 @@ format = "underwent [$duration](bold yellow)"
## Conda
-如果有設定 `$CONDA_DEFAULT_ENV` 時,`conda` 模組顯示現在 conda 的環境。
+The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
::: tip
@@ -542,7 +545,7 @@ format = "[$symbol$environment](dimmed green) "
## Crystal
-`crystal` 模組顯示現在所安裝的Crystal版本 By default the module will be shown if any of the following conditions are met:
+The `crystal` module shows the currently installed version of Crystal. By default the module will be shown if any of the following conditions are met:
- 現在資料夾中含有一個 `shard.yml` 檔案
- 現在資料夾中含有一個`.cr`檔案
@@ -619,11 +622,11 @@ format = "via [🔰 $version](bold red) "
## 資料夾
-`directory` 模組顯示到現在資料夾的路徑,並裁減到前三層資料夾。 你的資料夾也會被裁減到你所在的 git 儲存庫的根目錄。
+The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in.
-如果正在使用 fish 風格的 pwd 選項,將不會隱藏被裁減的資料夾,而是會根據你在選項中設定的數字看到每一層資料夾的縮寫。
+When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option.
-例如,給定一個右列的路徑 `~/Dev/Nix/nixpkgs/pkgs` 其中 `nixpkgs` 是儲存庫的根目錄,而且該選項被設定為 `1`。 你會看到 `~/D/N/nixpkgs/pkgs`,而在這個設定之前則是 `nixpkgs/pkgs`。
+For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`.
### 選項
@@ -640,7 +643,7 @@ format = "via [🔰 $version](bold red) "
| `home_symbol` | `"~"` | The symbol indicating home directory. |
-這個模組有些進階設定選項可以控制顯示資料夾。
+This module has a few advanced configuration options that control how the directory is displayed.
| Advanced Option | 預設 | 說明 |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -717,7 +720,7 @@ format = "via [🐋 $context](blue bold)"
## Dotnet
-`dotnet` 模組顯示現在資料夾使用的 .NET Core SDK 的版本。 如果這個資料夾已經選定一個 SDK,則顯示這個 SDK 的版本。 如果沒有的話,則顯示最新安裝的 SDK 版本。
+The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK.
By default this module will only be shown in your prompt when one or more of the following files are present in the current directory:
@@ -733,7 +736,7 @@ By default this module will only be shown in your prompt when one or more of the
You'll also need the .NET Core SDK installed in order to use it correctly.
-這個模組內部是使用它自己的機制來偵測版本。 一般來說這個模組有 `dotnet --version` 的兩倍快,但是它可能會在你的 .NET 專案有不尋常的資料夾結構時顯示不正確的版本。 如果精確度比速度更重要的話,你可以藉由設定模組中的 `heuristic = false` 選項來停用這個功能。
+Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
The module will also show the Target Framework Moniker () when there is a csproj file in the current directory.
@@ -853,7 +856,7 @@ format = "via [ $version](cyan bold) "
## 環境變數
-`env_var`模組顯示一個選擇的環境變數的現在數值。 這個模組只在下列條件其中之一達到時顯示:
+The `env_var` module displays the current value of a selected environment variable. The module will be shown only if any of the following conditions are met:
- `variable` 設定選項符合一個存在的環境變數。
- 沒有設定 `variable` 選項,但是有設定 `default` 選項。
@@ -988,7 +991,7 @@ asia-northeast1 = "an1"
## Git 分支
-`git_branch` 模組顯示現在的資料夾中使用中的儲存庫的分支。
+The `git_branch` module shows the active branch of the repo in your current directory.
### 選項
@@ -1063,7 +1066,7 @@ tag_symbol = "🔖 "
## Git State
-`git_state` 模組會顯示在 git 儲存庫中的資料夾內,以及會在有作業正在進行時顯示,像是:_REBASING_、_BISECTING_ 等等。 如果有進展的資訊 (像是 REBASING 3/10),也會一併顯示出來。
+The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
### 選項
@@ -1103,7 +1106,7 @@ cherry_pick = "[🍒 PICKING](bold red)"
## Git Status
-`git_status` 模組顯示用來表示現在資料夾之中儲存庫狀態的符號。
+The `git_status` module shows symbols representing the state of the repo in your current directory.
### 選項
@@ -1186,7 +1189,7 @@ behind = "⇣${count}"
## Golang
-`golang` 模組顯示現在安裝的 Golang 版本。 By default the module will be shown if any of the following conditions are met:
+The `golang` module shows the currently installed version of Golang. By default the module will be shown if any of the following conditions are met:
- 現在資料夾中含有一個 `go.mod` 檔案
- 現在資料夾中含有一個 `go.sum` 檔案
@@ -1268,7 +1271,7 @@ format = "via [⎈ $version](bold white) "
## 主機名稱
-`hostname` 模組顯示系統的主機名稱。
+The `hostname` module shows the system hostname.
### 選項
@@ -1303,7 +1306,7 @@ disabled = false
## Java
-`java` 模組顯示現在安裝的 Java 版本。 By default the module will be shown if any of the following conditions are met:
+The `java` module shows the currently installed version of Java. By default the module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
@@ -1341,7 +1344,13 @@ symbol = "🌟 "
## 工作
-`jobs` 模組顯示現在正在執行中的工作。 這個模組只會在有背景工作正在執行時顯示。 這個模組會在工作數量超過一個,或者有設定 `threshold` 時且數量超過設定值時,顯示工作的數量。
+The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists.
+
+::: warning
+
+This module is not supported on tcsh.
+
+:::
### 選項
@@ -1464,7 +1473,7 @@ Displays the current Kubernetes context name and, if set, the namespace from the
::: tip
-這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -1503,7 +1512,7 @@ disabled = false
## 換行
-`line_break` 模組將提示字元分成兩行。
+The `line_break` module separates the prompt into two lines.
### 選項
@@ -1562,13 +1571,13 @@ format = "via [🌕 $version](bold blue) "
## 記憶體使用量
-`memory_usage` 模組顯示現在系統記憶體與 swap 的使用量。
+The `memory_usage` module shows current system memory and swap usage.
-預設 swap 使用量會在系統總 swap 使用量不為 0 時顯示出來。
+By default the swap usage is displayed if the total system swap is non-zero.
::: tip
-這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -1686,7 +1695,7 @@ symbol = "🎣 "
## Nix-shell
-`nix_shell` 模組顯示 nix-shell 環境。 這個模組會在 nix-shell 環境中顯示。
+The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
### 選項
@@ -1724,7 +1733,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
## NodeJS
-`nodejs` 模組顯示現在安裝的 NodeJS 版本。 By default the module will be shown if any of the following conditions are met:
+The `nodejs` module shows the currently installed version of NodeJS. By default the module will be shown if any of the following conditions are met:
- 現在資料夾中包含一個 `package.json` 檔案
- The current directory contains a `.node-version` file
@@ -1737,7 +1746,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
| Option | 預設 | 說明 |
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
+| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. |
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
@@ -1843,7 +1852,7 @@ symbol = "☁️ "
## 套件版本
-The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並顯示他的現在版本。 這個模組目前支援 `npm`、`cargo`、`poetry`、`composer`、`gradle`、`julia`、`mix`, 跟 `helm` 套件
+The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
- **npm** – `npm` 套件的版本是從現在資料夾中的 `package.json` 之中擷取出來的
- **cargo** – `cargo` 套件的版本是從現在資料夾中的 `Cargo.toml` 之中擷取出來的
@@ -2083,7 +2092,7 @@ detect_extensions = []
## Ruby
-By default the `ruby` module shows the currently installed version of Ruby. 這個模組在下列其中一個條件達成時顯示:
+By default the `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met:
- 目前資料夾中有一個 `Gemfile` 檔案
- The current directory contains a `.ruby-version` file
@@ -2122,7 +2131,7 @@ symbol = "🔺 "
## Rust
-By default the `rust` module shows the currently installed version of Rust. 這個模組在下列其中一個條件達成時顯示:
+By default the `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met:
- 目前資料夾中有一個 `Cargo.toml` 檔案
- 現在資料夾中包含一個檔案具有 `.rs` 副檔名
@@ -2158,13 +2167,55 @@ By default the `rust` module shows the currently installed version of Rust. 這
format = "via [⚙️ $version](red bold)"
```
+
+## Scala
+
+The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met:
+
+- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file
+- The current directory contains a file with the `.scala` or `.sbt` extension
+- The current directory contains a directory named `.metals`
+
+### 選項
+
+
+| Option | 預設 | 說明 |
+| ------------------- | ---------------------------------------- | ------------------------------------------------- |
+| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
+| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
+| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
+| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. |
+| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. |
+| `style` | `"red dimmed"` | 這個模組的風格。 |
+| `disabled` | `false` | Disables the `scala` module. |
+
+### Variables
+
+| 變數 | 範例 | 說明 |
+| --------- | -------- | ------------------------------------ |
+| version | `2.13.5` | The version of `scala` |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+\*: This variable can only be used as a part of a style string
+
+### 範例
+
+```toml
+# ~/.config/starship.toml
+
+[scala]
+symbol = "🌟 "
+```
+
+
## Shell
The `shell` module shows an indicator for currently used shell.
::: tip
-這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -2178,6 +2229,7 @@ The `shell` module shows an indicator for currently used shell.
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
| `ion_indicator` | `ion` | A format string used to represent ion. |
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
+| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `format` | `$indicator` | The format for the module. |
| `disabled` | `true` | Disables the `shell` module. |
@@ -2271,7 +2323,7 @@ The `status` module displays the exit code of the previous command. The module w
::: tip
-這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -2324,7 +2376,7 @@ disabled = false
## Swift
-By default the `swift` module shows the currently installed version of Swift. 這個模組在下列其中一個條件達成時顯示:
+By default the `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met:
- The current directory contains a `Package.swift` file
- The current directory contains a file with the `.swift` extension
@@ -2424,7 +2476,7 @@ The `time` module shows the current **local** time. The `format` configuration v
::: tip
-這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。
+This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -2466,12 +2518,12 @@ time_range = "10:00:00-14:00:00"
## Username
-The `username` module shows active user's username. 這個模組在下列其中一個條件達成時顯示:
+The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
-- 目前使用者為 root
-- 目前使用者並非登入時的使用者
-- 使用者透過 SSH session 進行連線
-- 變數 `show_always` 被設為 true
+- The current user is root
+- The current user isn't the same as the one that is logged in
+- The user is currently connected as an SSH session
+- The variable `show_always` is set to true
::: tip
@@ -2548,7 +2600,7 @@ format = "via [⍱ $version](bold white) "
## Zig
-By default the the `zig` module shows the currently installed version of Zig. 這個模組在下列其中一個條件達成時顯示:
+By default the the `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met:
- The current directory contains a `.zig` file
diff --git a/docs/zh-TW/faq/README.md b/docs/zh-TW/faq/README.md
index 9bb23bf9..d3c6d238 100644
--- a/docs/zh-TW/faq/README.md
+++ b/docs/zh-TW/faq/README.md
@@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l)
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.
+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:
@@ -56,6 +56,10 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
```
+## 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.
+
## 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:
diff --git a/docs/zh-TW/guide/README.md b/docs/zh-TW/guide/README.md
index 0f3c93ca..a5f62985 100644
--- a/docs/zh-TW/guide/README.md
+++ b/docs/zh-TW/guide/README.md
@@ -2,18 +2,21 @@
+ alt="Starship – Cross-shell prompt"
+ />
+ alt="GitHub Actions workflow status"
+ />
+ alt="Crates.io version"
+ />
+ alt="在 Discord 上聊天"
+ />
+ alt="Follow @StarshipPrompt on Twitter"
+ />
@@ -42,63 +47,72 @@
>
+ alt="English"
+ />
+ alt="日本語"
+ />
+ alt="繁體中文"
+ />
+ alt="Русский"
+ />
+ alt="Deutsch"
+ />
+ alt="简体中文"
+ />
+ alt="Español"
+ />
+ alt="Français"
+ />
+ alt="Tiếng Việt"
+ />
@@ -107,7 +121,8 @@
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
alt="Starship with iTerm2 and the Snazzy theme"
width="50%"
- align="right" />
+ align="right"
+ />
**The minimal, blazing-fast, and infinitely customizable prompt for any shell!**
@@ -157,7 +172,7 @@
```
- ##### With [Scoop](https://scoop.sh):
+ ##### 使用 [Scoop](https://scoop.sh):
```powershell
scoop install starship
@@ -201,7 +216,7 @@
#### 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.
+ 將以下內容放到 `Microsoft.PowerShell_profile.ps1` 的結尾。 你可以藉由在 PowerShell 查詢 `$PROFILE` 變數以取得這個檔案的位置。 Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
```powershell
Invoke-Expression (&starship init powershell)
@@ -229,6 +244,17 @@
eval (starship init elvish)
```
+
+ #### Tcsh
+
+ Add the following to the end of `~/.tcshrc`:
+
+ ```sh
+ # ~/.tcshrc
+
+ eval `starship init tcsh`
+ ```
+
## 🤝 貢獻
我們歡迎具有**各式各樣能力**的貢獻者! 如果你正在尋找容易加入的方法,試試看標註為「[good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)」的 issue。
diff --git a/docs/zh-TW/installing/README.md b/docs/zh-TW/installing/README.md
index f815b967..38412065 100644
--- a/docs/zh-TW/installing/README.md
+++ b/docs/zh-TW/installing/README.md
@@ -8,13 +8,29 @@ To install starship, you need to do two things:
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!
-## [termux](https://termux.com)
+
+## [Chocolatey](https://chocolatey.org)
+
### 先決要求
+
+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)
+
+### 先決要求
+
```sh
pkg install getconf
```
### Installation
+
```sh
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
```
@@ -31,7 +47,29 @@ nix-env -iA nixos.starship
#### Declarative, single user, via [home-manager](home-manager)
-Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
+Enable the `programs.starship` module in your `home.nix` file, and add your settings
+
+```nix
+{
+ programs.starship = {
+ enable = true;
+ enableZshIntegration = 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
@@ -39,18 +77,8 @@ home-manager switch
#### Declarative, system-wide, with NixOS
-Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
+Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```
-
-### Modifying Init Scripts
-
-#### With Nix and home-manager, using zsh:
-
-Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
-
-```sh
-home-manager switch
-```
diff --git a/docs/zh-TW/presets/README.md b/docs/zh-TW/presets/README.md
index a2808a2c..6692fd16 100644
--- a/docs/zh-TW/presets/README.md
+++ b/docs/zh-TW/presets/README.md
@@ -16,7 +16,7 @@ This preset doesn't change anything except for the symbols used for each module.
```toml
[aws]
-symbol = " "
+symbol = " "
[conda]
symbol = " "
@@ -84,6 +84,9 @@ symbol = " "
[rust]
symbol = " "
+[scala]
+symbol = " "
+
[swift]
symbol = "ﯣ "
```