Skip to content

spaceship-prompt/spaceship-maven

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

π‘š + πŸš€
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