Jump to content

Starship/fr: Difference between revisions

From NixOS Wiki
Nyxar77 (talk | contribs)
No edit summary
Tags: Mobile edit Mobile web edit
FuzzyBot (talk | contribs)
Updating to match new version of source page
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
est un prompt rapide, personnalisable et minimal pour n'importe quel shell. Écrit en Rust, il affiche des informations pertinentes comme le répertoire actuel, le statut Git, les versions d'exécution, et plus encore, s'adaptant au contexte avec une configuration minimale. Il prend en charge plusieurs shells, y compris '''Bash''', [https://wiki.nixos.org/wiki/Zsh '''Zsh'''], [https://wiki.nixos.org/wiki/Fish '''Fish'''], '''PowerShell''' et de nombreux autres shells, et votre configuration restera persistante sur tous ces shells, tout en étant conçue pour la rapidité et l'efficacité.
[https://starship.rs/ Starship] est un prompt rapide, personnalisable et minimal pour n'importe quel shell. Écrit en Rust, il affiche des informations pertinentes comme le répertoire actuel, le statut Git, les versions d'exécution, et plus encore, s'adaptant au contexte avec une configuration minimale. Il prend en charge plusieurs shells, y compris '''Bash''', [https://wiki.nixos.org/wiki/Zsh '''Zsh'''], [https://wiki.nixos.org/wiki/Fish '''Fish'''], '''PowerShell''' et de nombreux autres shells, et votre configuration restera persistante sur tous ces shells, tout en étant conçue pour la rapidité et l'efficacité.


== Installation ==
== Installation ==
Line 34: Line 34:
];
];
</syntaxhighlight>
</syntaxhighlight>
Après avoir modifié votre configuration, appliquez les modifications en exécutant:
Après avoir modifié votre configuration, appliquez les modifications en exécutant:


Line 46: Line 47:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
  programs.starship.enable = true; #enable starship
programs.starship.enable = true;
</syntaxhighlight>
</syntaxhighlight>
après avoir installé Starship, vous devez le sourcer dans votre shell
après avoir installé Starship, vous devez le sourcer dans votre shell


<div lang="en" dir="ltr" class="mw-content-ltr">
Bash:
Bash:
</div>
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
eval "$(starship init bash)"
eval "$(starship init bash)"
</syntaxhighlight>
</syntaxhighlight>
zsh:
 
<div lang="en" dir="ltr" class="mw-content-ltr">
Zsh:
</div>
 
<syntaxhighlight lang="zsh">
<syntaxhighlight lang="zsh">
eval "$(starship init zsh)"
eval "$(starship init zsh)"
</syntaxhighlight>
</syntaxhighlight>
fish:
 
<div lang="en" dir="ltr" class="mw-content-ltr">
Fish:
</div>
 
<syntaxhighlight lang="fish">
<syntaxhighlight lang="fish">
starship init fish | source
starship init fish | source
</syntaxhighlight>
</syntaxhighlight>
si vous utilisez d'autres shells que ceux que je viens de mentionner, veuillez vous rendre ici
 
<div lang="en" dir="ltr" class="mw-content-ltr">
if you use other shells than what I just mentioned please head to this [https://starship.rs/guide/#step-2-set-up-your-shell-to-use-starship page]
</div>


<span id="Advanced"></span>
<span id="Advanced"></span>
=== Avancé ===
=== Avancé ===


Vous pouvez personnaliser Starship avec Nix (voici un extrait pour comprendre)
<div lang="en" dir="ltr" class="mw-content-ltr">
you can customize starship with Nix (here's a snippet to understand)
<nowiki>:</nowiki>
<nowiki>:</nowiki>
</div>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
programs.starship = {
programs.starship = {
      enable = true;
  enable = true;
      settings = {
  settings = {
        add_newline = true;
    add_newline = true;
        command_timeout = 1300;
    command_timeout = 1300;
        scan_timeout = 50;
    scan_timeout = 50;
        format= "$all$nix_shell$nodejs$lua$golang$rust$php$git_branch$git_commit$git_state$git_status\n$username$hostname$directory";
    format = "$all$nix_shell$nodejs$lua$golang$rust$php$git_branch$git_commit$git_state$git_status\n$username$hostname$directory";
        character = {
    character = {
          success_symbol = "[](bold green) ";
      success_symbol = "[](bold green) ";
          error_symbol = "[✗](bold red) ";
      error_symbol = "[✗](bold red) ";
        };
    };
      };
  };
};
};
</syntaxhighlight>
</syntaxhighlight>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
since we can't include every option on Starship here's a GitHub link [https://gist.github.com/s-a-c/0e44dc7766922308924812d4c019b109#file-starship-nix/ containing every configuration option]
since we can't include every option on Starship here's a GitHub link <noinclude> [https://gist.github.com/s-a-c/0e44dc7766922308924812d4c019b109#file-starship-nix/ containing every configuration option] </noinclude> and here's the official documentation to explain each option [https://starship.rs/config/ starship configuration guide]
</div>
</div>


et voici la documentation officielle pour expliquer chaque option
<div lang="en" dir="ltr" class="mw-content-ltr">
 
good luck :D
Bonne chance pour la configuration :D
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
[[Category:Shell]]
[[Category:Shell]]
</div>

Latest revision as of 06:47, 8 October 2025

Starship est un prompt rapide, personnalisable et minimal pour n'importe quel shell. Écrit en Rust, il affiche des informations pertinentes comme le répertoire actuel, le statut Git, les versions d'exécution, et plus encore, s'adaptant au contexte avec une configuration minimale. Il prend en charge plusieurs shells, y compris Bash, Zsh, Fish, PowerShell et de nombreux autres shells, et votre configuration restera persistante sur tous ces shells, tout en étant conçue pour la rapidité et l'efficacité.

Installation

en utilisant nix-shell

nix-shell -p starship

en utilisant Global Configuration

environment.systemPackages = [
  pkgs.starship
];

Après avoir modifié votre configuration, appliquez les modifications en exécutant:

sudo nixos-rebuild switch

en utilisant Home Configuration

home.packages = [ 
  pkgs.starship 
];

Après avoir modifié votre configuration, appliquez les modifications en exécutant:

home-manager switch

Configuration

Basique

programs.starship.enable = true;

après avoir installé Starship, vous devez le sourcer dans votre shell

Bash:

eval "$(starship init bash)"

Zsh:

eval "$(starship init zsh)"

Fish:

starship init fish | source

if you use other shells than what I just mentioned please head to this page

Avancé

you can customize starship with Nix (here's a snippet to understand) :

programs.starship = {
  enable = true;
  settings = {
    add_newline = true;
    command_timeout = 1300;
    scan_timeout = 50;
    format = "$all$nix_shell$nodejs$lua$golang$rust$php$git_branch$git_commit$git_state$git_status\n$username$hostname$directory";
    character = {
      success_symbol = "[](bold green) ";
      error_symbol = "[✗](bold red) ";
    };
  };
};

since we can't include every option on Starship here's a GitHub link containing every configuration option and here's the official documentation to explain each option starship configuration guide

good luck :D