Skip to content

😍 Custom section template for Spaceship prompt

License

Notifications You must be signed in to change notification settings

spaceship-prompt/spaceship-section

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

😍 + πŸš€
Spaceship Section

A Foobar section for Spaceship prompt

GitHub Release GitHub Workflow Status Spaceship Twitter Chat on Discord

Current Foobar version, through foobar (😍).

Installing

You need to source this plugin somewhere in your dotfiles. Here's how to do it with some popular tools:

Execute this command to clone this repo into Oh-My-Zsh plugin's folder:

git clone https://github.com/spaceship-prompt/spaceship-section.git $ZSH_CUSTOM/plugins/spaceship-section

Include spaceship-section in Oh-My-Zsh plugins list:

plugins=($plugins spaceship-section)
zplug "spaceship-prompt/spaceship-section"
antigen bundle "spaceship-prompt/spaceship-section"
antibody bundle "spaceship-prompt/spaceship-section"
zinit light "spaceship-prompt/spaceship-section"
zgen load "spaceship-prompt/spaceship-section"
[plugins.spaceship-section]
github = "spaceship-prompt/spaceship-section"

Manual

If none of the above methods works for you, you can install Spaceship manually.

  1. Clone this repo somewhere, for example to $HOME/.zsh/spaceship-section.
  2. Source this section in your ~/.zshrc.

Example

mkdir -p "$HOME/.zsh"
git clone --depth=1 https://github.com/spaceship-prompt/spaceship-section.git "$HOME/.zsh/spaceship-section"

For initializing prompt system add this to your .zshrc:

source "~/.zsh/spaceship-section/spaceship-section.plugin.zsh"

Usage

After installing, add the following line to your .zshrc in order to include Ember section in the prompt:

spaceship add foobar

Options

This section is shown only in directories within a foobar context.

Variable Default Meaning
SPACESHIP_FOOBAR_SHOW true Show current section
SPACESHIP_FOOBAR_PREFIX $SPACESHIP_PROMPT_DEFAULT_PREFIX Prefix before section
SPACESHIP_FOOBAR_SUFFIX $SPACESHIP_PROMPT_DEFAULT_SUFFIX Suffix after section
SPACESHIP_FOOBAR_SYMBOL 😍· Character to be shown before version
SPACESHIP_FOOBAR_COLOR yellow Color of section

Contributing

First, thanks for your interest in contributing!

Contribute to this repo by submitting a pull request. Please use conventional commits, since this project adheres to semver and is automatically released via semantic-release.

License

MIT Β© Name Surname