* New translations readme.md (Russian) * New translations readme.md (Turkish) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Traditional) * New translations readme.md (Vietnamese) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Indonesian) * New translations readme.md (Bengali) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (Ukrainian) * New translations readme.md (Ukrainian) * New translations readme.md (Ukrainian) * New translations readme.md (Ukrainian) * New translations readme.md (French) * New translations readme.md (Spanish) * New translations readme.md (Arabic) * New translations readme.md (German) * New translations readme.md (Italian) * New translations readme.md (Japanese) * New translations readme.md (Korean) * New translations readme.md (Dutch) * New translations readme.md (Norwegian) * New translations readme.md (Polish) * New translations readme.md (Portuguese) * New translations readme.md (Russian) * New translations readme.md (Turkish) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Traditional) * New translations readme.md (Vietnamese) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Indonesian) * New translations readme.md (Bengali) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations no-nerd-font.md (Japanese) * New translations no-empty-icons.md (Japanese) * New translations gruvbox-rainbow.md (Japanese) * New translations jetpack.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (French) * New translations readme.md (Spanish) * New translations readme.md (Arabic) * New translations readme.md (German) * New translations readme.md (Italian) * New translations readme.md (Japanese) * New translations readme.md (Korean) * New translations readme.md (Dutch) * New translations readme.md (Norwegian) * New translations readme.md (Polish) * New translations readme.md (Portuguese) * New translations readme.md (Russian) * New translations readme.md (Turkish) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Traditional) * New translations readme.md (Vietnamese) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Indonesian) * New translations readme.md (Bengali) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (French) * New translations readme.md (Spanish) * New translations readme.md (Arabic) * New translations readme.md (German) * New translations readme.md (Italian) * New translations readme.md (Japanese) * New translations readme.md (Korean) * New translations readme.md (Dutch) * New translations readme.md (Norwegian) * New translations readme.md (Polish) * New translations readme.md (Portuguese) * New translations readme.md (Russian) * New translations readme.md (Turkish) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Traditional) * New translations readme.md (Vietnamese) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Indonesian) * New translations readme.md (Bengali) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Ukrainian) * New translations readme.md (Ukrainian) * New translations readme.md (Japanese) * New translations readme.md (French) * New translations readme.md (Spanish) * New translations readme.md (Arabic) * New translations readme.md (German) * New translations readme.md (Italian) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Korean) * New translations readme.md (Dutch) * New translations readme.md (Norwegian) * New translations readme.md (Polish) * New translations readme.md (Portuguese) * New translations readme.md (Russian) * New translations readme.md (Turkish) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Traditional) * New translations readme.md (Vietnamese) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Indonesian) * New translations readme.md (Bengali) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (French) * New translations readme.md (Spanish) * New translations readme.md (Arabic) * New translations readme.md (German) * New translations readme.md (Italian) * New translations readme.md (Japanese) * New translations readme.md (Korean) * New translations readme.md (Dutch) * New translations readme.md (Norwegian) * New translations readme.md (Polish) * New translations readme.md (Portuguese) * New translations readme.md (Russian) * New translations readme.md (Turkish) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Traditional) * New translations readme.md (Vietnamese) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Indonesian) * New translations readme.md (Bengali) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (Spanish) * New translations readme.md (Japanese) * New translations readme.md (Russian) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Ukrainian) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Vietnamese) * New translations readme.md (French) * New translations readme.md (Spanish) * New translations readme.md (Arabic) * New translations readme.md (German) * New translations readme.md (Italian) * New translations readme.md (Japanese) * New translations readme.md (Korean) * New translations readme.md (Dutch) * New translations readme.md (Norwegian) * New translations readme.md (Polish) * New translations readme.md (Portuguese) * New translations readme.md (Russian) * New translations readme.md (Turkish) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Traditional) * New translations readme.md (Vietnamese) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Indonesian) * New translations readme.md (Bengali) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (French) * New translations readme.md (Spanish) * New translations readme.md (Spanish) * New translations readme.md (Arabic) * New translations readme.md (Arabic) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (Italian) * New translations readme.md (Italian) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Korean) * New translations readme.md (Korean) * New translations readme.md (Dutch) * New translations readme.md (Dutch) * New translations readme.md (Norwegian) * New translations readme.md (Norwegian) * New translations readme.md (Polish) * New translations readme.md (Polish) * New translations readme.md (Portuguese) * New translations readme.md (Portuguese) * New translations readme.md (Russian) * New translations readme.md (Russian) * New translations readme.md (Turkish) * New translations readme.md (Turkish) * New translations readme.md (Ukrainian) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Traditional) * New translations readme.md (Chinese Traditional) * New translations readme.md (Vietnamese) * New translations readme.md (Vietnamese) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Indonesian) * New translations readme.md (Indonesian) * New translations readme.md (Bengali) * New translations readme.md (Bengali) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (French) * New translations readme.md (French) * New translations readme.md (Spanish) * New translations readme.md (Arabic) * New translations readme.md (German) * New translations readme.md (Italian) * New translations readme.md (Japanese) * New translations readme.md (Korean) * New translations readme.md (Dutch) * New translations readme.md (Norwegian) * New translations readme.md (Polish) * New translations readme.md (Portuguese) * New translations readme.md (Russian) * New translations readme.md (Turkish) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Traditional) * New translations readme.md (Vietnamese) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Indonesian) * New translations readme.md (Bengali) * New translations readme.md (Sorani (Kurdish))
8.1 KiB
Frequently Asked Questions
Qual è la configurazione utilizzata nella GIF demo?
- Terminale Emulato: iTerm2
- Tema: Minimale
- Schema Colore: Snazzy
- Font: FiraCode Nerd Font
- Shell: Fish Shell
- Configurazione: matchai Dotfiles
- Chiedi: Starship
Come posso ottenere il completamento dei comandi come mostrato nella GIF demo?
Il supporto di completamento, o autocompletamento, è fornito dalla vostra shell di scelta. Nel caso della demo, la demo è stata fatta con Fish Shell, che fornisce i completamenti per impostazione predefinita. Se usi Z Shell (zsh), ti suggerirei di dare un'occhiata a zsh-autosuggestions.
Il formato di primo livello `` e <module>.disabled
fanno la stessa cosa?
Sì, entrambi possono essere utilizzati per disabilitare i moduli nel prompt. Se tutto quello che pensi di fare è disabilitare i moduli, <module>.disabled
è il modo preferito per per queste ragioni:
- Disabilitare i moduli è più esplicito che ometterli dal primo
formato
di livello - I nuovi moduli creati saranno aggiunti al prompt come Starship viene aggiornato
I docs dicono Starship è cross-shell. Perché la mia shell preferita non è supportata?
Il modo in cui Starship è costruito, dovrebbe rendere possibile aggiungere il supporto per qualsiasi shell. Il binario di Starship è apolide e indipendente dalla shell, fino a quando la tua shell supporterà prompt personalizzati, Starship può essere utilizzato.
Ecco un piccolo esempio per avere Starship lavorando con bash:
# Ottenere lo status code dall'ultimo comando eseguito
STATUS=$?
# Ottieni il numero di processi in esecuzione.
NUM_JOBS=$(jobs -p | wc -l)
# Imposta il prompt come output di `starship prompt`
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
L'implementazione Bash integrata in Starship è leggermente più complessa per consentire funzionalità avanzate come il modulo di durata dei comandi e per garantire che Starship sia compatibile con le configurazioni Bash preinstallate.
Per un elenco di tutti i flag accettati da starship prompt
, utilizzare il seguente comando:
starship prompt --help
Il prompt userà tanto contesto quanto è fornito, ma nessun flag è "richiesto".
Come faccio a eseguire le distribuzioni Starship su Linux con vecchie versioni di glibc?
Se si ottiene un errore come "versione 'GLIBC_2. 8' non trovato (richiesta da Starship)" quando si utilizza il binario precostruito (per esempio, su CentOS 6 o 7), puoi usare un binario compilato con musl
invece di glibc
:
curl -sS https://starship.rs/install.sh | sh -s -- --platform unknown-linux-musl
Why do I see Executing command "..." timed out.
warnings?
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the command_timeout
key so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the STARSHIP_LOG
env var to error
to hide these warnings.
Vedo simboli che non capisco o mi aspetto, cosa significano?
Se vedi simboli che non riconosci puoi usare starship explain
per la spiegazione dei moduli correntemente mostrato.
Starship is doing something unexpected, how can I debug it?
You can enable the debug logs by using the STARSHIP_LOG
env var. These logs can be very verbose so it is often useful to use the module
command if you are trying to debug a particular module, for example, if you are trying to debug the rust
module you could run the following command to get the trace logs and output from the module.
env STARSHIP_LOG=trace starship module rust
If starship is being slow you can try using the timings
command to see if there is a particular module or command that is to blame.
env STARSHIP_LOG=trace starship timings
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
Finally if you find a bug you can use the bug-report
command to create a GitHub issue.
starship bug-report
Perché non vedo un simbolo di glifo nel mio prompt?
La causa più comune è la configurazione errata del sistema. Alcune distribuzioni Linux in particolare non vengono fornite con il supporto dei font come impostazione predefinita. È necessario assicurarsi che:
- In locale sia impostato un valore UTF-8, come
de_DE.UTF-8
oja_JP.UTF-8
. SeLC_ALL
non è un valore UTF-8, dovrai cambiarlo. - Hai un font emoji installato. La maggior parte dei sistemi ha un font emoji per impostazione predefinita, ma alcuni (in particolare Arch Linux) non lo fanno. Di solito puoi installarne uno attraverso il gestore dei pacchetti del tuo sistema-noto emoji è uno dei popolari.
- Stai usando un font Nerd.
Per testare il sistema, eseguire i seguenti comandi in un terminale:
echo -e "\xf0\x9f\x90\x8d"
echo -e "\xee\x82\xa0"
La prima riga dovrebbe riprodurre una emoji di un serpente, mentre la seconda dovrebbe riprodurre il simbolo powerline di ramo (e0a0).
Se uno dei due simboli non viene visualizzato correttamente, il sistema è ancora mal configurato. Sfortunatamente, ottenere la configurazione dei caratteri corretta a volte è difficile. Gli utenti su Discord potrebbero essere in grado di aiutarti. Se entrambi i simboli vengono visualizzati correttamente, ma non li vedi ancora in starship, segnala un bug!
Come posso disinstallare Starship?
Starship è altrettanto facile da disinstallare come lo è da installare.
- Rimuovi qualsiasi riga utilizzata per inizializzare Starship nella configurazione della tua shell (ad es.
~/.bashrc
). - Elimina il binario di Starship.
Se Starship è stato installato utilizzando un gestore di pacchetti, fai riferimento alla documentazione per le istruzioni di disinstallazione.
Se Starship è stato installato utilizzando lo script di installazione, il seguente comando eliminerà il file binario:
# Locate and delete the starship binary
sh -c 'rm "$(command -v 'starship')"'
How do I install Starship without sudo
?
The shell install script (https://starship.rs/install.sh
) only attempts to use sudo
if the target installation directory is not writable by the current user. The default installation directory is the value of the $BIN_DIR
environment variable or /usr/local/bin
if $BIN_DIR
is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without sudo
. For example, curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin
uses the -b
command line option of the install script to set the installation directory to ~/.local/bin
.
For a non-interactive installation of Starship, don't forget to add the -y
option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
When using a package manager, see the documentation for your package manager about installing with or without sudo
.