Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FVM Spaceship Prompt Section

An FVM section for Spaceship prompt.

example on ⎇ main 💙 v3.29.3✓
➜ cat .fvmrc
{
  "flutter": "3.29.3"
}%                                                                                                                                         
example on ⎇ main 💙 v3.29.3✓
➜ fvm use stable
✓ Project now uses Flutter SDK : Channel: Stable

example on ⎇ main [!] 💙 stable✓
➜ sed -i '' 's/stable/3.99.9/g' .fvmrc

example on ⎇ main [!] 💙 v3.99.9✗
➜ 

Installing

Installation is similar to other Spaceship prompts.

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

git clone https://github.com/samuelwford/spaceship-fvm.git $ZSH_CUSTOM/plugins/spaceship-fvm

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

plugins=($plugins spaceship-fvm)

Usage

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

spaceship add fvm

Options

The fvm section displays the current version of Flutter configured for a project using FVM.

This section is displayed only when the current directory is within a project with FVM configured.

Variable Default Meaning
SPACESHIP_FVM_SHOW true Show section
SPACESHIP_FVM_ASYNC true Render section asynchronously
SPACESHIP_FVM_PREFIX $SPACESHIP_PROMPT_DEFAULT_PREFIX Section's prefix
SPACESHIP_FVM_SUFFIX $SPACESHIP_PROMPT_DEFAULT_SUFFIX Section's suffix
SPACESHIP_FVM_SYMBOL 💙· Symbol displayed before the section
SPACESHIP_FVM_COLOR_INSTALLED blue Section's color if selected version is installed
SPACESHIP_FVM_COLOR_NOT_INSTALLED red Section's color if selected version is NOT installed

License

MIT

About

Spaceship prompt section to support Flutter Version Manager (fvm)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages