feat(.oh-my-zsh/custom): add output of firebase project

This commit is contained in:
Anton Shubin 2019-03-12 20:33:05 +03:00
parent 431c8f39e6
commit 124c0ce3e8
2 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,7 @@
const json = require(`${process.env.HOME}/.config/configstore/firebase-tools.json`);
const firebaseProjectName = json.activeProjects[process.argv[2]];
if (firebaseProjectName) {
console.log(firebaseProjectName);
}

View File

@ -1,8 +1,9 @@
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
local current_dir='%{$terminfo[bold]$fg[green]%}%~%{$reset_color%}' local current_dir='%{$terminfo[bold]$fg[green]%}%~%{$reset_color%}'
local git_branch='$(git_prompt_info)%{$reset_color%}' local git_branch='$(git_prompt_info)%{$reset_color%}'
local firebase_project=%{$fg[cyan]%}'$(node ~/.oh-my-zsh/custom/getFirebaseProject.js $(pwd))'%{$reset_color%}
PROMPT="${current_dir} ${git_branch} PROMPT="${current_dir} ${firebase_project} ${git_branch}
$ " $ "
RPS1="${return_code}" RPS1="${return_code}"