Getting Started¶
Welcome aboard! Let's install Spaceship on your machine, astronaut!
Requirements¶
Before we begin, let's make sure you have the following installed:
- Zsh (v5.2 or recent) must be installed. Run the following command to check you version of Zsh:
echo $ZSH_VERSION #> 5.8.1
- Powerline Font or Nerd Font (even better) must be installed and used in your terminal. Fira Code is a popular choice. To check if Powerline Font works for you, run:
echo -e "\xee\x82\xa0" #>
Installing¶
Now that the requirements are satisfied, you can install Spaceship via any of the following approaches:
Hint
If you're using any plugin manager, like Oh-My-Zsh, antigen, zgen, zplug or other, this might not be the best way to install Spaceship for you.
- Clone this repo somewhere, for example to
$HOME/.zsh/spaceship
. - Source Spaceship in your
~/.zshrc
.
Example¶
mkdir -p "$HOME/.zsh"
git clone --depth=1 https://github.com/spaceship-prompt/spaceship-prompt.git "$HOME/.zsh/spaceship"
For initializing prompt system add this to your .zshrc
:
source "$HOME/.zsh/spaceship/spaceship.zsh"
Installing Spaceship via Homebrew is a simple command:
brew install spaceship
Add prompt initialization to your .zshrc
:
echo "source $(brew --prefix)/opt/spaceship/spaceship.zsh" >>! ~/.zshrc
Tip
You can also add the following to your Brewfile
to bundle Spaceship along with your other software:
brew "spaceship"
Clone this repo:
git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1
Symlink spaceship.zsh-theme
to your oh-my-zsh custom themes directory:
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
Set ZSH_THEME="spaceship"
in your .zshrc
.
Install Spaceship via npm as you would with any other global package:
npm install -g spaceship-prompt
This command will download Spaceship. It will also ask you to source Spaceship in your ~/.zshrc
file.
Tip
Update Spaceship to new versions as you would any other package.
- Follow prezto-contrib#usage to clone
prezto-contrib
to the proper location. - Enable the
contrib-prompt
module (before theprompt
module). - Set
zstyle ':prezto:module:prompt' theme 'spaceship'
in your.zpreztorc
.
Add Spaceship to your .zimrc
:
zmodule spaceship-prompt/spaceship-prompt --name spaceship --no-submodules
Then install Spaceship:
zimfw install
Add the following snippet in your .zshrc
:
antigen theme spaceship-prompt/spaceship-prompt
Update your .zshrc
file with the following line:
antibody bundle spaceship-prompt/spaceship-prompt
Add the following line to your .zshrc
where you're adding your other Zsh plugins:
zinit light spaceship-prompt/spaceship-prompt
Add the following line to your .zshrc
where you're adding your other Zsh plugins:
zgen load spaceship-prompt/spaceship-prompt spaceship
Use this command in your .zshrc
to load Spaceship as prompt theme:
zplug "spaceship-prompt/spaceship-prompt", use:spaceship.zsh, from:github, as:theme
Add the following to your plugins.toml
file (open it with sheldon edit
):
[plugins.spaceship]
github = "spaceship-prompt/spaceship-prompt"
Or run the following to automatically add it:
sheldon add spaceship --github spaceship-prompt/spaceship-prompt
Install the latest master from the AUR package spaceship-prompt-git
:
git clone https://aur.archlinux.org/spaceship-prompt-git.git --depth=1
cd spaceship-prompt-git
makepkg -si
Congratulations!¶
You've made it! You've installed Spaceship on your machine!
What's next? Spaceship has reasonable defaults, but you might want to adjust them to your needs. Learn how to configure your Spaceship:
Additionally, join our community or consider contributing to the project.
Having trouble?¶
Find answers on our troubleshooting page or get help by our community. Still struggling? Please, file an issue, describe your problem, and we will gladly help you.