Skip to content

manhluong/firebase_zsh

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
res
 
 
 
 
 
 
 
 

firebase zsh plugin

Add a prompt indication to show which active firebase project your directory is pointed at, in case the directory is a firebase project.

It works with sub dirs too.

Think of the git prompt but instead of the current branch you have the current active project.

FB prompt robbyrussell

I have been inspired by ittus tutorial.

Getting started

Install the plugin by copying the plugin file into ~/.oh-my-zsh/plugins/firebase/firebase.plugin.zsh.

Enable the plugin editing the .zshrc file:

plugins=(
  git
  firebase
)

Now you can use the functions inside the plugin in the theme, the main one is firebase_prompt_info.

For robbyrussell theme, edit ~/.oh-my-zsh/themes/robbyrussell.zsh-theme:

PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)$(firebase_prompt_info)'

You can customize with the following variables:

ZSH_THEME_FIREBASE_PROMPT_PREFIX="%{$fg_bold[yellow]%}fb:(%{$fg[magenta]%}"
ZSH_THEME_FIREBASE_PROMPT_SUFFIX="%{$fg[yellow]%})%{$reset_color%} "

About

Zsh plugin to display a firebase prompt.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages