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

* New translations README.md (Portuguese)

* New translations README.md (Spanish)

* New translations README.md (Polish)

* New translations README.md (Dutch)

* New translations README.md (Korean)

* New translations README.md (Japanese)

* New translations README.md (Italian)

* New translations README.md (German)

* New translations README.md (Arabic)

* New translations README.md (Sorani (Kurdish))

* New translations README.md (French)

* New translations README.md (Russian)

* New translations README.md (Indonesian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Vietnamese)

* New translations README.md (Chinese Traditional)

* New translations README.md (Chinese Simplified)

* New translations README.md (Turkish)

* New translations README.md (Portuguese)

* New translations README.md (Spanish)

* New translations README.md (Polish)

* New translations README.md (Dutch)

* New translations README.md (Korean)

* New translations README.md (Japanese)

* New translations README.md (Italian)

* New translations README.md (German)

* New translations README.md (Arabic)

* New translations README.md (Sorani (Kurdish))

* New translations README.md (French)

* New translations README.md (French)

* New translations README.md (French)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (French)

* New translations README.md (Russian)

* New translations README.md (Indonesian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Vietnamese)

* New translations README.md (Chinese Traditional)

* New translations README.md (Chinese Simplified)

* New translations README.md (Turkish)

* New translations README.md (Portuguese)

* New translations README.md (Spanish)

* New translations README.md (Polish)

* New translations README.md (Dutch)

* New translations README.md (Korean)

* New translations README.md (Japanese)

* New translations README.md (Italian)

* New translations README.md (German)

* New translations README.md (Arabic)

* New translations README.md (Sorani (Kurdish))

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (French)

* New translations README.md (French)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (French)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (French)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (French)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (French)

* New translations README.md (Russian)

* New translations README.md (Indonesian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Vietnamese)

* New translations README.md (Chinese Traditional)

* New translations README.md (Chinese Simplified)

* New translations README.md (Turkish)

* New translations README.md (Portuguese)

* New translations README.md (Spanish)

* New translations README.md (Polish)

* New translations README.md (Dutch)

* New translations README.md (Korean)

* New translations README.md (Japanese)

* New translations README.md (Italian)

* New translations README.md (German)

* New translations README.md (Arabic)

* New translations README.md (Sorani (Kurdish))

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (French)

* New translations README.md (Russian)

* New translations README.md (Indonesian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Vietnamese)

* New translations README.md (Chinese Traditional)

* New translations README.md (Chinese Simplified)

* New translations README.md (Turkish)

* New translations README.md (Portuguese)

* New translations README.md (Spanish)

* New translations README.md (Polish)

* New translations README.md (Dutch)

* New translations README.md (Korean)

* New translations README.md (Japanese)

* New translations README.md (Italian)

* New translations README.md (German)

* New translations README.md (Arabic)

* New translations README.md (Sorani (Kurdish))

* New translations README.md (French)

* New translations README.md (Korean)

* New translations README.md (German)

* New translations README.md (Italian)

* New translations README.md (Italian)

* New translations README.md (Japanese)

* New translations README.md (Japanese)

* New translations README.md (Korean)

* New translations README.md (Dutch)

* New translations README.md (Dutch)

* New translations README.md (Polish)

* New translations README.md (Polish)

* New translations README.md (Portuguese)

* New translations README.md (Portuguese)

* New translations README.md (Russian)

* New translations README.md (German)

* New translations README.md (Arabic)

* New translations README.md (Spanish)

* New translations README.md (Chinese Simplified)

* New translations README.md (Arabic)

* New translations README.md (German)

* New translations README.md (Italian)

* New translations README.md (Japanese)

* New translations README.md (Korean)

* New translations README.md (Dutch)

* New translations README.md (Polish)

* New translations README.md (Portuguese)

* New translations README.md (Russian)

* New translations README.md (Turkish)

* New translations README.md (Chinese Traditional)

* New translations README.md (Arabic)

* New translations README.md (Vietnamese)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Indonesian)

* New translations README.md (Sorani (Kurdish))

* New translations README.md (French)

* New translations README.md (French)

* New translations README.md (Spanish)

* New translations README.md (Spanish)

* New translations README.md (Russian)

* New translations README.md (French)

* New translations README.md (Dutch)

* New translations README.md (Spanish)

* New translations README.md (Arabic)

* New translations README.md (German)

* New translations README.md (Italian)

* New translations README.md (Japanese)

* New translations README.md (Korean)

* New translations README.md (Polish)

* New translations README.md (Portuguese)

* New translations README.md (Russian)

* New translations README.md (Turkish)

* New translations README.md (Chinese Traditional)

* New translations README.md (Vietnamese)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Indonesian)

* New translations README.md (Chinese Simplified)

* New translations README.md (Sorani (Kurdish))

* New translations README.md (Turkish)

* New translations README.md (Turkish)

* New translations README.md (Chinese Simplified)

* New translations README.md (Chinese Simplified)

* New translations README.md (Chinese Traditional)

* New translations README.md (Chinese Traditional)

* New translations README.md (Vietnamese)

* New translations README.md (Sorani (Kurdish))

* New translations README.md (Vietnamese)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Indonesian)

* New translations README.md (Indonesian)

* New translations README.md (Sorani (Kurdish))

* New translations README.md (Spanish)

* New translations README.md (Spanish)

* New translations README.md (Spanish)

* New translations README.md (Russian)

* New translations README.md (Russian)

* New translations README.md (French)

* New translations README.md (Russian)

* New translations README.md (Indonesian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Vietnamese)

* New translations README.md (Chinese Traditional)

* New translations README.md (Chinese Simplified)

* New translations README.md (Turkish)

* New translations README.md (Portuguese)

* New translations README.md (Spanish)

* New translations README.md (Polish)

* New translations README.md (Dutch)

* New translations README.md (Korean)

