diff options
author | Matan Kushner <hello@matchai.dev> | 2020-07-23 17:07:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-23 17:07:10 -0400 |
commit | 5f7dd0ede84f9b9b3b81c398a98ac9fc3a472ae4 (patch) | |
tree | 84ed180005249c2503ac2a26b7f86357efe8c47b /docs/ja-JP | |
parent | 52cf48fed305ffc2006ce2a9cbc4ebe2a708e52f (diff) |
docs(i18n): New Crowdin translations (#1366)
Diffstat (limited to 'docs/ja-JP')
-rw-r--r-- | docs/ja-JP/advanced-config/README.md | 11 | ||||
-rw-r--r-- | docs/ja-JP/config/README.md | 1451 | ||||
-rw-r--r-- | docs/ja-JP/faq/README.md | 30 | ||||
-rw-r--r-- | docs/ja-JP/guide/README.md | 4 |
4 files changed, 1066 insertions, 430 deletions
diff --git a/docs/ja-JP/advanced-config/README.md b/docs/ja-JP/advanced-config/README.md index ba287c65d..51f1f8579 100644 --- a/docs/ja-JP/advanced-config/README.md +++ b/docs/ja-JP/advanced-config/README.md @@ -57,7 +57,16 @@ starship_precmd_user_func="set_win_title" precmd_functions+=(set_win_title) ``` -もし結果に満足したら、永続化のためそれぞれの行を (`~/.bashrc` もしくは `~/.zsrhc`) に追加してください。 +If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. + +For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: + +```bash +function set_win_title(){ + echo -ne "\033]0; $(basename $PWD) \007" +} +starship_precmd_user_func="set_win_title" +``` ## スタイルの設定 diff --git a/docs/ja-JP/config/README.md b/docs/ja-JP/config/README.md index 1aab35a25..86ea429af 100644 --- a/docs/ja-JP/config/README.md +++ b/docs/ja-JP/config/README.md @@ -19,8 +19,8 @@ Starshipのすべての設定は、この[TOML](https://github.com/toml-lang/tom add_newline = false # Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -symbol = "➜" # The "symbol" segment is being set to "➜" +[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] @@ -28,11 +28,13 @@ disabled = true ``` `STARSHIP_CONFIG` 環境変数を使用して、デフォルトの`starship.toml` ファイルの場所を変更できます。 + ```sh export STARSHIP_CONFIG=~/.starship ``` PowerShell (Windows) で同様に `$PROFILE`にこの行を追加します。 + ```ps1 $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` @@ -41,16 +43,39 @@ $ENV:STARSHIP_CONFIG = "$HOME\.starship" **モジュール**: OSのコンテキスト情報に基づいて情報を提供するプロンプト内のコンポーネントです。 たとえば、現在のディレクトリがNodeJSプロジェクトである場合、「nodejs」モジュールは、現在コンピューターにインストールされているNodeJSのバージョンを表示します。 -**セグメント**: モジュールを構成する小さなサブコンポーネントです。 たとえば、「nodejs」モジュールの「symbol」セグメントには、バージョン番号の前に表示される文字が含まれています(デフォルト: ⬢)。 +**Variable**: Smaller sub-components that contains information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of NodeJS. -以下はNode モジュールの表現です。 次の例では、「シンボル」と「バージョン」はその中のセグメントです。 すべてのモジュールには、デフォルトの端末色であるprefixとsuffixもあります。 +By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. -``` -[prefix] [symbol] [version] [suffix] - "via " "⬢" "v10.4.1" "" -``` +### Format Strings + +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. + +#### 変数 + +A variable contains a `$` symbol followed by the name of the variable. The name of a variable only contains letters, numbers and `_`. + +For example: + +- `$version` is a format string with a variable named `version`. +- `$git_branch$git_commit` is a format string with two variables named `git_branch` and `git_commit`. +- `$git_branch $git_commit` has the two variables separated with a space. + +#### Text Group + +A text group is made up of two different parts. + +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. + +In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used style the first part. + +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. +- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green. + +#### スタイルの設定 Starshipのほとんどのモジュールでは、表示スタイルを設定できます。 これは、設定を指定する文字列であるエントリ(`style`)で行われます。 スタイル文字列の例とその機能を次に示します。 完全な構文の詳細については、詳細は [高度な設定](/advanced-config/)を参照してください 。 @@ -63,17 +88,56 @@ Starshipのほとんどのモジュールでは、表示スタイルを設定で スタイリングがどのように見えるかは、端末エミュレータによって制御されることに注意してください。 たとえば、一部の端末エミュレータはテキストを太字にする代わりに色を明るくします。また、一部のカラーテーマは通常の色と明るい色と同じ値を使用します。 また、斜体のテキストを取得するには、端末で斜体をサポートする必要があります。 +#### Conditional Format Strings + +A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. + +For example: + +- `(@$region)` will show nothing if the variable `region` is `None`, otherwise `@` followed by the value of region. +- `(some text)` will always show nothing since there are no variables wrapped in the braces. +- When `$all` is a shortcut for `\[$a$b\]`, `($all)` will show nothing only if `$a` and `$b` are both `None`. This works the same as `(\[$a$b\] )`. + +#### Escapable characters + +The following symbols have special usage in a format string. If you want to print the following symbols, you have to escape them with a backslash (`\`). + +- $ +- \\ +- [ +- ] +- ( +- ) + +Note that `toml` has [its own escape syntax](https://github.com/toml-lang/toml#user-content-string). It is recommended to use a literal string (`''`) in your config. If you want to use a basic string (`""`), pay attention to escape the backslash `\`. + +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 = ''' + +\$''' +``` + ## プロンプト これは、プロンプト全体のオプションのリストです。 ### オプション -| 変数 | デフォルト | 説明 | -| -------------- | ----------------------- | ---------------------------------------- | -| `add_newline` | `true` | プロンプトの開始前に新しい行を追加します。 | -| `prompt_order` | [link](#デフォルトのプロンプト表示順) | プロンプトモジュールを出力する順序を設定します。 | -| `scan_timeout` | `30` | ファイルをスキャンする際のタイムアウト時間 (milliseconds) です。 | +| Option | デフォルト | 説明 | +| -------------- | ------------------------------ | ---------------------------------------- | +| `format` | [link](#default-prompt-format) | Configure the format of the prompt. | +| `scan_timeout` | `30` | ファイルをスキャンする際のタイムアウト時間 (milliseconds) です。 | ### 設定例 @@ -81,62 +145,71 @@ Starshipのほとんどのモジュールでは、表示スタイルを設定で # ~/.config/starship.toml # Disable the newline at the start of the prompt -add_newline = false -# Overwrite a default_prompt_order and use custom prompt_order -prompt_order=["rust","line_break","package","line_break","character"] +format = "$all" + +# Use custom format +format = """ +[┌───────────────────>](bold green) +[│](bold green)$directory$rust$package +[└─>](bold green) """ + # Wait 10 milliseconds for starship to check files under the current directory. scan_timeout = 10 ``` -### デフォルトのプロンプト表示順 +### Default Prompt Format -デフォルトの`prompt_order`は、空の場合、または`prompt_order`が指定されていない場合に、プロンプトにモジュールが表示される順序を定義するために使用されます。 デフォルトは次のとおりです。 +The default `format` is used to define the format of the prompt, if empty or no `format` is provided. デフォルトは次のとおりです。 ```toml -prompt_order = [ - "username", - "hostname", - "kubernetes", - "directory", - "git_branch", - "git_commit", - "git_state", - "git_status", - "hg_branch", - "docker_context", - "package", - "dotnet", - "elixir", - "elm", - "erlang", - "golang", - "haskell", - "java", - "julia", - "nim", - "nodejs", - "ocaml", - "php", - "purescript", - "python", - "ruby", - "rust", - "terraform", - "zig", - "nix_shell", - "conda", - "memory_usage", - "aws", - "env_var", - "crystal", - "cmd_duration", - "custom", - "line_break", - "jobs", - "battery", - "time", - "character", -] +format = "\n$all" + +# Which is equivalent to +format = """ + +$username\ +$hostname\ +$kubernetes\ +$directory\ +$git_branch\ +$git_commit\ +$git_state\ +$git_status\ +$hg_branch\ +$docker_context\ +$package\ +$cmake\ +$dotnet\ +$elixir\ +$elm\ +$erlang\ +$golang\ +$helm\ +$java\ +$julia\ +$nim\ +$nodejs\ +$ocaml\ +$php\ +$purescript\ +$python\ +$ruby\ +$rust\ +$terraform\ +$zig\ +$nix_shell\ +$conda\ +$memory_usage\ +$aws\ +$env_var\ +$crystal\ +$cmd_duration\ +$custom\ +$line_break\ +$jobs\ +$battery\ +$time\ +$character""" ``` ## AWS @@ -147,41 +220,80 @@ prompt_order = [ ### オプション -| 変数 | デフォルト | 説明 | -| ----------------- | --------------- | -------------------------------------------------------- | -| `symbol` | `"☁️ "` | 現在のAWSプロファイルを表示する前に表示される記号です。 | -| `displayed_items` | `all` | 表示するアイテムを選択します。 指定可能な値は以下です。[`all`, `profile`, `region`] | -| `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 + +| 変数 | 設定例 | 説明 | +| --------- | ---------------- | ------------------------------------ | +| region | `ap-northeast-1` | The current AWS region | +| profile | `astronauts` | The current AWS profile | +| 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 + +### Examples + +#### Display everything ```toml # ~/.config/starship.toml [aws] +format = "on [$symbol$profile(\\($region\\))]($style) " style = "bold blue" symbol = "🅰 " -displayed_items = "region" [aws.region_aliases] ap-southeast-2 = "au" us-east-1 = "va" ``` +#### Display region + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$region]($style) " +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Display profile + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$profile]($style) " +style = "bold blue" +symbol = "🅰 " +``` + ## バッテリー `battery`モジュールは、デバイスのバッテリー残量と現在の充電状態を示します。 モジュールは、デバイスのバッテリー残量が10%未満の場合にのみ表示されます。 ### オプション -| 変数 | デフォルト | 説明 | -| -------------------- | ----------------- | ------------------------- | -| `full_symbol` | `"•"` | バッテリーが満タンのときに表示される記号です。 | -| `charging_symbol` | `"⇡"` | バッテリーの充電中に表示される記号です。 | -| `discharging_symbol` | `"⇣"` | バッテリーが放電しているときに表示される記号です。 | -| `display` | [link](#バッテリーの表示) | モジュールの閾値とスタイルを表示します。 | -| `disabled` | `false` | `battery`モジュールを無効にします。 | +| Option | デフォルト | 説明 | +| -------------------- | --------------------------------- | -------------------------- | +| `full_symbol` | `"•"` | バッテリーが満タンのときに表示される記号です。 | +| `charging_symbol` | `"⇡"` | バッテリーの充電中に表示される記号です。 | +| `discharging_symbol` | `"⇣"` | バッテリーが放電しているときに表示される記号です。 | +| `format` | `"[$symbol$percentage]($style) "` | The format for the module. | +| `display` | [link](#battery-display) | モジュールの閾値とスタイルを表示します。 | +| `disabled` | `false` | `battery`モジュールを無効にします。 | <details> <summary>いくつかのまれなバッテリー状態のオプションもあります。</summary> @@ -244,31 +356,85 @@ style = "bold yellow" `character`モジュールは、端末でテキストが入力される場所の横に文字(通常は矢印)を表示します。 -文字は、最後のコマンドが成功したかどうかを示します。 これは、色の変更(赤/緑)またはその形状の変更(❯/✖) の2つの方法で行うことができます。 後者は`use_symbol_for_status`に`true`設定されている場合にのみ行われます。 +文字は、最後のコマンドが成功したかどうかを示します。 It can do this in two ways: + +- changing color (`red`/`green`) +- changing 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). ### オプション -| 変数 | デフォルト | 説明 | -| ----------------------- | -------------- | -------------------------------------------- | -| `symbol` | `"❯"` | プロンプトでテキストを入力する前に使用される記号です。 | -| `error_symbol` | `"✖"` | 前のコマンドが失敗した場合にテキスト入力の前に使用される記号です。 | -| `use_symbol_for_status` | `false` | シンボルを変更してエラーステータスを示します。 | -| `vicmd_symbol` | `"❮"` | シェルがvimの通常モードである場合、プロンプトのテキスト入力の前に使用される記号です。 | -| `style_success` | `"bold green"` | 最後のコマンドが成功した場合に使用されるスタイルです。 | -| `style_failure` | `"bold red"` | 最後のコマンドが失敗した場合に使用されるスタイルです。 | -| `disabled` | `false` | `character`モジュールを無効にします。 | +| Option | デフォルト | 説明 | +| ---------------- | ------------------- | -------------------------------------------------------------------------------- | +| `format` | `"$symbol "` | The format string used before the text input. | +| `success_symbol` | `"[❯](bold green)"` | The format string used before the text input if the previous command succeeded. | +| `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | +| `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | +| `disabled` | `false` | `character`モジュールを無効にします。 | -### 設定例 +### Variables + +| 変数 | 設定例 | 説明 | +| ------ | --- | --------------------------------------------------------------------- | +| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | + +### Examples + +#### With custom error shape ```toml # ~/.config/starship.toml [character] -symbol = "➜" -error_symbol = "✗" -use_symbol_for_status = true +success_symbol = "[➜](bold green) " +error_symbol = "[✗](bold red) " ``` +#### Without custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[➜](bold red) " +``` + +#### With custom vim shape + +```toml +# ~/.config/starship.toml + +[character] +vicmd_symbol = "[V](bold green) " +``` + +## CMake + +The `cmake` module shows the currently installed version of CMake if: + +- The current directory contains a `CMakeLists.txt` file + +### オプション + +| Option | デフォルト | 説明 | +| ---------- | ---------------------------------- | -------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🛆 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | モジュールのスタイルです。 | +| `disabled` | `false` | Disables the `cmake` module. | + +### Variables + +| 変数 | 設定例 | 説明 | +| --------- | --------- | ------------------------------------ | +| version | `v3.17.3` | The version of cmake | +| 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 + ## コマンド実行時間 `cmd_duration`モジュールは、最後のコマンドの実行にかかった時間を示します。 モジュールが表示されるのは、コマンドが2秒以上かかった場合、または`min_time`値が存在する場合のみです。 @@ -283,13 +449,22 @@ preexecのような機能を必要とするBashユーザーは、 [rcalorasのba ### オプション -| 変数 | デフォルト | 説明 | -| ------------------- | --------------- | --------------------------- | -| `min_time` | `2_000` | 実行時間を表示する最短期間(ミリ秒単位)です。 | -| `show_milliseconds` | `false` | 実行時間の秒に加えてミリ秒を表示します。 | -| `prefix` | `took` | コマンド実行時間の直前に表示する文字列です。 | -| `style` | `"bold yellow"` | モジュールのスタイルです。 | -| `disabled` | `false` | `cmd_duration`モジュールを無効にします。 | +| Option | デフォルト | 説明 | +| ------------------- | ----------------------------- | --------------------------- | +| `min_time` | `2_000` | 実行時間を表示する最短期間(ミリ秒単位)です。 | +| `show_milliseconds` | `false` | 実行時間の秒に加えてミリ秒を表示します。 | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | モジュールのスタイルです。 | +| `disabled` | `false` | `cmd_duration`モジュールを無効にします。 | + +### Variables + +| 変数 | 設定例 | 説明 | +| --------- | -------- | --------------------------------------- | +| duration | `16m40s` | The time it took to execute the command | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string ### 設定例 @@ -298,7 +473,7 @@ preexecのような機能を必要とするBashユーザーは、 [rcalorasのba [cmd_duration] min_time = 500 -prefix = "underwent " +format = "underwent [$duration](bold yellow)" ``` ## Conda @@ -313,12 +488,23 @@ Note: これはconda自身の プロンプト修飾子 を抑制しません。` ### オプション -| 変数 | デフォルト | 説明 | -| ------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------- | -| `truncation_length` | `1` | 環境が`conda create -p [path]`で作成された場合、環境パスが切り捨てられるディレクトリ数。 `0`は切り捨てがないことを意味します。 [`directory`](#directory)もご覧ください。 | -| `symbol` | `"C "` | 環境名の直前に使用されるシンボルです。 | -| `style` | `"bold green"` | モジュールのスタイルです。 | -| `disabled` | `false` | `conda`モジュールを無効にします。 | +| Option | デフォルト | 説明 | +| ------------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | 環境が`conda create -p [path]`で作成された場合、環境パスが切り捨てられるディレクトリ数。 `0`は切り捨てがないことを意味します。 [`directory`](#directory)もご覧ください。 | +| `symbol` | `"🅒 "` | 環境名の直前に使用されるシンボルです。 | +| `style` | `"bold green"` | モジュールのスタイルです。 | +| `format` | `"[$symbol$environment]($style) "` | The format for the module. | +| `disabled` | `false` | `conda`モジュールを無効にします。 | + +### Variables + +| 変数 | 設定例 | 説明 | +| ----------- | ------------ | ------------------------------------ | +| environment | `astronauts` | The current conda environment | +| 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 ### 設定例 @@ -326,7 +512,7 @@ Note: これはconda自身の プロンプト修飾子 を抑制しません。` # ~/.config/starship.toml [conda] -style = "dimmed green" +format = "[$symbol$environment](dimmed green) " ``` ## Crystal @@ -338,11 +524,22 @@ style = "dimmed green" ### オプション -| 変数 | デフォルト | 説明 | -| ---------- | ------------ | ------------------------------ | -| `symbol` | `"🔮 "` | Crystalのバージョンを表示する前に使用される記号です。 | -| `style` | `"bold red"` | モジュールのスタイルです。 | -| `disabled` | `false` | `crystal`モジュールを無効にします。 | +| Option | デフォルト | 説明 | +| ---------- | ---------------------------------- | ------------------------------ | +| `symbol` | `"🔮 "` | Crystalのバージョンを表示する前に使用される記号です。 | +| `style` | `"bold red"` | モジュールのスタイルです。 | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | `crystal`モジュールを無効にします。 | + +### Variables + +| 変数 | 設定例 | 説明 | +| --------- | --------- | ------------------------------------ | +| version | `v0.32.1` | The version of `crystal` | +| 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 ### 設定例 @@ -350,8 +547,7 @@ style = "dimmed green" # ~/.config/starship.toml [crystal] -symbol = "✨ " -style = "bold blue" +format = "via [✨ $version](bold blue) " ``` ## ディレクトリ @@ -364,18 +560,20 @@ fishスタイルのpwdオプションを使用すると、切り捨てられた ### オプション -| 変数 | デフォルト | 説明 | -| ------------------- | ------------- | ----------------------------- | -| `truncation_length` | `3` | 現在のディレクトリを切り捨てる親フォルダーの数です。 | -| `truncate_to_repo` | `true` | 現在いるgitリポジトリのルートに切り捨てるかどうかです。 | -| `prefix` | `"in "` | ディレクトリ名の直前に表示するprefixです。 | -| `style` | `"bold cyan"` | モジュールのスタイルです。 | -| `disabled` | `false` | `directory`モジュールを無効にします。 | +| 変数 | デフォルト | 説明 | +| ------------------------ | ----------------------------------------------- | ----------------------------------------------------- | +| `truncation_length` | `3` | 現在のディレクトリを切り捨てる親フォルダーの数です。 | +| `truncate_to_repo` | `true` | 現在いるgitリポジトリのルートに切り捨てるかどうかです。 | +| `format` | `"[$path]($style)[$lock_symbol]($lock_style) "` | The format for the module. | +| `style` | `"bold cyan"` | モジュールのスタイルです。 | +| `disabled` | `false` | `directory`モジュールを無効にします。 | +| `read_only_symbol` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_symbol_style` | `"red"` | The style for the read only symbol. | <details> <summary>このモジュールは、どのようにディレクトリを表示するかについての高度なオプションをいくつか持っています。</summary> -| 変数 | デフォルト | 説明 | +| Advanced Option | デフォルト | 説明 | | --------------------------- | ------ | ------------------------------------------------ | | `substitutions` | | A table of substitutions to be made to the path. | | `fish_style_pwd_dir_length` | `0` | fish shellのpwdパスロジックを適用するときに使用する文字数です。 | @@ -393,6 +591,15 @@ fishスタイルのpwdオプションを使用すると、切り捨てられた </details> +### Variables + +| 変数 | 設定例 | 説明 | +| --------- | --------------------- | ----------------------------------- | +| path | `"D:/Projects"` | The current directory path | +| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + ### 設定例 ```toml @@ -408,12 +615,23 @@ truncation_length = 8 ### オプション -| 変数 | デフォルト | 説明 | -| ----------------- | ------------- | --------------------------------------------------------------------------------------- | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context . | -| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | -| `style` | `"bold blue"` | モジュールのスタイルです。 | -| `disabled` | `true` | `docker_context`モジュールを無効にします。 | +| Option | デフォルト | 説明 | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | モジュールのスタイルです。 | +| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | +| `disabled` | `true` | `docker_context`モジュールを無効にします。 | + +### Variables + +| 変数 | 設定例 | 説明 | +| --------- | -------------- | ------------------------------------ | +| context | `test_context` | The current docker context | +| 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 ### 設定例 @@ -421,25 +639,51 @@ truncation_length = 8 # ~/.config/starship.toml [docker_context] -symbol = "🐋 " +format = "via [🐋 $context](blue bold)" ``` ## Dotnet `dotnet` モジュールはカレントディレクトリに関係する.NET Core SDKのバージョンを表示します。 もし SDKは現在のディレクトリに固定されているのであれば、その固定されたバージョンが表示されます。 それ以外の場合、モジュール SDKの最新のインストールバージョンを示します。 -このモジュールは、カレントディレクトリに次のファイルのいずれかが存在する場合にのみプロンプトに表示されます。: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj` 正しく使用するには、.NET Coreコマンドラインツールもインストールする必要があります。 +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` +- `Directory.Build.props` +- `Directory.Build.targets` +- `Packages.props` +- `*.sln` +- `*.csproj` +- `*.fsproj` +- `*.xproj` + +You'll also need the .NET Core SDK installed in order to use it correctly. 内部的に、このモジュールは自身のバージョン検知のメカニズムを利用します。 `dotnet --version` を実行するより2倍速く実行できますが、.NET project一般的でないディレクトリlayoutの場合は間違ったバージョンが示されてしまうことがあります。 速度よりも精度が重要な場合は、次の方法でメカニズムを無効にできます。 モジュールオプションで`heuristic = false `を設定します。 +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. + ### オプション -| 変数 | デフォルト | 説明 | -| ----------- | ------------- | ------------------------------------ | -| `symbol` | `•NET "` | dotnetのバージョンを表示する前に使用される記号です。 | -| `heuristic` | `true` | より高速なバージョン検出を使用して、starshipの動作を維持します。 | -| `style` | `"bold blue"` | モジュールのスタイルです。 | -| `disabled` | `false` | `dotnet`モジュールを無効にします。 | +| Option | デフォルト | 説明 | +| ----------- | ---------------------------------------- | ------------------------------------ | +| `format` | `"v[$symbol$version( 🎯 $tfm)]($style) "` | The format for the module. | +| `symbol` | `•NET "` | dotnetのバージョンを表示する前に使用される記号です。 | +| `heuristic` | `true` | より高速なバージョン検出を使用して、starshipの動作を維持します。 | +| `style` | `"bold blue"` | モジュールのスタイルです。 | +| `disabled` | `false` | `dotnet`モジュールを無効にします。 | + +### Variables + +| 変数 | 設定例 | 説明 | +| --------- | ---------------- | ------------------------------------------------------------------ | +| version | `v3.1.201` | The version of `dotnet` sdk | +| tfm | `netstandard2.0` | The Target Framework Moniker that the current project is targeting | +| 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 ### 設定例 @@ -460,11 +704,23 @@ The `elixir` module shows the currently installed version of Elixir and Erlang/O ### オプション -| 変数 | デフォルト | 説明 | -| ---------- | --------------- | --------------------------------------------------------------- | -| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. | -| `style` | `"bold purple"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `elixir` module. | +| Option | デフォルト | 説明 | +| ---------- | ------------------------------------------------------------- | --------------------------------------------------------------- | +| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. | +| `style` | `"bold purple"` | モジュールのスタイルです。 | +| `format` | `"via [$symbol$version \\(OTP $otp_version\\)]($style) "` | The format for the module elixir. |