Maven section for Spaceship prompt
Current Maven version, through mvn
or mvnw
(π
).
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"
If none of the above methods works for you, you can install Spaceship manually.
- Clone this repo somewhere, for example to
$HOME/.zsh/spaceship-maven
. - Source this section in your
~/.zshrc
.
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"
After installing, add the following line to your .zshrc
in order to include Maven section in the prompt:
spaceship add maven
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 |
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.
MIT Β© Denys Dovhan and Sergey Shatunov