Invite secondaire
Traduction Bêta Non Officielle
Cette page a été traduite par PageTurner AI (bêta). Non approuvée officiellement par le projet. Vous avez trouvé une erreur ? Signaler un problème →
info
Cette fonctionnalité ne fonctionne actuellement que dans powershell, zsh et bash.
L'invite secondaire s'affiche lorsque le texte d'une commande s'étend sur plusieurs lignes. Par défaut, elle est définie sur > .
Vous pouvez utiliser les modèles Go text/template étendus avec sprig pour enrichir le texte.
Les variables d'environnement sont disponibles, comme pour la fonctionnalité console_title_template.
Configuration
Vous devez étendre ou créer un thème personnalisé avec votre remplacement d'invite secondaire. Par exemple :
- json
- yaml
- toml
{
"secondary_prompt": {
"background": "transparent",
"foreground": "#ffffff",
"template": "-> "
}
}
secondary_prompt:
background: transparent
foreground: "#ffffff"
template: "-> "
[secondary_prompt]
background = "transparent"
foreground = "#ffffff"
template = "-> "
Options
| Name | Type | Description |
|---|---|---|
background | string | color |
foreground | string | color |
template | string | a go text/template template extended with sprig utilizing the properties below - defaults to > |
Modèle (info)
| Name | Type | Description |
|---|---|---|
.Root | boolean | is the current user root/admin or not |
.Shell | string | the current shell name |
.UserName | string | the current user name |
.HostName | string | the host name |