2020-05-05 13:07:34 -04:00
---
2024-03-03 17:55:30 +01:00
layout: home
hero:
image: /logo.svg
2024-03-21 20:42:05 +09:00
text:
2024-03-03 17:55:30 +01:00
tagline: O prompt minimalista, extremamente rápido e infinitamente personalizável para qualquer shell!
actions:
2024-03-21 20:42:05 +09:00
-
theme: brand
2024-03-03 17:55:30 +01:00
text: Primeiros passos →
link: ./guide/
2020-05-05 13:07:34 -04:00
features:
2024-03-21 20:42:05 +09:00
-
2020-05-15 11:55:21 -04:00
title: Compatibilidade primeiro
details: Funciona nos principais shells nos principais sistemas operacionais. Use em qualquer lugar!
2024-03-21 20:42:05 +09:00
-
2020-05-15 11:55:21 -04:00
title: Poder do Rust
details: Tenha o melhor da velocidade e segurança do Rust, para tornar seu prompt o mais rápido e confiável possível.
2024-03-21 20:42:05 +09:00
-
2020-05-15 11:55:21 -04:00
title: Personalizável
details: Cada pequeno detalhe é personalizável ao seu gosto, para tornar esse prompt o mínimo possível ou rico em recursos, como você preferir.
footer: Licenciado pelo ISC | Todos os direitos reservados © 2019-Presente | Contribuidores Starship
2020-05-05 13:07:34 -04:00
#Used for the description meta tag, for SEO
metaTitle: "Starship: Cross-Shell Prompt"
2022-02-07 15:53:55 +01:00
description: O Starship é o prompt minimalista, extremamente rápido e extremamente personalizável para qualquer shell! Mostra as informações que você precisa, mantendo-se elegante e minimalista. Instalação rápida disponível para Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd e PowerShell.
2020-05-05 13:07:34 -04:00
---
2024-05-16 02:07:00 +09:00
<script setup>
import { onMounted } from 'vue'
onMounted(() => {
const urlParams = new URLSearchParams(window.location.search)
if (urlParams.has('uwu') || urlParams.has('kawaii')) {
const img = document.querySelector('.VPHero .VPImage.image-src')
img.classList.add('uwu')
img.src = '/logo-uwu.png'
img.alt = 'Kawaii Starship Logo by @sawaratsuki1004 '
}
})
</script>
2024-03-21 20:42:05 +09:00
<video class="demo-video" muted autoplay loop playsinline>
<source src="/demo.webm" type="video/webm">
<source src="/demo.mp4" type="video/mp4">
</video>
2020-05-05 13:07:34 -04:00
2021-04-22 17:12:09 -04:00
### Pré-requisitos
2021-06-20 14:10:36 -04:00
- Uma fonte [Nerd Font ](https://www.nerdfonts.com/ ) instalada e ativada em seu terminal.
2021-04-22 17:12:09 -04:00
2021-05-01 14:20:08 -04:00
### Instalação
2020-05-05 13:07:34 -04:00
2020-05-15 11:55:21 -04:00
1. Instale o binário do **starship ** :
2020-05-05 13:07:34 -04:00
2022-03-24 15:47:11 -05:00
#### Instalando a última versão
2020-05-05 13:07:34 -04:00
2020-05-15 11:55:21 -04:00
Com o Shell:
2020-05-05 13:07:34 -04:00
```sh
2022-03-08 21:11:36 -05:00
curl -sS https://starship.rs/install.sh | sh
2020-05-05 13:07:34 -04:00
` ``
2022-03-08 21:11:36 -05:00
2021-06-20 14:10:36 -04:00
Para atualizar o Starship de maneira manual, execute novamente o script acima. Isto irá substituir a versão atual sem alterar as configurações do Starship.
2020-05-05 13:07:34 -04:00
2022-03-24 15:47:11 -05:00
#### Instalar via gerenciador de pacotes
2020-05-05 13:07:34 -04:00
2021-04-08 11:52:32 -04:00
Com o [Homebrew](https://brew.sh/):
2020-05-05 13:07:34 -04:00
` ``sh
brew install starship
` ``
2024-03-21 20:42:05 +09:00
2022-12-05 15:54:12 +09:00
Com o [Winget](https://github.com/microsoft/winget-cli):
2020-05-05 13:07:34 -04:00
` ``powershell
2022-10-14 21:53:32 -04:00
winget install starship
2020-05-05 13:07:34 -04:00
` ``
2022-03-24 15:47:11 -05:00
1. Adicione o script de inicialização no arquivo de configuração do seu shell:
2020-05-05 13:07:34 -04:00
#### Bash
2020-05-15 11:55:21 -04:00
Adicione o seguinte comando no final do arquivo ` ~/.bashrc`:
2020-05-05 13:07:34 -04:00
` ``sh
# ~/.bashrc
eval "$(starship init bash)"
` ``
#### Fish
2020-05-15 11:55:21 -04:00
Adicione o seguinte comando no final do arquivo ` ~/.config/fish/config.fish`:
2020-05-05 13:07:34 -04:00
` ``sh
# ~/.config/fish/config.fish
starship init fish | source
` ``
#### Zsh
2020-05-15 11:55:21 -04:00
Adicione o seguinte comando no final do arquivo ` ~/.zshrc`:
2020-05-05 13:07:34 -04:00
` ``sh
# ~/.zshrc
eval "$(starship init zsh)"
` ``
#### Powershell
2022-03-24 15:47:11 -05:00
Adicione o comando a seguir ao final do arquivo ` Microsoft.PowerShell_profile.ps1`. Você pode checar a localização deste arquivo consultando a variável ` $PROFILE` no PowerShell. Normalmente o caminho é ` ~\Documentos\PowerShell\Microsoft.PowerShell_profile.ps1` ou ` ~/.config/powershell/Microsoft.PowerShell_profile.ps1` no -Nix.
2020-05-05 13:07:34 -04:00
` ``sh
Invoke-Expression (&starship init powershell)
` ``
#### Ion
2020-05-15 11:55:21 -04:00
Adicione o seguinte comando no final do arquivo ` ~/.config/ion/initrc`:
2020-05-05 13:07:34 -04:00
` ``sh
# ~/.config/ion/initrc
eval $(starship init ion)
` ``
2021-02-06 12:46:15 -05:00
2021-08-14 09:24:51 -04:00
2021-02-06 12:46:15 -05:00
#### Elvish
2022-12-14 00:50:29 +09:00
::: warning
2022-05-24 17:19:44 -04:00
2022-12-05 15:54:12 +09:00
Apenas elvish v0.18 ou superior é suportado.
2022-05-24 17:19:44 -04:00
:::
2021-02-06 12:46:15 -05:00
2021-06-20 14:10:36 -04:00
Adicione o comando a seguir ao final do arquivo ` ~/.elvish/rc.elv`:
2021-02-06 12:46:15 -05:00
` ``sh
# ~/.elvish/rc.elv
eval (starship init elvish)
` ``
2021-03-15 13:18:42 -04:00
#### Tcsh
2021-06-20 14:10:36 -04:00
Adicione ao final do arquivo ` ~/.tcshrc`:
2021-03-15 13:18:42 -04:00
` ``sh
# ~/.tcshrc
eval ` starship init tcsh`
` ``
2021-07-10 17:15:23 -04:00
2021-08-14 09:24:51 -04:00
#### Nushell
2022-12-14 00:50:29 +09:00
::: warning
2022-05-24 17:19:44 -04:00
2023-07-30 09:29:01 -04:00
Isto irá mudar no futuro. Somente Nushell v0.78+ é suportado.
2022-05-24 17:19:44 -04:00
:::
2023-06-06 10:10:23 -04:00
Adicione o seguinte ao final do seu arquivo env do Nushell (enconte-o rodando ` $nu.env-path` no Nushell):
2024-03-21 20:42:05 +09:00
2022-03-24 15:47:11 -05:00
` ``sh
mkdir ~/.cache/starship
2023-02-01 01:14:38 +09:00
starship init nu | save -f ~/.cache/starship/init.nu
2021-07-10 17:15:23 -04:00
` ``
2021-08-14 09:24:51 -04:00
2022-05-24 17:19:44 -04:00
E adicione o seguinte ao final da sua configuração do Nushell (encontre-o executando ` $nu.config-path`):
2022-03-24 15:47:11 -05:00
` ``sh
2023-07-30 09:29:01 -04:00
use ~/.cache/starship/init.nu
2022-03-24 15:47:11 -05:00
` ``
2021-08-14 09:24:51 -04:00
2023-07-30 09:29:01 -04:00
2021-08-14 09:24:51 -04:00
#### Xonsh
Adicione o seguinte ao final do arquivo ` ~/.xonshrc`:
` ``sh
# ~/.xonshrc
execx($(starship init xonsh))
` ``
2022-01-15 17:08:31 -05:00
#### Cmd
2022-04-18 09:48:28 -05:00
Você precisa do [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) com Cmd. Adicione o seguinte num arquivo ` starship.lua` e coloque este arquivo no diretório scripts do Clink:
2022-01-15 17:08:31 -05:00
` ``lua
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))()
` ``