Skip to content

Latest commit

 

History

History
150 lines (105 loc) · 4.46 KB

README.md

File metadata and controls

150 lines (105 loc) · 4.46 KB

𝑚 + 🚀
Spaceship Maven

Maven section for Spaceship prompt

GitHub Release GitHub Workflow Status Spaceship Twitter Chat on Discord

Current Maven version, through mvn or mvnw (𝑚).

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-maven.git $ZSH_CUSTOM/plugins/spaceship-maven

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

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

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-maven.
  2. Source this section in your ~/.zshrc.

Example

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

For initializing prompt system add this to your .zshrc:

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

Usage

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

spaceship add maven

Options

Shows current maven version only if current working directory is within Maven wrapper or mvn exists available.

Variable Default Meaning
SPACESHIP_MAVEN_SHOW true Current Maven section
SPACESHIP_MAVEN_PREFIX $SPACESHIP_PROMPT_DEFAULT_PREFIX Prefix before Maven section
SPACESHIP_MAVEN_SUFFIX $SPACESHIP_PROMPT_DEFAULT_SUFFIX Suffix after Maven section
SPACESHIP_MAVEN_SYMBOL 𝑚· Character to be shown before Maven section
SPACESHIP_MAVEN_DEFAULT_VERSION Maven version to be treated as default
SPACESHIP_MAVEN_COLOR yellow Color of Maven 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 © Denys Dovhan and Sergey Shatunov