firebase-zsh is a configurable plugin for Zsh to display the current working project or project alias when in a Firebase project directory or subdirectory. Never push to production accidentally again!
Part of the Awesome zsh plugins collection!
Clone the repository into your oh-my-zsh plugin folder:
git clone https://github.com/seqi/firebase-zsh ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/firebase
Then add it to your list of plugins in your ~/.zshrc
plugins=(git firebase)
Finally, add the plugin output to your prompt, by opening your theme and adding the firebase project.
For example,
PROMPT='%{$fg[cyan]%}%n%{$reset_color%}:$(git_prompt_info) %(!.#.$) '
becomes
PROMPT='%{$fg[cyan]%}%n%{$reset_color%}:$(firebase_project) $(git_prompt_info)%(!.#.$) '
Restart Zsh for the changes to take effect.
firebase-zsh has a few customisation options to get it to fit with whatever theme you are using. These can be configured through environment variables. These options are:
Configures the font style of the text.
Options:
bold
- makes the text bold
Defaults to non-bold
Whether or not to show the 🔥 icon.
Options:
true
Defaults to false
The format of the text itself to help match with your current zsh theme.
Options:
plain
: output asmy-firebase-project
round
: output as(my-firebase-project)
square
: output as[my-firebase-project]
prefix
: output asfb:my-firebase-project
prefix-round
: output asfb:(my-firebase-project)
prefix-square
: output asfb:[my-firebase-project]
Defaults to round
Adds a trailing space to the output.
Adds a leading space to the output.
Changes are welcomed. If you have an issue, please feel free to raise it in the issues section. If you wish to make a contribution, please create a corresponding issue.