Skip to content

spaceship-prompt/spaceship-flutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’™ + πŸš€
Spaceship Flutter

A Flutter section for Spaceship prompt

GitHub Release GitHub Workflow Status Spaceship Twitter Chat on Discord

Current Flutter version, through flutter (πŸ’™).

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-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'

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

Example

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"

Usage

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

spaceship add flutter

Options

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

License

MIT Β© Peter Merikan and Denys Dovhan