Aller au contenu principal

Jujutsu

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 →

Description

Afficher les informations Jujutsu lorsque vous êtes dans un dépôt Jujutsu.

Exemple de configuration

{
"type": "jujutsu",
"style": "powerline",
"powerline_symbol": "",
"foreground": "#193549",
"background": "#ffeb3b",
"options": {
"fetch_status": true,
"ignore_working_copy": false,
"fetch_ahead_counter": true,
"ahead_icon": "⇡"
}
}

Options

Récupération des informations

Comme les appels Jujutsu (jj) peuvent ralentir l'invite de commandes, nous ne récupérons pas les informations par défaut. Définissez status_formats sur true pour activer la récupération d'informations supplémentaires (et remplir le modèle).

NameTypeDefaultDescription
change_id_min_lenint0ChangeID will be at least this many characters, even if a shorter one would be unique
fetch_statusbooleanfalsefetch the local changes
ignore_working_copybooleantruedon't snapshot/update the working copy
fetch_ahead_counterbooleanfalsefetch a counter for number of changes between working copy and closest bookmark
ahead_iconstring\u21e1icon/character between bookmark and ahead counter
native_fallbackbooleanfalsewhen set to true and jj.exe is not available when inside a WSL2 shared Windows drive, we will fallback to the native jj executable to fetch data. Not all information can be displayed in this case
status_formatsmap[string]stringa key, value map allowing to override how individual status items are displayed. For example, "status_formats": { "Added": "Added: %d" } will display the added count as Added: 1 instead of +1. See the Status section for available overrides

Modèle (info)

modèle par défaut
 \uf1fa{{.ChangeID}}{{if .Working.Changed}} \uf044 {{ .Working.String }}{{ end }}

Propriétés

NameTypeDescription
.WorkingStatuschanges in the working copy (see below)
.ChangeIDstringThe shortest unique prefix of the working copy change that's at least change_id_min_len long
.ClosestBookmarksstringClosest bookmark(s) on ancestors

État

NameTypeDescription
.Modifiedintnumber of modified files
.Deletedintnumber of deleted files
.Addedintnumber of added files
.Movedintnumber of renamed files
.Changedbooleanif the status contains changes or not
.Stringstringa string representation of the changes above

Les modifications locales utilisent la syntaxe suivante :

IconDescription
~Modified
-Deleted
+Added
>Moved