feat(.oh-my-zsh/custom): add output of firebase project
This commit is contained in:
parent
431c8f39e6
commit
124c0ce3e8
7
.oh-my-zsh/custom/getFirebaseProject.js
Normal file
7
.oh-my-zsh/custom/getFirebaseProject.js
Normal 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);
|
||||||
|
}
|
@ -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}"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user