# èšå®
::: tip
ð¥Starshipã®éçºã¯çŸåšãé²ãã§ããŸãã å€ãã®æ°ãããªãã·ã§ã³ãä»åŸã®ãªãªãŒã¹ã§å©çšå¯èœã«ãªããŸãã
:::
Starshipã®èšå®ãéå§ããã«ã¯ã`~/.config/starship.toml` ãã¡ã€ã«ãäœæããŸãã
```sh
$ 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
# 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 "â"
# Disable the package module, hiding it from the prompt completely
[package]
disabled = true
```
`STARSHIP_CONFIG` ç°å¢å€æ°ã䜿çšããŠãããã©ã«ãã®`starship.toml` ãã¡ã€ã«ã®å Žæãå€æŽã§ããŸãã
```sh
export STARSHIP_CONFIG=~/.starship
```
Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
```ps1
$ENV:STARSHIP_CONFIG = "$HOME\.starship"
```
### çšèª
**ã¢ãžã¥ãŒã«**: OSã®ã³ã³ããã¹ãæ
å ±ã«åºã¥ããŠæ
å ±ãæäŸããããã³ããå
ã®ã³ã³ããŒãã³ãã§ãã ããšãã°ãçŸåšã®ãã£ã¬ã¯ããªãNodeJSãããžã§ã¯ãã§ããå Žåããnodejsãã¢ãžã¥ãŒã«ã¯ãçŸåšã³ã³ãã¥ãŒã¿ãŒã«ã€ã³ã¹ããŒã«ãããŠããNodeJSã®ããŒãžã§ã³ã衚瀺ããŸãã
**ã»ã°ã¡ã³ã**: ã¢ãžã¥ãŒã«ãæ§æããå°ããªãµãã³ã³ããŒãã³ãã§ãã ããšãã°ããnodejsãã¢ãžã¥ãŒã«ã®ãsymbolãã»ã°ã¡ã³ãã«ã¯ãããŒãžã§ã³çªå·ã®åã«è¡šç€ºãããæåãå«ãŸããŠããŸãïŒããã©ã«ã: ⬢ïŒã
以äžã¯Node ã¢ãžã¥ãŒã«ã®è¡šçŸã§ãã 次ã®äŸã§ã¯ããã·ã³ãã«ããšãããŒãžã§ã³ãã¯ãã®äžã®ã»ã°ã¡ã³ãã§ãã ãã¹ãŠã®ã¢ãžã¥ãŒã«ã«ã¯ãããã©ã«ãã®ç«¯æ«è²ã§ããprefixãšsuffixããããŸãã
```
[prefix] [symbol] [version] [suffix]
"via " "⬢" "v10.4.1" ""
```
### ã¹ã¿ã€ã«ã®èšå®
Starshipã®ã»ãšãã©ã®ã¢ãžã¥ãŒã«ã§ã¯ã衚瀺ã¹ã¿ã€ã«ãèšå®ã§ããŸãã ããã¯ãèšå®ãæå®ããæååã§ãããšã³ããªïŒ`style`ïŒã§è¡ãããŸãã ã¹ã¿ã€ã«æååã®äŸãšãã®æ©èœã次ã«ç€ºããŸãã å®å
šãªæ§æã®è©³çŽ°ã«ã€ããŠã¯ã詳现㯠[é«åºŠãªèšå®](/advanced-config/)ãåç
§ããŠãã ãã ã
- `"fg:green bg:blue"` ã¯ãéè²ã®èæ¯ã«ç·è²ã®ããã¹ããèšå®ããŸã
- `"bg:blue fg:bright-green"` ã¯ãéè²ã®èæ¯ã«æããç·è²ã®ããã¹ããèšå®ããŸã
- `"bold fg:27"` ã¯ã [ANSIã«ã©ãŒ](https://i.stack.imgur.com/KTSQa.png) 27ã®å€ªåããã¹ããèšå®ããŸã
- `"underline bg:#bf5700"` ã¯ãçŠãããªã¬ã³ãžè²ã®èæ¯ã«äžç·ä»ãã®ããã¹ããèšå®ããŸã
- `"bold italic fg:purple"`ã¯ã玫è²ã®å€ªåæäœã®ããã¹ããèšå®ããŸã
- `""` ã¯ãã¹ãŠã®ã¹ã¿ã€ã«ãæ瀺çã«ç¡å¹ã«ããŸã
ã¹ã¿ã€ãªã³ã°ãã©ã®ããã«èŠãããã¯ã端æ«ãšãã¥ã¬ãŒã¿ã«ãã£ãŠå¶åŸ¡ãããããšã«æ³šæããŠãã ããã ããšãã°ãäžéšã®ç«¯æ«ãšãã¥ã¬ãŒã¿ã¯ããã¹ãã倪åã«ãã代ããã«è²ãæããããŸãããŸããäžéšã®ã«ã©ãŒããŒãã¯éåžžã®è²ãšæããè²ãšåãå€ã䜿çšããŸãã ãŸããæäœã®ããã¹ããååŸããã«ã¯ã端æ«ã§æäœããµããŒãããå¿
èŠããããŸãã
## ããã³ãã
ããã¯ãããã³ããå
šäœã®ãªãã·ã§ã³ã®ãªã¹ãã§ãã
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| -------------- | ----------------------- | ---------------------------------------- |
| `add_newline` | `true` | ããã³ããã®éå§åã«æ°ããè¡ãè¿œå ããŸãã |
| `prompt_order` | [link](#ããã©ã«ãã®ããã³ãã衚瀺é ) | ããã³ããã¢ãžã¥ãŒã«ãåºåããé åºãèšå®ããŸãã |
| `scan_timeout` | `30` | ãã¡ã€ã«ãã¹ãã£ã³ããéã®ã¿ã€ã ã¢ãŠãæé (milliseconds) ã§ãã |
### èšå®äŸ
```toml
# ~/.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"]
# Wait 10 milliseconds for starship to check files under the current directory.
scan_timeout = 10
```
### ããã©ã«ãã®ããã³ãã衚瀺é
ããã©ã«ãã®`prompt_order`ã¯ã空ã®å ŽåããŸãã¯`prompt_order`ãæå®ãããŠããªãå Žåã«ãããã³ããã«ã¢ãžã¥ãŒã«ã衚瀺ãããé åºãå®çŸ©ããããã«äœ¿çšãããŸãã ããã©ã«ãã¯æ¬¡ã®ãšããã§ãã
```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",
"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
`aws` ã¢ãžã¥ãŒã«ã¯çŸåšã®AWSãããã¡ã€ã«ã衚瀺ãããŸãã ãã㯠`~/.aws/config` ã«èšè¿°ãããŠãã `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` ç°å¢å€æ°ã«åºã¥ããŠããŸãã
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| ----------------- | --------------- | -------------------------------------------------------- |
| `symbol` | `"âïž "` | çŸåšã®AWSãããã¡ã€ã«ã衚瀺ããåã«è¡šç€ºãããèšå·ã§ãã |
| `displayed_items` | `all` | 衚瀺ããã¢ã€ãã ãéžæããŸãã æå®å¯èœãªå€ã¯ä»¥äžã§ãã[`all`, `profile`, `region`] |
| `region_aliases` | | AWSåã«å ããŠè¡šç€ºãããªãŒãžã§ã³ã®ãšã€ãªã¢ã¹ã§ãã |
| `style` | `"bold yellow"` | ã¢ãžã¥ãŒã«ã®ã¹ã¿ã€ã«ã§ãã |
| `disabled` | `false` | `aws`ã¢ãžã¥ãŒã«ãç¡å¹ã«ããŸãã |
### èšå®äŸ
```toml
# ~/.config/starship.toml
[aws]
style = "bold blue"
symbol = "ð
° "
displayed_items = "region"
[aws.region_aliases]
ap-southeast-2 = "au"
us-east-1 = "va"
```
## ããããªãŒ
`battery`ã¢ãžã¥ãŒã«ã¯ãããã€ã¹ã®ããããªãŒæ®éãšçŸåšã®å
é»ç¶æ
ã瀺ããŸãã ã¢ãžã¥ãŒã«ã¯ãããã€ã¹ã®ããããªãŒæ®éã10ïŒ
æªæºã®å Žåã«ã®ã¿è¡šç€ºãããŸãã
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| -------------------- | ----------------- | ------------------------- |
| `full_symbol` | `"â¢"` | ããããªãŒãæºã¿ã³ã®ãšãã«è¡šç€ºãããèšå·ã§ãã |
| `charging_symbol` | `"â¡"` | ããããªãŒã®å
é»äžã«è¡šç€ºãããèšå·ã§ãã |
| `discharging_symbol` | `"â£"` | ããããªãŒãæŸé»ããŠãããšãã«è¡šç€ºãããèšå·ã§ãã |
| `display` | [link](#ããããªãŒã®è¡šç€º) | ã¢ãžã¥ãŒã«ã®éŸå€ãšã¹ã¿ã€ã«ã衚瀺ããŸãã |
| `disabled` | `false` | `battery`ã¢ãžã¥ãŒã«ãç¡å¹ã«ããŸãã |
ããã€ãã®ãŸããªããããªãŒç¶æ
ã®ãªãã·ã§ã³ããããŸãã
| å€æ° | 説æ |
| ---------------- | ------------------------ |
| `unknown_symbol` | ããããªãŒç¶æ
ãäžæãªãšãã«è¡šç€ºãããèšå·ã§ãã |
| `empty_symbol` | ããããªãŒã空ã®ãšãã«è¡šç€ºãããèšå·ã§ãã |
ãªãã·ã§ã³ãæå®ããªãéããããããªãŒã®ç¶æ
ã`unknown`ãããã¯`empty`ã«ãªã£ãå Žåã«ã€ã³ãžã±ãŒã¿ãŒã¯é衚瀺ã«ãªããŸãã
ãã®ã¢ãžã¥ãŒã«ã¯ãã©ã®ããã«ãã£ã¬ã¯ããªã衚瀺ãããã«ã€ããŠã®é«åºŠãªãªãã·ã§ã³ãããã€ãæã£ãŠããŸãã
| å€æ° | ããã©ã«ã | 説æ |
| --------------------------- | ------ | -------------------------------------------- |
| `fish_style_pwd_dir_length` | `0` | fish shellã®pwdãã¹ããžãã¯ãé©çšãããšãã«äœ¿çšããæåæ°ã§ãã |
| `use_logical_path` | `true` | OSããã®ãã¹ã®ä»£ããã«ãã·ã§ã«(`PWD`) ã«ãã£ãŠæäŸãããè«çãã¹ã衚瀺ããŸãã |
`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`.
ããã©ã«ãã§ã¯ãã·ã¹ãã ã¹ã¯ããã®åèšããŒã以å€ã®å Žåãã¹ã¯ãã䜿çšéã衚瀺ãããŸãã
::: tip
ãã®ã¢ãžã¥ãŒã«ã¯ããã©ã«ãã§ç¡å¹ã«ãªã£ãŠããŸãã
æå¹ã«ããã«ã¯ãèšå®ãã¡ã€ã«ã§disabled`ã`false`ã«èšå®ããŸãã
:::
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| ----------------- | --------------------- | ----------------------------- |
| `show_percentage` | `false` | ã¡ã¢ãªäœ¿çšéãå²åã§è¡šç€ºããŸãã |
| `show_swap` | `true` | åèšã¹ã¯ããããŒã以å€ã®å Žåãã¹ã¯ãã䜿çšéã衚瀺ããŸãã |
| `threshold` | `75` | ãã®éŸå€ãè¶
ããªãéããã¡ã¢ãªäœ¿çšçã¯è¡šç€ºãããŸããã |
| `symbol` | `"ð "` | ã¡ã¢ãªäœ¿çšçã衚瀺ããåã«äœ¿çšãããèšå·ã§ãã |
| `separator` | `" | "` | RAMãšã¹ã¯ããã®äœ¿çšãåé¢ããèšå·ãŸãã¯ããã¹ãã§ãã |
| `style` | `"bold dimmed white"` | ã¢ãžã¥ãŒã«ã®ã¹ã¿ã€ã«ã§ãã |
| `disabled` | `true` | `memory_usage`ã¢ãžã¥ãŒã«ãç¡å¹ã«ããŸãã |
### èšå®äŸ
```toml
# ~/.config/starship.toml
[memory_usage]
disabled = false
show_percentage = true
show_swap = true
threshold = -1
symbol = " "
separator = "/"
style = "bold dimmed green"
```
## Mercurial ãã©ã³ã
` hg_branch `ã¢ãžã¥ãŒã«ã¯ãçŸåšã®ãã£ã¬ã¯ããªã«ãããªããžããªã®ã¢ã¯ãã£ããªãã©ã³ãã瀺ããŸãã
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| ------------------- | --------------- | -------------------------------------------------------------------------------------------- |
| `symbol` | `"î "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. |
| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes |
| `truncation_symbol` | `"âŠ"` | ãã©ã³ãååãæšãŠãããŠããããšã瀺ãããã®èšå·ã§ãã |
| `style` | `"bold purple"` | ã¢ãžã¥ãŒã«ã®ã¹ã¿ã€ã«ã§ãã |
| `disabled` | `true` | Disables the `hg_branch` module. |
### èšå®äŸ
```toml
# ~/.config/starship.toml
[hg_branch]
symbol = "ð± "
truncation_length = 4
truncation_symbol = ""
```
## Nix-shell
`nix_shell`ã¢ãžã¥ãŒã«ã¯ãnix-shellç°å¢ã瀺ããŠããŸãã ãã®ã¢ãžã¥ãŒã«ã¯ãnixã·ã§ã«ç°å¢å
ã«ãããšãã«è¡šç€ºãããŸãã
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| ------------ | ------------- | ------------------------------------------------- |
| `use_name` | `false` | nix-shellã®ååã衚瀺ããŸãã |
| `impure_msg` | `"impure"` | impureã¡ãã»ãŒãžãã«ã¹ã¿ãã€ãºããŸãã |
| `pure_msg` | `"pure"` | pureã¡ãã»ãŒãžãã«ã¹ã¿ãã€ãºããŸãã |
| `symbol` | `"âïž "` | The symbol used before displaying the shell name. |
| `style` | `"bold blue"` | ã¢ãžã¥ãŒã«ã®ã¹ã¿ã€ã«ã§ãã |
| `disabled` | `false` | `nix_shell`ã¢ãžã¥ãŒã«ãç¡å¹ã«ããŸãã |
### èšå®äŸ
```toml
# ~/.config/starship.toml
[nix_shell]
disabled = true
use_name = true
impure_msg = "impure shell"
pure_msg = "pure shell"
symbol = "âïž "
```
## NodeJS
`nodejs`ã¢ãžã¥ãŒã«ã¯ãçŸåšã€ã³ã¹ããŒã«ãããŠããNodeJSã®ããŒãžã§ã³ã瀺ããŸãã 次ã®æ¡ä»¶ã®ãããããæºãããããšãã¢ãžã¥ãŒã«ã衚瀺ãããŸãã
- ã«ã¬ã³ããã£ã¬ã¯ããªã«`package.json`ãã¡ã€ã«ãå«ãŸããŠãã
- The current directory contains a `.node-version` file
- ã«ã¬ã³ããã£ã¬ã¯ããªã«`node_modules`ãã£ã¬ã¯ããªãå«ãŸããŠãã
- ã«ã¬ã³ããã£ã¬ã¯ããªã«`.js`ã®æ¡åŒµåã®ãã¡ã€ã«ãå«ãŸããŠãã
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| ---------- | -------------- | ----------------------------- |
| `symbol` | `"⬢ "` | NodeJSã®ããŒãžã§ã³ã衚瀺ããåã«äœ¿çšãããèšå·ã§ãã |
| `style` | `"bold green"` | ã¢ãžã¥ãŒã«ã®ã¹ã¿ã€ã«ã§ãã |
| `disabled` | `false` | `nodejs`ã¢ãžã¥ãŒã«ãç¡å¹ã«ããŸãã |
### èšå®äŸ
```toml
# ~/.config/starship.toml
[nodejs]
symbol = "ð€ "
```
## ããã±ãŒãžã®ããŒãžã§ã³
`package`ã¢ãžã¥ãŒã«ã¯ãçŸåšã®ãã£ã¬ã¯ããªãããã±ãŒãžã®ãªããžããªã§ããå Žåã«è¡šç€ºãããçŸåšã®ããŒãžã§ã³ã衚瀺ãããŸãã The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia` and `mix` packages.
- **npm** â `npm`ããã±ãŒãžããŒãžã§ã³ã¯ãçŸåšã®ãã£ã¬ã¯ããªã«ãã`package.json`ããæœåºãããŸã
- **cargo** â `cargo`ããã±ãŒãžããŒãžã§ã³ã¯ãçŸåšã®ãã£ã¬ã¯ããªã«ãã`Cargo.toml`ããæœåºãããŸãã
- **poetry** â `poetry`ããã±ãŒãžããŒãžã§ã³ã¯ãçŸåšã®ãã£ã¬ã¯ããªã«ãã`pyproject.toml`ããæœåºãããŸã
- **composer** â `composer`ããã±ãŒãžããŒãžã§ã³ã¯ãçŸåšã®ãã£ã¬ã¯ããªã«ãã`composer.json`ããæœåºãããŸã
- **gradle** â The `gradle` package version is extracted from the `build.gradle` present
- **julia** - The package version is extracted from the `Project.toml` present
- **mix** - The `mix` package version is extracted from the `mix.exs` present
> â ïž è¡šç€ºãããããŒãžã§ã³ã¯ãããã±ãŒãžãããŒãžã£ãŒã§ã¯ãªãããœãŒã¹ã³ãŒããçŸåšã®ãã£ã¬ã¯ããªã«ããããã±ãŒãžã®ããŒãžã§ã³ã§ãã
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| ----------------- | ------------ | --------------------------------------------------------- |
| `symbol` | `"ðŠ "` | ããã±ãŒãžã®ããŒãžã§ã³ã衚瀺ããåã«äœ¿çšãããèšå·ã§ãã |
| `style` | `"bold 208"` | ã¢ãžã¥ãŒã«ã®ã¹ã¿ã€ã«ã§ãã |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
| `disabled` | `false` | `package` ã¢ãžã¥ãŒã«ãç¡å¹ã«ããŸãã |
### èšå®äŸ
```toml
# ~/.config/starship.toml
[package]
symbol = "ð "
```
## OCaml
The `ocaml` module shows the currently installed version of OCaml. 次ã®æ¡ä»¶ã®ãããããæºãããããšãã¢ãžã¥ãŒã«ã衚瀺ãããŸãã
- The current directory contains a file with `.opam` extension or `_opam` directory
- The current directory contains a `esy.lock` directory
- The current directory contains a `dune` or `dune-project` file
- The current directory contains a `jbuild` or `jbuild-ignore` file
- The current directory contains a `.merlin` file
- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| ---------- | --------------- | ------------------------------------------------------- |
| `symbol` | `"ð« "` | The symbol used before displaying the version of OCaml. |
| `style` | `"bold yellow"` | ã¢ãžã¥ãŒã«ã®ã¹ã¿ã€ã«ã§ãã |
| `disabled` | `false` | Disables the `ocaml` module. |
### èšå®äŸ
```toml
# ~/.config/starship.toml
[ocaml]
symbol = "ðª "
```
## PHP
`php`ã¢ãžã¥ãŒã«ã¯ãçŸåšã€ã³ã¹ããŒã«ãããŠããPHPã®ããŒãžã§ã³ã瀺ããŸãã 次ã®æ¡ä»¶ã®ãããããæºãããããšãã¢ãžã¥ãŒã«ã衚瀺ãããŸãã
- ã«ã¬ã³ããã£ã¬ã¯ããªã«`composer.json`ãã¡ã€ã«ãå«ãŸããŠãã
- The current directory contains a `.php-version` file
- ã«ã¬ã³ããã£ã¬ã¯ããªã«`.php`ã®æ¡åŒµåã®ãã¡ã€ã«ãå«ãŸããŠãã
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| ---------- | ------------ | -------------------------- |
| `symbol` | `"ð "` | PHPã®ããŒãžã§ã³ã衚瀺ããåã«äœ¿çšãããèšå·ã§ãã |
| `style` | `"bold 147"` | ã¢ãžã¥ãŒã«ã®ã¹ã¿ã€ã«ã§ãã |
| `disabled` | `false` | `php`ã¢ãžã¥ãŒã«ãç¡å¹ã«ããŸãã |
### èšå®äŸ
```toml
# ~/.config/starship.toml
[php]
symbol = "ð¹ "
```
## 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`.
次ã®æ¡ä»¶ã®ãããããæºãããããšãã¢ãžã¥ãŒã«ã衚瀺ãããŸãã
- ã«ã¬ã³ããã£ã¬ã¯ããªã«`.python-version`ãã¡ã€ã«ãå«ãŸããŠãã
- ã«ã¬ã³ããã£ã¬ã¯ããªã«`requirements.txt`ãã¡ã€ã«ãå«ãŸããŠãã
- ã«ã¬ã³ããã£ã¬ã¯ããªã«`pyproject.toml`ãã¡ã€ã«ãå«ãŸããŠãã
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
- ã«ã¬ã³ããã£ã¬ã¯ããªã«`Pipfile`ãã¡ã€ã«ãå«ãŸããŠãã
- ã«ã¬ã³ããã£ã¬ã¯ããªã«`tox.ini`ãã¡ã€ã«ãå«ãŸããŠãã
- ã«ã¬ã³ããã£ã¬ã¯ããªã«`setup.py`ãã¡ã€ã«ãå«ãŸããŠãã
- The current directory contains a `__init__.py` file
- ä»®æ³ç°å¢ãã¢ã¯ãã£ãã§ãã
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| -------------------- | --------------- | -------------------------------------------------------------------------- |
| `symbol` | `"ð "` | Pythonã®ããŒãžã§ã³ã衚瀺ããåã«äœ¿çšãããèšå·ã§ãã |
| `pyenv_version_name` | `false` | pyenvã䜿çšããŠPythonããŒãžã§ã³ãååŸããŸã |
| `pyenv_prefix` | `"pyenv "` | pyenvããŒãžã§ã³è¡šç€ºã®åã®prefix (ããã©ã«ãã®è¡šç€ºã¯`pyenv MY_VERSION`) ã§ã |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `style` | `"bold yellow"` | ã¢ãžã¥ãŒã«ã®ã¹ã¿ã€ã«ã§ãã |
| `disabled` | `false` | `python`ã¢ãžã¥ãŒã«ãç¡å¹ã«ããŸãã |
### èšå®äŸ
```toml
# ~/.config/starship.toml
[python]
symbol = "ðŸ "
pyenv_version_name = true
pyenv_prefix = "foo "
```
## Ruby
`ruby`ã¢ãžã¥ãŒã«ã¯ãçŸåšã€ã³ã¹ããŒã«ãããŠããRubyã®ããŒãžã§ã³ã瀺ããŸãã 次ã®æ¡ä»¶ã®ãããããæºãããããšãã¢ãžã¥ãŒã«ã衚瀺ãããŸãã
- ã«ã¬ã³ããã£ã¬ã¯ããªã«`Gemfile`ãã¡ã€ã«ãå«ãŸããŠãã
- The current directory contains a `.ruby-version` file
- ã«ã¬ã³ããã£ã¬ã¯ããªã«`.rb`ã®æ¡åŒµåã®ãã¡ã€ã«ãå«ãŸããŠãã
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| ---------- | ------------ | --------------------------- |
| `symbol` | `"ð "` | Rubyã®ããŒãžã§ã³ã衚瀺ããåã«äœ¿çšãããèšå·ã§ãã |
| `style` | `"bold red"` | ã¢ãžã¥ãŒã«ã®ã¹ã¿ã€ã«ã§ãã |
| `disabled` | `false` | `ruby`ã¢ãžã¥ãŒã«ãç¡å¹ã«ããŸãã |
### èšå®äŸ
```toml
# ~/.config/starship.toml
[ruby]
symbol = "ðº "
```
## Rust
`rust`ã¢ãžã¥ãŒã«ã«ã¯ãçŸåšã€ã³ã¹ããŒã«ãããŠããRustã®ããŒãžã§ã³ã衚瀺ãããŸãã 次ã®æ¡ä»¶ã®ãããããæºãããããšãã¢ãžã¥ãŒã«ã衚瀺ãããŸãã
- ã«ã¬ã³ããã£ã¬ã¯ããªã«`Cargo.toml`ãã¡ã€ã«ãå«ãŸããŠãã
- ã«ã¬ã³ããã£ã¬ã¯ããªã«`.rs`ã®æ¡åŒµåã®ãã¡ã€ã«ãå«ãŸããŠãã
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| ---------- | ------------ | --------------------------- |
| `symbol` | `"ðŠ "` | Rustã®ããŒãžã§ã³ã衚瀺ããåã«äœ¿çšãããèšå·ã§ãã |
| `style` | `"bold red"` | ã¢ãžã¥ãŒã«ã®ã¹ã¿ã€ã«ã§ãã |
| `disabled` | `false` | `rust`ã¢ãžã¥ãŒã«ãç¡å¹ã«ããŸãã |
### èšå®äŸ
```toml
# ~/.config/starship.toml
[rust]
symbol = "âïž "
```
## Singularity
The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set.
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| ---------- | -------------------- | ------------------------------------------------ |
| `label` | `""` | Prefix before the image name display. |
| `prefix` | `"["` | Prefix to display immediately before image name. |
| `suffix` | `"]"` | Suffix to display immediately after image name. |
| `symbol` | `""` | The symbol used before the image name. |
| `style` | `"bold dimmed blue"` | ã¢ãžã¥ãŒã«ã®ã¹ã¿ã€ã«ã§ãã |
| `disabled` | `false` | Disables the `singularity` module. |
### èšå®äŸ
```toml
# ~/.config/starship.toml
[singularity]
symbol = "ðŠ "
```
## Terraform
`terraform`ã¢ãžã¥ãŒã«ã«ã¯ãçŸåšéžæãããŠããterraformã¯ãŒã¯ã¹ããŒã¹ãšããŒãžã§ã³ã衚瀺ãããŸãã ããã©ã«ãã§ã¯ãTerraformã®ããŒãžã§ã³ã¯è¡šç€ºãããŸãããããã¯ãå€ãã®ãã©ã°ã€ã³ã䜿çšãããŠããå ŽåãTerraformã®çŸåšã®ããŒãžã§ã³ã§ã¯é
ãããã§ãã 次ã®æ¡ä»¶ã®ãããããæºãããããšãã¢ãžã¥ãŒã«ã衚瀺ãããŸãã
- ã«ã¬ã³ããã£ã¬ã¯ããªã«`.terraform`ãã©ã«ããå«ãŸããŠãã
- ã«ã¬ã³ããã£ã¬ã¯ããªã«`.tf`ã®æ¡åŒµåã®ãã¡ã€ã«ãå«ãŸããŠãã
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| -------------- | ------------ | --------------------------------------------- |
| `symbol` | `"ð "` | Terraform ã¯ãŒã¯ã¹ããŒã¹ã衚瀺ããåã«äœ¿çšãããèšå·ã§ãã |
| `show_version` | `false` | Terraformã®ããŒãžã§ã³ã衚瀺ããŸãã 倧ããªã¯ãŒã¯ã¹ããŒã¹ã§ã¯éåžžã«é
ããªããŸãã |
| `style` | `"bold 105"` | ã¢ãžã¥ãŒã«ã®ã¹ã¿ã€ã«ã§ãã |
| `disabled` | `false` | `terraform`ã¢ãžã¥ãŒã«ãç¡å¹ã«ããŸãã |
### èšå®äŸ
```toml
# ~/.config/starship.toml
[terraform]
symbol = "ððš "
```
## æå»
`time`ã¢ãžã¥ãŒã«ã¯ãçŸåšã®**çŸå°**æéã瀺ããŸãã `format`èšå®ã¯ãæéã®è¡šç€ºæ¹æ³ãå¶åŸ¡ããããã«[`chrono`](https://crates.io/crates/chrono)ã¯ã¬ãŒãã«ãã£ãŠäœ¿çšãããŸãã 䜿çšå¯èœãªãªãã·ã§ã³ã確èªããã«ã¯ã[chrono strftimeã®ããã¥ã¡ã³ã](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)ãã芧ãã ããã
::: tip
ãã®ã¢ãžã¥ãŒã«ã¯ããã©ã«ãã§ç¡å¹ã«ãªã£ãŠããŸãã æå¹ã«ããã«ã¯ãèšå®ãã¡ã€ã«ã§`disabled`ã`false`ã«èšå®ããŸãã
:::
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| ----------------- | --------------- | ------------------------------------------------------------------------------------------------- |
| `use_12hr` | `false` | 12æéã®ãã©ãŒããããæå¹ã«ããŸãã |
| `format` | ãã®è¡šã®äžãåç
§ããŠãã ãã | æå»ã®ãã©ãŒãããã«äœ¿çšããã[ã¯ãããã©ãŒãããæåå](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) ã§ãã |
| `style` | `"bold yellow"` | ã¢ãžã¥ãŒã«ã®ã¹ã¿ã€ã«ã§ãã |
| `utc_time_offset` | `"local"` | 䜿çšããUTCãªãã»ãããèšå®ããŸãã -24ãã24ãŸã§ã®éã§èšå®å¯èœã§ãã ãããŒãã30/45åã®ã¿ã€ã ãŸãŒã³ãªãã»ããã«å¯Ÿå¿ã§ããããã«ããŸãã |
| `disabled` | `true` | `time`ã¢ãžã¥ãŒã«ãç¡å¹ã«ããŸãã |
`use_12hr` ã `true` ã®å Žåã`format` ã®ããã©ã«ã㯠`"%r"` ã§ãã ãã以å€ã®å Žåãããã©ã«ãã¯`"%T"`ã§ãã `format`ãæåã§èšå®ãããšã`use_12hr`ã®èšå®ãäžæžããããŸãã
### èšå®äŸ
```toml
# ~/.config/starship.toml
[time]
disabled = false
format = "ð[ %T ]"
utc_time_offset = "-5"
```
## ãŠãŒã¶ãŒå
`username`ã¢ãžã¥ãŒã«ã«ã¯ãã¢ã¯ãã£ããªãŠãŒã¶ãŒã®ãŠãŒã¶ãŒåã衚瀺ãããŸãã 次ã®æ¡ä»¶ã®ãããããæºãããããšãã¢ãžã¥ãŒã«ã衚瀺ãããŸãã
- ã«ã¬ã³ããŠãŒã¶ãŒãroot
- ã«ã¬ã³ããŠãŒã¶ãŒãããã°ã€ã³ããŠãããŠãŒã¶ãŒãšã¯ç°ãªã
- ãŠãŒã¶ãŒãSSHã»ãã·ã§ã³ãšããŠæ¥ç¶ãããŠãã
- `show_always`å€æ°ãtrueã«èšå®ãããŠãã
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| ------------- | --------------- | ------------------------- |
| `style_root` | `"bold red"` | ãŠãŒã¶ãŒãrootã®ãšãã«äœ¿çšãããã¹ã¿ã€ã«ã§ãã |
| `style_user` | `"bold yellow"` | érootãŠãŒã¶ãŒã«äœ¿çšãããã¹ã¿ã€ã«ã§ãã |
| `show_always` | `false` | `username` ã¢ãžã¥ãŒã«ãåžžã«è¡šç€ºããŸãã |
| `disabled` | `false` | `username` ã¢ãžã¥ãŒã«ãç¡å¹ã«ããŸãã |
### èšå®äŸ
```toml
# ~/.config/starship.toml
[username]
disabled = true
```
## Zig
The `zig` module shows the currently installed version of Zig. 次ã®æ¡ä»¶ã®ãããããæºãããããšãã¢ãžã¥ãŒã«ã衚瀺ãããŸãã
- The current directory contains a `.zig` file
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| ---------- | --------------- | ----------------------------------------------------- |
| `symbol` | `"⯠"` | The symbol used before displaying the version of Zig. |
| `style` | `"bold yellow"` | ã¢ãžã¥ãŒã«ã®ã¹ã¿ã€ã«ã§ãã |
| `disabled` | `false` | Disables the `zig` module. |
### èšå®äŸ
```toml
# ~/.config/starship.toml
[zig]
symbol = "â¡ïž "
```
## Custom commands
The `custom` modules show the output of some arbitrary commands.
These modules will be shown if any of the following conditions are met:
- The current directory contains a file whose name is in `files`
- The current directory contains a directory whose name is in `directories`
- The current directory contains a file whose extension is in `extensions`
- The `when` command returns 0
::: tip
Multiple custom modules can be defined by using a `.`.
:::
::: tip
The order in which custom modules are shown can be individually set by setting `custom.foo` in `prompt_order`. By default, the `custom` module will simply show all custom modules in the order they were defined.
:::
### ãªãã·ã§ã³
| å€æ° | ããã©ã«ã | 説æ |
| ------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `command` | | The command whose output should be printed. |
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
| `shell` | | The path to the shell to use to execute the command. If unset, it will fallback to STARSHIP_SHELL and then to "sh". |
| `説æ` | `"