Skip to content

Latest commit

 

History

History
113 lines (84 loc) · 5.12 KB

Troubleshooting.md

File metadata and controls

113 lines (84 loc) · 5.12 KB

Troubleshooting

This page aimed to help you fix the common problems encountered while using Spaceship prompt.

What's the weird symbol for git branch?

You need to have a powerline patched font inorder to properly display git branch symbol.

What's the weird character in front of a section?

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.

Why is my prompt slow?

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.

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 stampts 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
  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.

Some section icons overlap each other?

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.

Why doesn't my prompt look like the preview?

preview

Preview shows spaceship prompt setup with:

See screenshots wiki for more color schemes examples.

Does not help?

If any of above does not help, please, file an issue, describe your problem and we will gladly help you.