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/fr-FR | |
parent | 52cf48fed305ffc2006ce2a9cbc4ebe2a708e52f (diff) |
docs(i18n): New Crowdin translations (#1366)
Diffstat (limited to 'docs/fr-FR')
-rw-r--r-- | docs/fr-FR/advanced-config/README.md | 15 | ||||
-rw-r--r-- | docs/fr-FR/config/README.md | 1453 | ||||
-rw-r--r-- | docs/fr-FR/faq/README.md | 30 | ||||
-rw-r--r-- | docs/fr-FR/guide/README.md | 22 |
4 files changed, 1078 insertions, 442 deletions
diff --git a/docs/fr-FR/advanced-config/README.md b/docs/fr-FR/advanced-config/README.md index 95b6df04c..0c8eba70b 100644 --- a/docs/fr-FR/advanced-config/README.md +++ b/docs/fr-FR/advanced-config/README.md @@ -57,11 +57,20 @@ Dans `zsh`, ajoutez ceci au tableau `precmd_functions` : précmd_functions+=(set_titre_gagnant) ``` -Si vous aimez le résultat, ajoutez ces lignes à votre fichier de configuration de shell (`~/.bashrc` ou `~/.zsrhc`) pour le rendre permanent. +Si vous aimez le résultat, ajoutez ces lignes à votre fichier de configuration shell (`~/.bashrc` ou `~/.zshrc`) pour le rendre permanent. + +Par exemple, si vous voulez afficher votre répertoire actuel dans votre titre d'onglets de terminal, ajoutez le snippet suivant à votre `~/.bashrc` ou `~/.zshrc`: + +```bash +function set_win_title(){ + echo -ne "\033]0; $(basename $PWD) \007" +} +starship_precmd_user_func="set_win_title" +``` ## Chaînes de style -Les chaînes de style sont une liste de mots, séparés par des espaces blancs. Les mots ne sont pas sensibles à la casse (` bold ` et ` boLd ` sont considérés comme la même string). Chaque mot peut être l'un des suivants : +Les chaînes de style sont une liste de mots, séparés par des espaces. Les mots ne sont pas sensibles à la casse (c'est-à-dire `gras` et `GrAs` sont considérés comme le même mot). Chaque mot peut être l'un des suivants : - `bold` - `underline` @@ -71,7 +80,7 @@ Les chaînes de style sont une liste de mots, séparés par des espaces blancs. - `<color>` - `none` -où `<color>` est un spécificateur de couleur (discuté ci-dessous). `fg:<color>` et `<color>` font actuellement la même chose , bien que cela puisse changer dans le futur. L'ordre des mots dans le string n'a pas d'importance. +où `<color>` est un spécificateur de couleur (discuté ci-dessous). `fg:<color>` et `<color>` font actuellement la même chose, même si cela peut changer plus tard. L'ordre des mots dans le string n'a pas d'importance. Le jeton ` none ` remplace tous les autres jetons d'une string, de sorte que, par exemple, ` fg: red none fg: blue ` créera toujours une string sans style. Il peut devenir une erreur d'utiliser `none` en conjonction avec d'autres jetons dans le futur. diff --git a/docs/fr-FR/config/README.md b/docs/fr-FR/config/README.md index 73d57d504..017ba43fb 100644 --- a/docs/fr-FR/config/README.md +++ b/docs/fr-FR/config/README.md @@ -15,24 +15,26 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Toute la configuration de starship est effectuée dans ce fichier [TOML](https://github.com/toml-lang/toml) : ```toml -# N'écrivez pas une nouvelle ligne au début de la console +# Don't print a new line at the start of the prompt add_newline = false -# Remplacez le symbole "❯" dans la console avec "➜" -[character] # Le nom du module que nous configurons est "character" -symbol = "➜" # Le segment "symbol" est mis comme "➜" +# Replace the "❯" symbol in the prompt with "➜" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" -# Désactivez le module package, le cachant complètement de la console +# Disable the package module, hiding it from the prompt completely [package] disabled = true ``` Vous pouvez changer l'emplacement du fichier de configuration `starship.toml` grâce à la variable d'environnement `STARSHIP_CONFIG`: + ```sh export STARSHIP_CONFIG=~/.starship ``` De manière équivalente, pour Powershell (Windows), ajoutez la ligne suivante à votre `$PROFILE`: + ```ps1 $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` @@ -41,16 +43,39 @@ $ENV:STARSHIP_CONFIG = "$HOME\.starship" **Module**: Un composant dans l'invite donnant des informations basées sur des informations contextuelles à propos de votre Système d'Exploitation. Par exemple, le module "nodejs" montre la version de NodeJS qui est actuellement installée sur votre ordinateur, si votre répertoire actuel est un projet NodeJS. -**Segment**: Sous-composants plus petits qui composent un module. Par exemple, le segment "symbol" du module "nodejs" contient le caractère qui est affiché avant le numéro de version (⬢ par défaut). +**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. -Voici la représentation du module node. Dans l'exemple suivant, "symbol" et "version" sont des segments dans celui-ci. Chaque module a également un préfixe et un suffixe qui sont la couleur par défaut du terminal. +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. + +#### Variable + +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: -### Chaînes de style +- `[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. + +#### Chaînes de style La plupart des modules de Starship vous permettent de configurer leurs styles d'affichage. Cela se fait avec une entrée (généralement appelée `style`) qui est une chaîne de caractères spécifiant la configuration. Voici quelques exemples de chaînes de style avec ce qu'elles font. Pour plus de détails sur la syntaxe complète, consultez le [guide de configuration avancé](/advanced-config/). @@ -63,17 +88,56 @@ La plupart des modules de Starship vous permettent de configurer leurs styles d' Notez que ce style sera contrôlé par votre émulateur de terminal. Par exemple, certains émulateurs de terminal éclairciront les couleurs au lieu de mettre le texte en gras, et certains thèmes de couleurs utilisent les mêmes valeurs pour les couleurs normales et claires. De plus, pour obtenir du texte italique, votre terminal doit prendre en charge l'italique. +#### 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 = ''' + +\$''' +``` + ## Invite Voici la liste des options de configuration de l'invite en lui-même. ### Options -| Variable | Default | Description | -| -------------- | ----------------------------- | ------------------------------------------------------------------------- | -| `add_newline` | `true` | Ajouter une nouvelle ligne avant le début de l'invite de commande. | -| `prompt_order` | [lien](#default-prompt-order) | Configurer l'ordre dans lequel les modules s'affichent. | -| `scan_timeout` | `30` | Délai d'attente pour que starship scanne les fichiers (en millisecondes). | +| Option | Default | Description | +| -------------- | ------------------------------ | ------------------------------------------------------------------------- | +| `format` | [lien](#default-prompt-format) | Configure the format of the prompt. | +| `scan_timeout` | `30` | Délai d'attente pour que starship scanne les fichiers (en millisecondes). | ### Exemple @@ -81,62 +145,71 @@ Voici la liste des options de configuration de l'invite en lui-même. # ~/.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 ``` -### Ordre par défaut des modules +### Default Prompt Format -La valeur par défaut `prompt_order` est utilisée pour définir l'ordre selon lequel les modules sont affichés dans l'invite si aucun `prompt_order` n'est fourni ou s'il est vide. La valeur par défaut est la suivante : +The default `format` is used to define the format of the prompt, if empty or no `format` is provided. La valeur par défaut est la suivante : ```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 @@ Quand [aws-vault](https://github.com/99designs/aws-vault) est utilisé, la valeu ### Options -| Variable | Default | Description | -| ----------------- | --------------- | --------------------------------------------------------------------------- | -| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | -| `displayed_items` | `all` | Choose which item to display. Possible values: [`all`, `profile`, `region`] | -| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | Le style du module. | -| `disabled` | `false` | Désactive le module `AWS`. | +| Option | Default | Description | +| ---------------- | ---------------------------------------------------- | --------------------------------------------------------------- | +| `format` | `"on [$symbol$profile(\\($region\\))]($style) "` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | +| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | +| `style` | `"bold yellow"` | Le style du module. | +| `disabled` | `false` | Désactive le module `AWS`. | -### Exemple +### Variables + +| Variable | Exemple | Description | +| --------- | ---------------- | ------------------------------------ | +| 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 The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. ### Options -| Variable | Default | Description | -| -------------------- | ------------------------ | --------------------------------------------------- | -| `full_symbol` | `"•"` | Le symbole affiché lorsque la batterie est pleine. | -| `charging_symbol` | `"⇡"` | Le symbole affiché lorsque la batterie se charge. | -| `discharging_symbol` | `"⇣"` | Le symbole affiché lorsque la batterie se décharge. | -| `display` | [lien](#battery-display) | Affiche le seuil et le style du module. | -| `disabled` | `false` | Désactive le module `battery`. | +| Option | Default | Description | +| -------------------- | --------------------------------- | --------------------------------------------------- | +| `full_symbol` | `"•"` | Le symbole affiché lorsque la batterie est pleine. | +| `charging_symbol` | `"⇡"` | Le symbole affiché lorsque la batterie se charge. | +| `discharging_symbol` | `"⇣"` | Le symbole affiché lorsque la batterie se décharge. | +| `format` | `"[$symbol$percentage]($style) "` | The format for the module. | +| `display` | [lien](#battery-display) | Affiche le seuil et le style du module. | +| `disabled` | `false` | Désactive le module `battery`. | <details> <summary>There are also options for some uncommon battery states.</summary> @@ -244,31 +356,85 @@ style = "bold yellow" The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -The character will tell you whether the last command was successful or not. It can do this in two ways: by changing color (red/green) or by changing its shape (❯/✖). The latter will only be done if `use_symbol_for_status` is set to `true`. +The character will tell you whether the last command was successful or not. It can do this in two ways: + +- changing color (`red`/`green`) +- changing shape (`❯`/`✖`) + +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). ### Options -| Variable | Default | Description | -| ----------------------- | -------------- | ----------------------------------------------------------------------------------- | -| `symbol` | `"❯"` | The symbol used before the text input in the prompt. | -| `error_symbol` | `"✖"` | The symbol used before text input if the previous command failed. | -| `use_symbol_for_status` | `false` | Indicate error status by changing the symbol. | -| `vicmd_symbol` | `"❮"` | The symbol used before the text input in the prompt if shell is in vim normal mode. | -| `style_success` | `"bold green"` | The style used if the last command was successful. | -| `style_failure` | `"bold green"` | The style used if the last command failed. | -| `disabled` | `false` | Disables the `character` module. | +| Option | Default | Description | +| ---------------- | ------------------- | -------------------------------------------------------------------------------- | +| `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` | Disables the `character` module. | -### Exemple +### Variables + +| Variable | Exemple | Description | +| -------- | ------- | --------------------------------------------------------------------- | +| 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 + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | -------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"🛆 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | Le style du module. | +| `disabled` | `false` | Disables the `cmake` module. | + +### Variables + +| Variable | Exemple | Description | +| --------- | --------- | ------------------------------------ | +| 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 + ## Command Duration 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. @@ -283,13 +449,22 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec ### Options -| Variable | Default | Description | -| ------------------- | --------------- | ---------------------------------------------------------- | -| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | -| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | -| `prefix` | `took` | Prefix to display immediately before the command duration. | -| `style` | `"bold yellow"` | Le style du module. | -| `disabled` | `false` | Disables the `cmd_duration` module. | +| Option | Default | Description | +| ------------------- | ----------------------------- | ---------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | Le style du module. | +| `disabled` | `false` | Disables the `cmd_duration` module. | + +### Variables + +| Variable | Exemple | Description | +| --------- | -------- | --------------------------------------- | +| 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 ### Exemple @@ -298,7 +473,7 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec [cmd_duration] min_time = 500 -prefix = "underwent " +format = "underwent [$duration](bold yellow)" ``` ## Conda @@ -313,12 +488,23 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c ### Options -| Variable | Default | Description | -| ------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | -| `symbol` | `"C "` | The symbol used before the environment name. | -| `style` | `"bold green"` | Le style du module. | -| `disabled` | `false` | Disables the `conda` module. | +| Option | Default | Description | +| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | +| `symbol` | `"🅒 "` | The symbol used before the environment name. | +| `style` | `"bold green"` | Le style du module. | +| `format` | `"[$symbol$environment]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `conda` module. | + +### Variables + +| Variable | Exemple | Description | +| ----------- | ------------ | ------------------------------------ | +| 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 ### Exemple @@ -326,7 +512,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c # ~/.config/starship.toml [conda] -style = "dimmed green" +format = "[$symbol$environment](dimmed green) " ``` ## Crystal @@ -338,11 +524,22 @@ The `crystal` module shows the currently installed version of Crystal. Le module ### Options -| Variable | Default | Description | -| ---------- | -------------- | --------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `style` | `"bold green"` | Le style du module. | -| `disabled` | `false` | Disables the `crystal` module. | +| Option | Default | Description | +| ---------- | ---------------------------------- | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold green"` | Le style du module. | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `crystal` module. | + +### Variables + +| Variable | Exemple | Description | +| --------- | --------- | ------------------------------------ | +| 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 ### Exemple @@ -350,8 +547,7 @@ The `crystal` module shows the currently installed version of Crystal. Le module # ~/.config/starship.toml [crystal] -symbol = "✨ " -style = "bold blue" +format = "via [✨ $version](bold blue) " ``` ## Directory @@ -364,18 +560,20 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Options -| Variable | Default | Description | -| ------------------- | ------------- | -------------------------------------------------------------------------------- | -| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | -| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | -| `prefix` | `"in "` | Prefix to display immediately before the directory. | -| `style` | `"bold cyan"` | Le style du module. | -| `disabled` | `false` | Disables the `directory` module. | +| Variable | Default | Description | +| ------------------------ | ----------------------------------------------- | -------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$lock_symbol]($lock_style) "` | The format for the module. | +| `style` | `"bold cyan"` | Le style du module. | +| `disabled` | `false` | Disables the `directory` module. | +| `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>This module has a few advanced configuration options that control how the directory is displayed.</summary> -| Variable | Default | Description | +| Advanced Option | Default | Description | | --------------------------- | ------- | ---------------------------------------------------------------------------------------- | | `substitutions` | | A table of substitutions to be made to the path. | | `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | @@ -393,6 +591,15 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an </details> +### Variables + +| Variable | Exemple | Description | +| --------- | --------------------- | ----------------------------------- | +| 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 + ### Exemple ```toml @@ -408,12 +615,23 @@ The `docker_context` module shows the currently active [Docker context](https:// ### Options -| Variable | Default | Description | -| ----------------- | ------------- | --------------------------------------------------------------------------------------- | -| `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"` | Le style du module. | -| `disabled` | `true` | Disables the `docker_context` module. | +| Option | Default | Description | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | Le style du module. | +| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | +| `disabled` | `true` | Disables the `docker_context` module. | + +### Variables + +| Variable | Exemple | Description | +| --------- | -------------- | ------------------------------------ | +| 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 ### Exemple @@ -421,25 +639,51 @@ The `docker_context` module shows the currently active [Docker context](https:// # ~/.config/starship.toml [docker_context] -symbol = "🐋 " +format = "via [🐋 $context](blue bold)" ``` ## Dotnet The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK. -This module will only be shown in your prompt when one of the following files are present in the current directory: `global.json`, `project.json`, `*.sln`, `*.csproj`, `*.fsproj`, `*.xproj`. You'll also need the .NET Core command-line tools installed in order to use it correctly. +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. 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. + ### Options -| Variable | Default | Description | -| ----------- | ------------- | -------------------------------------------------------- | -| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. | -| `heuristic` | `true` | Use faster version detection to keep starship snappy. | -| `style` | `"bold blue"` | Le style du module. | -| `disabled` | `false` | Disables the `dotnet` module. | +| Option | Default | Description | +| ----------- | ---------------------------------------- | -------------------------------------------------------- | +| `format` | `"v[$symbol$version( 🎯 $tfm)]($style) "` | The format for the module. | +| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. | +| `heuristic` | `true` | Use faster version detection to keep starship snappy. | +| `style` | `"bold blue"` | Le style du module. | +| `disabled` | `false` | Disables the `dotnet` module. | + +### Variables + +| Variable | Exemple | |