* New translations README.md (Japanese)

* New translations README.md (Italian)

* New translations README.md (German)

* New translations README.md (Arabic)

* New translations README.md (Sorani (Kurdish))

* New translations README.md (Chinese Simplified)

* New translations README.md (Chinese Simplified)

* New translations README.md (Chinese Simplified)

* New translations README.md (Chinese Simplified)

* New translations README.md (Chinese Simplified)

* New translations README.md (Chinese Simplified)

* New translations README.md (Chinese Simplified)

* New translations README.md (Chinese Simplified)

* New translations README.md (Chinese Simplified)

* New translations README.md (French)

* New translations README.md (Russian)

* New translations README.md (Indonesian)

* New translations README.md (Portuguese, Brazilian)

* New translations README.md (Vietnamese)

* New translations README.md (Chinese Traditional)

* New translations README.md (Chinese Simplified)

* New translations README.md (Turkish)

* New translations README.md (Portuguese)

* New translations README.md (Spanish)

* New translations README.md (Polish)

* New translations README.md (Dutch)

* New translations README.md (Korean)

* New translations README.md (Japanese)

* New translations README.md (Italian)

* New translations README.md (German)

* New translations README.md (Arabic)

* New translations README.md (Sorani (Kurdish))
This commit is contained in:
Matan Kushner
2022-01-15 17:08:31 -05:00
committed by GitHub
parent 682f49abdb
commit 6aa2bab97e
112 changed files with 4793 additions and 2765 deletions
+13 -2
View File
@@ -18,7 +18,7 @@ features:
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
#Used for the description meta tag, for SEO
metaTitle: "Starship: Cross-Shell Prompt"
description: Starship はミニマルで、非常に高速で、カスタマイズ性の高い、あらゆるシェルのためのプロンプトです! ミニマルかつ洗練された形で、あなたに必要な情報を表示します。 Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, and PowerShell.
description: Starship はミニマルで、非常に高速で、カスタマイズ性の高い、あらゆるシェルのためのプロンプトです! ミニマルかつ洗練された形で、あなたに必要な情報を表示します。 Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell.
---
<div class="center">
@@ -119,7 +119,7 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
#### Elvish
::: warning elvish v0.15以上のみサポートされています。 :::
::: warning Only elvish v0.17 or higher is supported. :::
`~/.elvish/rc.elv` の最後に以下を追記してください。
@@ -164,3 +164,14 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
execx($(starship init xonsh))
```
#### Cmd
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory:
```lua
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))()
```
+82 -26
View File
@@ -8,11 +8,35 @@ Starship は汎用性の高いシェルですが、時には特定の処理を
:::
## Bashのカスタムの事前プロンプトおよび事前実行コマンド
## Custom pre-prompt and pre-execution Commands in Cmd
Bashには、他のほとんどのシェルとは違い、正式な preexec / precmd フレームワークを持っていません。 そのため、 `bash`で完全にカスタマイズ可能なフックを提供することは困難です。 ただし、Starship はプロンプトを描画する一連の流れに、限定的に独自の関数を挿入することができます。
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements:
- 関数をプロンプトが描画される直前に実行するためには、新しい関数を定義して `starship_precmd_user_func` に割り当ててください。 例として、ロケットをプロンプトの前に表示させたければ、下記のようにしてください。
- To run a custom function right before the prompt is drawn, define a new function called `starship_preprompt_user_func`. This function receives the current prompt as a string that you can utilize. For example, to draw a rocket before the prompt, you would do
```lua
function starship_preprompt_user_func(prompt)
print("🚀")
end
load(io.popen('starship init cmd'):read("*a"))()
```
- To run a custom function right before a command is executed, define a new function called `starship_precmd_user_func`. This function receives the current commandline as a string that you can utilize. For example, to print the command that's about to be executed, you would do
```lua
function starship_precmd_user_func(line)
print("Executing: "..line)
end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Bash
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. ただし、Starship はプロンプトを描画する一連の流れに、限定的に独自の関数を挿入することができます。
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
```bash
function blastoff(){
@@ -21,13 +45,13 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- コマンドの直前に関数を実行するために、[`DEBUG` トラップの仕組み](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/)を使うことができます。 しかし、Starship を初期化する前に DEBUG シグナルをトラップ*しなければいけません*! Starship は DEBUGトラップの値を保護できますが、 starship の起動後にトラップが上書きされると、いくつかの機能は壊れてしまうでしょう。
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
```bash
function blastoff(){
echo "🚀"
}
trap blastoff DEBUG # starshipを起動する前にDEBUGをトラップする
trap blastoff DEBUG # Trap DEBUG *before* running starship
eval $(starship init bash)
```
@@ -43,11 +67,11 @@ function Invoke-Starship-PreCommand {
}
```
## ウィンドウのタイトルの変更
## Change Window Title
いくつかのシェルプロンプトはあなたのためにウィンドウのタイトルを自動的に変更します(例えば、カレントディレクトリを反映するために)。 特に Fish はデフォルトで変更を行います。 Starship はこれをしませんが、この機能を `bash` `zsh` に追加することは簡単にできます。
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
まず、ウィンドウのタイトルを変更する関数を定義してください( bash zsh も同様に)
First, define a window title change function (identical in bash and zsh):
```bash
function set_win_title(){
@@ -55,23 +79,23 @@ function set_win_title(){
}
```
タイトルをカスタマイズするために変数を利用することができます (`$USER` `$HOSTNAME` `$PWD` が一般的です)。
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
`bash` では関数を starship の precmd 関数としてセットしてください。
In `bash`, set this function to be the precmd starship function:
```bash
starship_precmd_user_func="set_win_title"
```
`zsh`では関数を `precmd_functions` の配列に追加してください。
In `zsh`, add this to the `precmd_functions` array:
```bash
precmd_functions+=(set_win_title)
```
もし結果に満足したら、永続化のためそれぞれの行をシェルの設定ファイル (`~/.bashrc` もしくは `~/.zshrc`) に追加してください。
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
たとえば、現在のディレクトリをターミナルタブのタイトルに表示したい場合は、 `~/.bashrc`または`~/.zshrc`に以下のスニペットを追加します。
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
```bash
function set_win_title(){
@@ -80,6 +104,16 @@ function set_win_title(){
starship_precmd_user_func="set_win_title"
```
For Cmd, you can change the window title using the `starship_preprompt_user_func` function.
```lua
function starship_preprompt_user_func(prompt)
console.settitle(os.getenv('USERNAME').."@"..os.getenv('COMPUTERNAME')..": "..os.getcwd())
end
load(io.popen('starship init cmd'):read("*a"))()
```
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
```powershell
@@ -91,13 +125,13 @@ function Invoke-Starship-PreCommand {
Invoke-Expression (&starship init powershell)
```
## 右プロンプトの有効化
## Enable Right Prompt
シェルによっては、入力と同じ行にレンダリングされる右プロンプトをサポートしています。 Starship では `right_format` オプションを使って右プロンプトの内容を設定できます。 `format`で使用できるモジュールはすべて`right_format`でも使用できます。 変数`$all`には、`format``right_format`で明示的に使用されていないモジュールのみが格納されます。
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
注意: 右プロンプトは入力の場所に続く単一の行です。 複数行のプロンプトで入力行の上を右寄せにするには、[fillモジュール](/config/#fill)を参照してください。
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
`right_format` は現在、次のシェルでサポートされています: elvish, fish, zsh
`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd.
### 設定例
@@ -111,16 +145,38 @@ format = """$character"""
right_format = """$all"""
```
次のようなプロンプトが生成されます:
Produces a prompt like the following:
```
▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
```
## Continuation Prompt
Some shells support a continuation prompt along with the normal prompt. This prompt is rendered instead of the normal prompt when the user has entered an incomplete statement (such as a single left parenthesis or quote).
Starship can set the continuation prompt using the `continuation_prompt` option. The default prompt is `"[∙](bright-black) "`.
Note: `continuation_prompt` should be set to a literal string without any variables.
Note: Continuation prompts are only available in the following shells:
- `bash`
- `zsh`
- `PowerShell`
### 設定例
```toml
# ~/.config/starship.toml
# A continuation prompt that displays two filled in arrows
continuation_prompt = "▶▶"
```
## スタイルの設定
スタイル文字列は空白で区切られた単語のリストです。 大文字小文字を区別しません(例えば、 `bold` `BoLd` は同じだとみなされます)。 それぞれ以下のいずれか一つが該当します。
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
- `bold`
- `italic`
@@ -132,14 +188,14 @@ right_format = """$all"""
- `<color>`
- `none`
ここで、 `<color>` は色を指定します(以下で述べます)。 現在 `fg:<color>` `<color>` は同様の動作ですが、将来変更される可能性があります。 `inverted` は背景と前景の色を交換します。 文字列中の単語の順序は関係ありません。
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
`none` トークンは、文字列中の`bg:` 指定子の一部でない場合、他のすべてのトークンをオーバーライドします。そのため、たとえば、`fg:red none fg:blue` と指定した場合、スタイルなしの文字列が作られます。 `bg:none` は背景色をデフォルトの色にセットするので、`fg:red bg:none` `red` `fg:red` と同じ意味になり、`bg:green fg:red bg:none` `fg:red` `red` と同じ意味になります。 将来 `none` を他の単語と一緒に使用することはエラーになるかもしれません。
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
色は以下のいずれか1つを指定できます。
A color specifier can be one of the following:
- 標準的なターミナルカラーの `black` `red` `green` `blue` `yellow` `purple` `cyan` `white`。 必要に応じて、より明るい色を得るために `bright-` を前につけることができます。(例えば、 `bright-white`
- `#` に続く16進数。 [RGB の16進数カラーコード](https://www.w3schools.com/colors/colors_hexadecimal.asp)を表します。
- 0-255 までの間の数字。 [8-bit ANSI カラーコード](https://i.stack.imgur.com/KTSQa.png) を表します。
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
複数の色が文字色/背景色に指定された際には、最後の指定が優先して選ばれます。
If multiple colors are specified for foreground/background, the last one in the string will take priority.
+150 -134
View File
@@ -24,18 +24,24 @@ disabled = true
`STARSHIP_CONFIG` 環境変数を使用することによって、デフォルトの設定ファイルの場所を変更できます。
```sh
export STARSHIP_CONFIG=~/.starship/config.toml
export STARSHIP_CONFIG=~/example/non/default/path/starship.toml
```
PowerShell (Windows) で同様に `$PROFILE` にこの行を追加します。
```powershell
$ENV:STARSHIP_CONFIG = "$HOME\.starship\config.toml"
$ENV:STARSHIP_CONFIG = "$HOME\example\non\default\path\starship.toml"
```
Or for Cmd (Windows) would be adding this line to your `starship.lua`:
```lua
os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\starship.toml')
```
### ロギング
デフォルトでは、Starship は警告やエラーログを `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log` という名前のファイルに出力します。このセッションキーはターミナルのインスタンスに相当します。 しかし、これは `STARSHIP_CACHE` という環境変数を使って変更できます:
By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable:
```sh
export STARSHIP_CACHE=~/.starship/cache
@@ -47,23 +53,29 @@ PowerShell (Windows) で同様に `$PROFILE` にこの行を追加します。
$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
```
Or for Cmd (Windows) would be adding this line to your `starship.lua`:
```lua
os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp')
```
### 用語
**モジュール**: OSのコンテキスト情報に基づいて情報を提供するプロンプト内のコンポーネントです。 例えば、現在のディレクトリが Node.js のプロジェクトの場合、現在コンピュータにインストールされている Node.js のバージョンが表示されます。
**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of Node.js that is currently installed on your computer, if your current directory is a Node.js project.
**変数**: モジュールが提供する情報を含むサブコンポーネントを小さくする。 例えば、"nodejs" モジュールの "version" 変数には、Node.js の現在のバージョンが含まれています。
**Variable**: Smaller sub-components that contain information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of Node.js.
慣例により、ほとんどのモジュールにはデフォルトの端末色の接頭辞("nodejs" の `via` など)と接尾辞として空のスペースがあります。
By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix.
### 文字列のフォーマット
文字列の書式は、モジュールがすべての変数を出力する書式です。 ほとんどのモジュールには、モジュールの表示形式を設定する `format` というエントリがあります。 テキスト、変数、およびテキストグループをフォーマット文字列で使用できます。
Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string.
#### 変数
変数には、 `$` 記号と、その変数の名前が続きます。 The name of a variable can only contain letters, numbers and `_`.
A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`.
例:
For example:
- `$version` は、`version` という名前の変数を持つフォーマット文字列です。
- `$git_branch$git_commit``git_branch``git_commit` という2つの変数を持つフォーマット文字列です。
@@ -71,13 +83,13 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
#### テキストグループ
テキストグループは二つの異なる部分で構成されています。
A text group is made up of two different parts.
`[]`で囲まれている最初の部分は、 [フォーマット文字列](#format-strings) です。 テキスト、変数、または入れ子になったテキストグループを追加できます。
The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it.
2 番目の部分では、 `()`で囲まれている [スタイル文字列](#style-strings) です。 This can be used to style the first part.
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part.
例:
For example:
- `[on](red bold)` は文字列 `on` に太字のテキストを赤色で表示します。
- `[⌘ $version](bold green)``⌘` 記号とその後に続く変数 `version` の値を、太字の緑色で表示します。
@@ -85,7 +97,7 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
#### スタイルの設定
Starshipのほとんどのモジュールでは、表示スタイルを設定できます。 これは、設定を指定する文字列であるエントリ(`style`)で行われます。 スタイル文字列の例とその機能を次に示します。 完全な構文の詳細については、詳細は [高度な設定](/advanced-config/)を参照してください 。
Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/).
- `"fg:green bg:blue"` は、青色の背景に緑色のテキストを設定します
- `"bg:blue fg:bright-green"` は、青色の背景に明るい緑色のテキストを設定します
@@ -94,13 +106,13 @@ Starshipのほとんどのモジュールでは、表示スタイルを設定で
- `"bold italic fg:purple"`は、紫色の太字斜体のテキストを設定します
- `""` はすべてのスタイルを明示的に無効にします
スタイリングがどのように見えるかは、端末エミュレータによって制御されることに注意してください。 たとえば、一部の端末エミュレータはテキストを太字にする代わりに色を明るくします。また、一部のカラーテーマは通常の色と明るい色と同じ値を使用します。 また、斜体のテキストを取得するには、端末で斜体をサポートする必要があります。
Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics.
#### 条件付きフォーマット設定
`(` `)` 内のすべての変数が空の場合、条件付き書式文字列はレンダリングされません。
A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty.
例:
For example:
- `(@$region)``region``None`または空だった場合表示されませんが、値がある場合は`@` に続いてregionの値が表示されます。
- `(some text)` は括弧の中に変数がないので、常に何も表示しません。
@@ -112,18 +124,18 @@ The following symbols have special usage in a format string and must be escaped:
Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`).
例えば、新しい行に `$` 記号を表示したい場合、以下の `format` の設定が等価です。
For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent:
```toml
# 基本文字列と
# with basic string
format = "\n\\$"
# 複数行の基本文字列と
# with multiline basic string
format = """
\\$"""
# リテラル文字列と
# with literal string
format = '''
\$'''
@@ -131,7 +143,7 @@ format = '''
## プロンプト
これは、プロンプト全体のオプションのリストです。
This is the list of prompt-wide configuration options.
### オプション
@@ -149,23 +161,22 @@ format = '''
```toml
# ~/.config/starship.toml
# カスタムフォーマットを利用します
# Use custom format
format = """
[┌───────────────────>](bold green)
[│](bold green)$directory$rust$package
[└─>](bold green) """
# starshipが現在のディレクトリ下のファイルをチェックするまで10ミリ秒待ちます
# Wait 10 milliseconds for starship to check files under the current directory.
scan_timeout = 10
# プロンプトの先頭の空行を無効にします
# Disable the blank line at the start of the prompt
add_newline = false
```
### デフォルトのプロンプトフォーマット
デフォルトの `format` は、空または `format` が指定されていない場合、プロンプトのフォーマットを定義するために使用されます。 デフォルトは次のとおりです。
The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown:
```toml
format = "$all"
@@ -249,11 +260,11 @@ format="$all$directory$character"
## AWS
`aws` モジュールは現在のAWSプロファイルが表示されます。 これは `~/.aws/config` に記述されている `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` 環境変数に基づいています。 This module also shows an expiration timer when using temporary credentials.
The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials.
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var.
[awsu](https://github.com/kreuzwerker/awsu) を使う場合、そのプロファイルは環境変数 `AWSU_PROFILE` から読まれます。
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var.
@@ -348,7 +359,7 @@ style = "blue bold"
## バッテリー
`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%.
### オプション
@@ -376,7 +387,7 @@ discharging_symbol = "💀 "
### バッテリーの表示
`display`オプションを使用して、バッテリーインジケーターを表示するタイミング(threshold)、どのシンボルが使われるか(symbol) と外観(style)を定義します。 `display` が提供されない場合、 デフォルトは次のとおりです。
The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown:
```toml
[[battery.display]]
@@ -384,11 +395,11 @@ threshold = 10
style = "bold red"
```
`charging_symbol``discharging_symbol`オプションのデフォルト値はそれぞれ`battery` `charging_symbol``discharging_symbol`になります。
The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option.
#### オプション
`display`オプションは、次の表の通りです。
The `display` option is an array of the following table.
| オプション | デフォルト | 説明 |
| -------------------- | ---------- | -------------------------------------------------------------------------------------- |
@@ -415,24 +426,24 @@ discharging_symbol = "💦"
## Character
`character`モジュールは、端末でテキストが入力される場所の横に文字(通常は矢印)を表示します。
The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
文字は、最後のコマンドが成功したかどうかを示します。 表し方は下記の2つです。
The character will tell you whether the last command was successful or not. It can do this in two ways:
- 色の変更 (`赤`/`緑`)
- プロンプトの表示の変更 (``/`✖`)
デフォルトでは、色だけが変更されます。 形も変えてみたい場合は[このサンプル](#with-custom-error-shape)も参考にしてください。
By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
::: warning
`error_symbol`はelvishとnu shellでサポートされていません。
`error_symbol` is not supported on nu shell.
:::
::: warning
`vicmd_symbol`はfishとzshのみでサポートされています。
`vicmd_symbol` is only supported in cmd, fish and zsh.
:::
@@ -485,7 +496,7 @@ vicmd_symbol = "[V](bold green) "
## CMake
`cmake`モジュールは、現在インストールされている[Cmake](https://cmake.org/)のバージョンを表示します。 デフォルトでは次のいずれかの条件が満たされると、モジュールがアクティブになります。
The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met:
- カレントディレクトリに `CMakeLists.txt` ファイルが含まれている
- カレントディレクトリに `CMakeCache.txt` ファイルが含まれている
@@ -515,7 +526,7 @@ vicmd_symbol = "[V](bold green) "
## COBOL / GNUCOBOL
`COBOL` モジュールは、現在インストールされているCOBOLのバージョンを表示します。 By default, the module will be shown if any of the following conditions are met:
The `cobol` module shows the currently installed version of COBOL. By default, the module will be shown if any of the following conditions are met:
- The current directory contains any files ending in `.cob` or `.COB`
- The current directory contains any files ending in `.cbl` or `.CBL`
@@ -545,15 +556,15 @@ vicmd_symbol = "[V](bold green) "
## Command Duration
`cmd_duration`モジュールは、最後のコマンドの実行にかかった時間を示します。 モジュールが表示されるのは、コマンドが2秒以上かかった場合、または`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トラップをhookしない
::: warning Do not hook the DEBUG trap in Bash
`bash`でStarshipを実行している場合、 `eval $(starship init $0)`実行した後に`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.
:::
preexecのような機能を必要とするBashユーザーは、 [rcalorasbash_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.
### オプション
@@ -569,7 +580,7 @@ preexecのような機能を必要とするBashユーザーは、 [rcalorasのba
::: tip
デスクトップ通知を表示するには、 `rust-notify` をサポートしているstarshipをビルドする必要があります。 `show_notifications``true` となっている状態で `STARSHIP_LOG=debug starship module cmd_duration -d 60000` を実行することにより、starshipが通知をサポートしているかを確認することができます。
Showing desktop notifications requires starship to be built with `notify-rust` 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`.
:::
@@ -598,7 +609,7 @@ The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) e
::: tip
Note: これは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`.
:::
@@ -634,7 +645,7 @@ format = "[$symbol$environment](dimmed green) "
## Crystal
`crystal`モジュールは、現在インストールされている[Crystal](https://crystal-lang.org/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`shard.yml`ファイルが含まれている
- カレントディレクトリに`.cr`の拡張子のファイルが含まれている
@@ -673,7 +684,7 @@ format = "via [✨ $version](bold blue) "
## Dart
`dart`モジュールは、現在インストールされている[Dart](https://dart.dev/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
The `dart` module shows the currently installed version of [Dart](https://dart.dev/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`.dart`の拡張子のファイルが含まれている
- カレントディレクトリに`.dart_tool`ディレクトリが含まれている
@@ -713,21 +724,21 @@ format = "via [🔰 $version](bold red) "
## Deno
`deno`モジュールは、現在インストールされている[Deno](https://deno.land/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`mod.ts``mod.js``deps.ts``deps.js`が含まれている
The `deno` module shows you your currently installed version of [Deno](https://deno.land/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | -------------------------------------------- | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw``major``minor``patch`です。 |
| `symbol` | `"🦕 "` | Dart のシンボルを表すフォーマット文字列 |
| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
| `style` | `"green bold"` | モジュールのスタイルです。 |
| `disabled` | `false` | `deno`モジュールを無効化します。 |
| オプション | デフォルト | 説明 |
| ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw``major``minor``patch`です。 |
| `symbol` | `"🦕 "` | Dart のシンボルを表すフォーマット文字列 |
| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["deno.json", "deno.jsonc", "mod.ts", "mod.js", "deps.ts", "deps.js"]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
| `style` | `"green bold"` | モジュールのスタイルです。 |
| `disabled` | `false` | `deno`モジュールを無効化します。 |
### 変数
@@ -748,29 +759,30 @@ format = "via [🦕 $version](green bold) "
## Directory
`directory`モジュールには、現在のディレクトリへのパスが表示され、3つの親フォルダは切り捨てられます。 ディレクトリは、現在の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`に設定されている場合を挙げます。 以前は`nixpkgs/pkgs`でしたが、`~/D/N/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`.
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `truncation_length` | `3` | 現在のディレクトリを切り捨てる親フォルダーの数です。 |
| `truncate_to_repo` | `true` | 現在いるgitリポジトリのルートに切り捨てるかどうかです。 |
| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | moduleのフォーマットです。 |
| `style` | `"bold cyan"` | モジュールのスタイルです。 |
| `disabled` | `false` | `directory`モジュールを無効にします。 |
| `read_only` | `"🔒"` | このシンボルが表示されている時、現在のディレクトリは読み取り専用です。 |
| `read_only_style` | `"red"` | 読み取り専用シンボルのスタイルです。 |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. 例: "…/" |
| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. |
| `home_symbol` | `"~"` | ホームディレクトリを示すシンボルです。 |
| オプション | デフォルト | 説明 |
| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `truncation_length` | `3` | 現在のディレクトリを切り捨てる親フォルダーの数です。 |
| `truncate_to_repo` | `true` | 現在いるgitリポジトリのルートに切り捨てるかどうかです。 |
| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | moduleのフォーマットです。 |
| `style` | `"bold cyan"` | モジュールのスタイルです。 |
| `disabled` | `false` | `directory`モジュールを無効にします。 |
| `read_only` | `"🔒"` | このシンボルが表示されている時、現在のディレクトリは読み取り専用です。 |
| `read_only_style` | `"red"` | 読み取り専用シンボルのスタイルです。 |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. 例: "…/" |
| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. |
| `home_symbol` | `"~"` | ホームディレクトリを示すシンボルです。 |
| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) |
<details>
<summary>このモジュールは、どのようにディレクトリを表示するかについての高度なオプションをいくつか持っています。</summary>
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
| Advanced Option | デフォルト | 説明 |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -847,9 +859,9 @@ format = "via [🐋 $context](blue bold)"
## Dotnet
`dotnet`モジュールはカレントディレクトリに関係する[.NET Core SDK](https://dotnet.microsoft.com/)のバージョンを表示します。 もし SDKは現在のディレクトリに固定されているのであれば、その固定されたバージョンが表示されます。 それ以外の場合、モジュール SDKの最新のインストールバージョンを示します。
The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK.
デフォルトでは、このモジュールは現在のディレクトリに以下のファイルが 存在する場合にのみプロンプトで表示されます:
By default this module will only be shown in your prompt when one or more of the following files are present in the current directory:
- `global.json`
- `project.json`
@@ -862,7 +874,7 @@ format = "via [🐋 $context](blue bold)"
You'll also need the .NET Core SDK installed in order to use it correctly.
内部的に、このモジュールは自身のバージョン検知のメカニズムを利用します。 `dotnet --version` を実行するより2倍速く実行できますが、.NET project一般的でないディレクトリlayoutの場合は間違ったバージョンが示されてしまうことがあります。 速度よりも精度が重要な場合は、次の方法でメカニズムを無効にできます。 モジュールオプションで`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 (<https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-framework-versions>) when there is a csproj file in the current directory.
@@ -985,7 +997,7 @@ format = "via [ $version](cyan bold) "
## Environment Variable
The `env_var` module displays the current value of a selected environment variables. 次の条件のいずれかが満たされると、モジュールが表示されます。
The `env_var` module displays the current value of a selected environment variables. The module will be shown only if any of the following conditions are met:
- `variable`オプションが、既存の環境変数と一致する
- `variable`オプションが定義されておらず、`default`オプションが定義されている
@@ -1084,7 +1096,7 @@ format = "via [e $version](bold red) "
## Fill
`fill` モジュールは行の余分なスペースを記号で埋めます。 一行に複数の`fill`モジュールが存在する場合、それらはスペースを均等に分割します。 これは、他のモジュールの位置合わせに便利です。
The `fill` module fills any extra space on the line with a symbol. If multiple `fill` modules are present in a line they will split the space evenly between them. This is useful for aligning other modules.
### オプション
@@ -1114,7 +1126,7 @@ AA -------------------------------------------- BB -----------------------------
## Google Cloud (`gcloud`)
`gcloud` モジュールは、 [`gcloud`](https://cloud.google.com/sdk/gcloud) CLIの現在の設定が表示されます。 これは `~/.config/gcloud/active_config` ファイルと `~/.config/gcloud/configurations/config_{CONFIG NAME}` ファイルと `CLOUDSDK_CONFIG` 環境変数に基づきます。
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
### オプション
@@ -1175,7 +1187,7 @@ asia-northeast1 = "an1"
## Git Branch
`git_branch`モジュールは、現在のディレクトリにあるリポジトリのアクティブなブランチを表示します。
The `git_branch` module shows the active branch of the repo in your current directory.
### オプション
@@ -1215,7 +1227,7 @@ truncation_symbol = ""
## Git Commit
`git_commit` モジュールは、カレントディレクトリのリポジトリの現在のコミットハッシュとタグ (もしあれば) を表示します。
The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory.
### オプション
@@ -1250,7 +1262,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.
### オプション
@@ -1294,7 +1306,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
::: tip
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled``false`に設定します。
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -1331,30 +1343,31 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
## Git Status
`git_status`モジュールは、現在のディレクトリのリポジトリの状態を表すシンボルを表示します。
The `git_status` module shows symbols representing the state of the repo in your current directory.
### オプション
| オプション | デフォルト | 説明 |
| ------------ | ----------------------------------------------- | -------------------------- |
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | `git_status` のデフォルトフォーマット |
| `conflicted` | `"="` | このブランチにはマージの競合があります。 |
| `ahead` | `"⇡"` | `ahead`のフォーマット |
| `behind` | `"⇣"` | `behind`のフォーマット |
| `diverged` | `"⇕"` | `diverged`のフォーマット |
| `up_to_date` | `""` | The format of `up_to_date` |
| `untracked` | `"?"` | The format of `untracked` |
| `stashed` | `"$"` | The format of `stashed` |
| `modified` | `"!"` | The format of `modified` |
| `staged` | `"+"` | The format of `staged` |
| `renamed` | `"»"` | The format of `renamed` |
| `deleted` | `"✘"` | The format of `deleted` |
| `style` | `"bold red"` | モジュールのスタイルです。 |
| `disabled` | `false` | `git_status`モジュールを無効にします。 |
| オプション | デフォルト | 説明 |
| ------------------- | ----------------------------------------------- | --------------------------------- |
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | `git_status` のデフォルトフォーマット |
| `conflicted` | `"="` | このブランチにはマージの競合があります。 |
| `ahead` | `"⇡"` | `ahead`のフォーマット |
| `behind` | `"⇣"` | `behind`のフォーマット |
| `diverged` | `"⇕"` | `diverged`のフォーマット |
| `up_to_date` | `""` | The format of `up_to_date` |
| `untracked` | `"?"` | The format of `untracked` |
| `stashed` | `"$"` | The format of `stashed` |
| `modified` | `"!"` | The format of `modified` |
| `staged` | `"+"` | The format of `staged` |
| `renamed` | `"»"` | The format of `renamed` |
| `deleted` | `"✘"` | The format of `deleted` |
| `style` | `"bold red"` | モジュールのスタイルです。 |
| `ignore_submodules` | `false` | Ignore changes to submodules. |
| `disabled` | `false` | Disables the `git_status` module. |
### 変数
` format` 内では以下の変数が利用できます。
The following variables can be used in `format`:
| 変数 | 説明 |
| -------------- | ------------------------------------------------------------------------------------------------------------- |
@@ -1500,7 +1513,7 @@ format = "via [⎈ $version](bold white) "
## Hostname
`hostname`モジュールには、システムのホスト名が表示されます。
The `hostname` module shows the system hostname.
### オプション
@@ -1514,10 +1527,10 @@ format = "via [⎈ $version](bold white) "
### 変数
| 変数 | 設定例 | 説明 |
| --------- | --- | ---------------------- |
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
| 変数 | 設定例 | 説明 |
| --------- | ---------- | ---------------------------- |
| hostname | `computer` | The hostname of the computer |
| style\* | | オプション `style` の値をミラーする |
\*: この変数はスタイル文字列の一部としてのみ使用できます
@@ -1574,7 +1587,7 @@ symbol = "🌟 "
## ジョブ
`jobs`モジュールには、実行中のジョブの現在の数が表示されます。 このモジュールは、実行中のバックグラウンドジョブがある場合にのみ表示されます。 The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to *always* show the symbol and number of jobs, even if there are 0 jobs running.
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to *always* show the symbol and number of jobs, even if there are 0 jobs running.
The default functionality is:
@@ -1672,7 +1685,7 @@ symbol = "∴ "
## Kotlin
`kotlin`モジュールは、現在インストールされている[Kotlin](https://kotlinlang.org/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`.kt`もしくは`.kts`ファイルが含まれている
@@ -1713,17 +1726,17 @@ symbol = "🅺 "
# ~/.config/starship.toml
[kotlin]
# Kotlinコンパイラバイナリを使用してバージョンを確認する
# Uses the Kotlin Compiler binary to get the installed version
kotlin_binary = "kotlinc"
```
## Kubernetes
Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. namespace kubconfigで設定する必要があります。設定は、`kubectl config set-context starship-cluster --namespace astronaut` といったコマンド行えます。 `$KUBECONFIG` 環境変数が設定されている場合、このモジュールは環境変数を優先して使用し、`~/.kube/config` は使用しません。
Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
::: tip
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled``false`に設定します。
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -1785,7 +1798,7 @@ Long and automatically generated cluster names can be identified and shortened u
## Line Break
`line_break`モジュールは、プロンプトを2行に分割します。
The `line_break` module separates the prompt into two lines.
### オプション
@@ -1845,14 +1858,13 @@ format = "via [🌕 $version](bold blue) "
## メモリ使用量
`memory_usage</ 0>モジュールは、現在のシステムメモリとスワップ使用量を示します。</p>
The `memory_usage` module shows current system memory and swap usage.
<p spaces-before="0">デフォルトでは、システムスワップの合計がゼロ以外の場合、スワップ使用量が表示されます。</p>
By default the swap usage is displayed if the total system swap is non-zero.
<p spaces-before="0">::: tip</p>
::: tip
<p spaces-before="0">このモジュールはデフォルトで無効になっています。
有効にするには、設定ファイルで<code>disabled``false`に設定します。
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -1893,7 +1905,7 @@ style = "bold dimmed green"
## Mercurial Branch
` hg_branch `モジュールは、現在のディレクトリにあるリポジトリのアクティブなブランチを示します。
The `hg_branch` module shows the active branch of the repo in your current directory.
### オプション
@@ -1971,7 +1983,7 @@ symbol = "🎣 "
## Nix-shell
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. このモジュールは、nixシェル環境内にあるときに表示されます。
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment.
### オプション
@@ -2135,7 +2147,7 @@ symbol = "☁️ "
## パッケージのバージョン
`package`モジュールは、現在のディレクトリがパッケージのリポジトリである場合に表示され、現在のバージョンが表示されます。 The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` 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`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages.
- [**npm**](https://docs.npmjs.com/cli/commands/npm) The `npm` package version is extracted from the `package.json` present in the current directory
- [**Cargo**](https://doc.rust-lang.org/cargo/) The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
@@ -2152,6 +2164,7 @@ symbol = "☁️ "
- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present
- [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
- [**SBT**](https://scala-sbt.org) - The `sbt` package version is extracted from the `build.sbt` present in the current directory
- [**Dart**](https://pub.dev/) - The `dart` package version is extracted from the `pubspec.yaml` present in the current directory
> ⚠️ 表示されるバージョンは、パッケージマネージャーではなく、ソースコードが現在のディレクトリにあるパッケージのバージョンです。
@@ -2365,7 +2378,7 @@ format = "via [$symbol$version](bold white)"
The `python` module shows the currently installed version of [Python](https://www.python.org/) and the current [Python virtual environment](https://docs.python.org/tutorial/venv.html) if one is activated.
`pyenvversionname` `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`.
デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
@@ -2532,7 +2545,7 @@ symbol = "🔴 "
## Ruby
デフォルトでは`ruby`モジュールは現在インストールされている[Ruby](https://www.ruby-lang.org/)のバージョンを表示します。 次の条件のいずれかが満たされると、モジュールが表示されます:
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). 次の条件のいずれかが満たされると、モジュールが表示されます:
- カレントディレクトリに`Gemfile`ファイルが含まれている
- カレントディレクトリに `.ruby-version` ファイルが含まれている
@@ -2576,7 +2589,7 @@ symbol = "🔺 "
## Rust
デフォルトでは`rust`モジュールは現在インストールされている[Rust](https://www.rust-lang.org/)のバージョンを表示します。 次の条件のいずれかが満たされると、モジュールが表示されます:
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). 次の条件のいずれかが満たされると、モジュールが表示されます:
- カレントディレクトリに`Cargo.toml`ファイルが含まれている
- カレントディレクトリに`.rs`の拡張子のファイルが含まれている
@@ -2659,7 +2672,7 @@ 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.
:::
@@ -2675,6 +2688,8 @@ The `shell` module shows an indicator for currently used shell.
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
| `cmd_indicator` | `cmd` | A format string used to represent cmd. |
| `nu_indicator` | `nu` | A format string used to represent nu. |
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
| `format` | `"[$indicator]($style) "` | moduleのフォーマットです。 |
| `style` | `"white bold"` | モジュールのスタイルです。 |
@@ -2776,11 +2791,11 @@ 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.
:::
::: warning This module is not supported on elvish and nu shell. :::
::: warning This module is not supported on nu shell. :::
### オプション
@@ -2806,6 +2821,7 @@ The `status` module displays the exit code of the previous command. The module w
| 変数 | 設定例 | 説明 |
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
| status | `127` | The exit code of the last command |
| hex_status | `0x7F` | The exit code of the last command in hex |
| int | `127` | The exit code of the last command |
| common_meaning | `ERROR` | Meaning of the code if not a signal |
| signal_number | `9` | Signal number corresponding to the exit code, only if signalled |
@@ -2838,7 +2854,7 @@ The `sudo` module displays if sudo credentials are currently cached. The module
::: tip
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled``false`に設定します。
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -2982,11 +2998,11 @@ format = "[🏎💨 $workspace]($style) "
## Time
`time`モジュールは、現在の**現地**時間を示します。 `format`設定は、時間の表示方法を制御するために[`chrono`](https://crates.io/crates/chrono)クレートによって使用されます。 使用可能なオプションを確認するには、[chrono strftimeのドキュメント](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)をご覧ください。
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
::: tip
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled``false`に設定します。
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@@ -3002,7 +3018,7 @@ format = "[🏎💨 $workspace]($style) "
| `disabled` | `true` | `time`モジュールを無効にします。 |
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. それ以外の場合、デフォルトは`"%T"`です。 Manually setting `time_format` will override the `use_12hr` setting.
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
### 変数
@@ -3028,7 +3044,7 @@ time_range = "10:00:00-14:00:00"
## ユーザー名
`username`モジュールには、アクティブなユーザーのユーザー名が表示されます。 次の条件のいずれかが満たされると、モジュールが表示されます:
The `username` module shows active user's username. 次の条件のいずれかが満たされると、モジュールが表示されます:
- カレントユーザーがroot
- カレントユーザーが、ログインしているユーザーとは異なる
+4 -4
View File
@@ -69,13 +69,13 @@ Starship executes different commands to get information to display in the prompt
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
```sh
env STARHIP_LOG=trace starship module rust
env STARSHIP_LOG=trace starship module rust
```
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
```sh
env STARHIP_LOG=trace starship timings
env STARSHIP_LOG=trace starship timings
```
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
@@ -117,6 +117,6 @@ Starship がパッケージマネージャを使用してインストールさ
Starship をインストールスクリプトを使用してインストールした場合、次のコマンドでバイナリが削除されます。
```sh
# starshipバイナリを見つけて削除
sh -c 'rm "$(which starship)"''
# Locate and delete the starship binary
sh -c 'rm "$(command -v 'starship')"'
```
+29 -2
View File
@@ -72,6 +72,22 @@
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
alt="Français"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/id-ID/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-id.png"
alt="Bahasa Indonesia"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/it-IT/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-it.png"
alt="Italiano"
/></a>
&nbsp;
<a
@@ -252,7 +268,7 @@
#### Elvish
**警告** elvish v0.15 以上のみがサポートされています。 `~/.elvish/rc.elv` の最後に以下を追記してください。
**Warning** Only elvish v0.17 or higher is supported. `~/.elvish/rc.elv` の最後に以下を追記してください。
```sh
# ~/.elvish/rc.elv
@@ -283,9 +299,20 @@
```
#### Cmd
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory:
```lua
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))()
```
#### Nushell
**警告** これは将来的に変更されます。 nu バージョン 0.33 以降のみサポートされます。 nu 設定ファイルに以下を追加してください。 nu で`config path`を実行することで、設定ファイルの場所を確認できます。
**Warning** This will change in the future. nu バージョン 0.33 以降のみサポートされます。 Add the following to your nu config file. nu で`config path`を実行することで、設定ファイルの場所を確認できます。
```toml
startup = [
+1 -1
View File
@@ -224,7 +224,7 @@ format = '\[[$symbol($version)]($style)\]'
format = '\[[$symbol($version)]($style)\]'
[sudo]
format = '\[[as $symbol]\]
format = '\[[as $symbol]\]'
[swift]
format = '\[[$symbol($version)]($style)\]'