This project provides a set of functions for shells (tested with BASH and ZSH) to modify their functionality without affecting the performance
'oh-my-zsh' can slow down zsh shell. I didn't like the lag that oh-my-zsh caused to the shell, but I liked how it can show when you are in a directory that's a git repo. I wanted the similar behaviour - natively - without depending on python or something similar.
The benefit of using this over oh-my-zsh is that you can have the same behaviour for BASH too.
It's very simple:
- Download the the file on your system
- Open your
.bashrc
or.zshrc
(depending on the shell you use) and add the linesource ~/shell_prompt
. Be sure to give the full path for this file, or you'll find a weird behaviour. - Just add the functions from the file that you want to use. For example, if you want a git branch information on your prompt, just add
$(git_prompt)
to yourPS1
(for BASH),PROMPT
orRPROMPT
(for ZSH) shell variable.
You can use any other function the same way, just call the function from the file and it will work.