This page aimed to help you fix the common problems encountered while using Spaceship prompt.
You need to have a powerline patched font in order to properly display git
branch symbol.
- Install any powerline compatible font like Fira Code or others.
- Configure your terminal emulator to use that font.
This is not an issue with Spaceship prompt. Spaceship uses Unicode symbols to represent SPACESHIP_*_SYMBOL
in sections. To solve this problem:
- Verify your terminal emulator support Unicode characters with this command:
curl http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt # or wget -O - http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt
- Configure your terminal emulator to use UTF-8 as character encoding.
In case Unicode symbols aren't supported, you can replace them to those that are compatible with your terminal with SPACESHIP_*_SYMBOL
options. Check out Options page for more information.
That's vi_mode
section indicating insert
mode. You can disable that with following line in your configuration,
SPACESHIP_VI_MODE_SHOW=false
Spaceship may work slower in big repositories since status checkings are quite a heavy operation. In this case, try to avoid having many uncommitted files.
Using grep
to fetch package version wasn't returning accurate information. So now we use jq
with fallbacks to python
and node
, Which might slightly affect performance. In that case install jq (see #439, #441 for more information).
Prompt also may slow down because of loading of unused sections. Spaceship loads only sections mentioned in SPACESHIP_PROMPT_ORDER
or SPACESHIP_RPROMPT_ORDER
. If you think some sections might be useless for you, try to disable them by omitting their names in order options.
In the example below, time
, package
, xcode
, julia
, docker
, ember
and vi_mode
sections are disabled so that they won't be loaded at all.
# Just comment a section if you want to disable it
SPACESHIP_PROMPT_ORDER=(
# time # Time stamps section (Disabled)
user # Username section
dir # Current directory section
host # Hostname section
git # Git section (git_branch + git_status)
hg # Mercurial section (hg_branch + hg_status)
# package # Package version (Disabled)
node # Node.js section
ruby # Ruby section
elixir # Elixir section
# xcode # Xcode section (Disabled)
swift # Swift section
golang # Go section
php # PHP section
rust # Rust section
haskell # Haskell Stack section
# julia # Julia section (Disabled)
# docker # Docker section (Disabled)
aws # Amazon Web Services section
venv # virtualenv section
conda # conda virtualenv section
pyenv # Pyenv section
dotnet # .NET section
# ember # Ember.js section (Disabled)
kubecontext # Kubectl context section
terraform # Terraform workspace section
exec_time # Execution time
line_sep # Line break
battery # Battery level and status
# vi_mode # Vi-mode indicator (Disabled)
jobs # Background jobs indicator
exit_code # Exit code section
char # Prompt character
)
Disabling a lot of unused section may achieve a significant performance boost. Here's a comparison of rendering Spaceship prompt 100 times with all sections enabled and with SPACESHIP_PROMPT_ORDER
from example above:
All section | With disabled sections | |
---|---|---|
Inside Git repo* | 23.5s |
21.3s |
Outside Git repo* | 8.3s |
7.4s |
* — spaceship-prompt
repo is used in this test.
This issue is related to how your terminal emulator renders Unicode 9 characters. To fix this issue:
- Make sure terminal uses Unicode Version 9 Widths.
- Let your terminal render ambiguous-width characters as double-width.
In iTerm follow these instructions:
- Go iTerm → Preferences… (⌘,) → Profiles → Text
- Check Unicode Version 9 Widths.
- Check Threat ambiguous-width characters as double-width.
- Reload terminal's tab.
Preview shows spaceship
prompt setup with:
- Hyper as terminal emulator.
- One Dark color theme from Atom editor.
- Fira Code with with ligatures as primary font (16px size).
- zsh-syntax-highlighting to have commands colorized.
- zsh-autosuggestions to have browser-like autocompletions.
See screenshots wiki for more color schemes examples.
If any of above does not help, please, file an issue, describe your problem and we will gladly help you.