Starship/fr: Difference between revisions
Created page with "== Installation ==" |
Updating to match new version of source page Tags: Mobile edit Mobile web edit |
||
(42 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> | <languages/> | ||
<div | <div class="mw-translate-fuzzy"> | ||
[https://starship.rs/ Starship] | [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é. | ||
</div> | </div> | ||
== Installation == | == Installation == | ||
< | <span id="Using_nix-shell"></span> | ||
=== | === en utilisant nix-shell === | ||
<syntaxhighlight lang="bash" start="3"> | <syntaxhighlight lang="bash" start="3"> | ||
Line 14: | Line 13: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
< | <span id="Using_Global_Configuration"></span> | ||
=== | === en utilisant Global Configuration === | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
Line 24: | Line 22: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Après avoir modifié votre configuration, appliquez les modifications en exécutant: | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 32: | Line 28: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
< | <span id="Using_Home_Manager"></span> | ||
=== | <div class="mw-translate-fuzzy"> | ||
=== en utilisant Home Configuration === | |||
</div> | </div> | ||
Line 41: | Line 38: | ||
]; | ]; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Après avoir modifié votre configuration, appliquez les modifications en exécutant: | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 49: | Line 45: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Configuration == | == Configuration == | ||
< | <span id="Basic"></span> | ||
=== | === Basique === | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
programs.starship.enable = true; | |||
</syntaxhighlight> | </syntaxhighlight> | ||
<div class="mw-translate-fuzzy"> | |||
après avoir installé Starship, vous devez le sourcer dans votre shell | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Bash: | |||
</div> | </div> | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
eval "$(starship init bash)" | eval "$(starship init bash)" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<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> | ||
<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> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <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] | 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> | </div> | ||
< | <span id="Advanced"></span> | ||
=== | === Avancé === | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
you can customize | you can customize Starship with Nix (here's a snippet to understand) | ||
<nowiki>:</nowiki> | <nowiki>:</nowiki> | ||
</div> | </div> | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
programs.starship = { | 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) "; | |||
}; | |||
}; | |||
}; | }; | ||
</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> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
good luck :D | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
[[Category:Shell]] | [[Category:Shell]] | ||
</div> |
Latest revision as of 14:19, 10 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