A Flutter section for Spaceship prompt
Current Flutter version, through flutter (💙
).
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-flutter.git $ZSH_CUSTOM/plugins/spaceship-flutter
Include spaceship-flutter
in Oh-My-Zsh plugins list:
plugins=($plugins spaceship-flutter)
zplug "spaceship-prompt/spaceship-flutter"
antigen bundle "spaceship-prompt/spaceship-flutter@main"
antibody bundle "spaceship-prompt/spaceship-flutter"
zinit light "spaceship-prompt/spaceship-flutter"
zgen load "spaceship-prompt/spaceship-flutter"
Important!! Make sure the flutter section is loaded before spaceship-prompt
itself, see below.
Add the plugin with the Sheldon command
sheldon add spaceship-flutter --github spaceship-prompt/spaceship-flutter
or edit your plugins.toml
file directly with sheldon edit
.
[plugins]
[plugins.spaceship-flutter]
github = 'spaceship-prompt/spaceship-flutter'
[plugins.spaceship]
github = 'spaceship-prompt/spaceship-prompt'
If none of the above methods works for you, you can install Spaceship manually.
- Clone this repo somewhere, for example to
$HOME/.zsh/spaceship-flutter
. - Source this section in your
~/.zshrc
.
mkdir -p "$HOME/.zsh"
git clone --depth=1 https://github.com/spaceship-prompt/spaceship-flutter.git "$HOME/.zsh/spaceship-flutter"
For initializing prompt system add this to your .zshrc
:
source "~/.zsh/spaceship-flutter/spaceship-flutter.plugin.zsh"
After installing, add the following line to your .zshrc
in order to include Flutter section in the prompt:
spaceship add flutter
The flutter
section displays the current version and channel of Flutter.
This section is displayed only when the current directory is within a Dart project with Flutter dependency.
Variable | Default | Meaning |
---|---|---|
SPACESHIP_FLUTTER_SHOW |
true |
Show section |
SPACESHIP_FLUTTER_ASYNC |
true |
Render section asynchronously |
SPACESHIP_FLUTTER_PREFIX |
$SPACESHIP_PROMPT_DEFAULT_PREFIX |
Section's prefix |
SPACESHIP_FLUTTER_SUFFIX |
$SPACESHIP_PROMPT_DEFAULT_SUFFIX |
Section's suffix |
SPACESHIP_FLUTTER_SYMBOL |
💙· |
Symbol displayed before the section |
SPACESHIP_FLUTTER_COLOR |
blue |
Section's color |
SPACESHIP_FLUTTER_CHANNEL_SHOW |
true |
Show channel |
SPACESHIP_FLUTTER_CHANNEL_PREFIX |
`` | Channel's prefix |
SPACESHIP_FLUTTER_CHANNEL_SUFFIX |
`` | Channel's suffix |
SPACESHIP_FLUTTER_CHANNEL_SYMBOL |
.# |
Symbol displayed before the channel |
MIT © Peter Merikan and Denys Dovhan