[](https://joknarf.github.io/joknarf-tools)
[]()
[](https://shields.io/)
# nerdp
Nerd prompt for bash/ksh/zsh (mksh/ash)
## demo
## features
The following information is displayed:
* exit code if command returns code is not 0
* elapse time during command if command lasts more than 1s (bash / zsh / ksh >2012)
* user@hostname
* current working directory
* git branch if in git directory (colorized according to git status)
* python VIRTUAL_ENV and other variables values with name in `ps1_info` variable
* filesystem usage check of `ps1_fslist` (default "/ /tmp") according to `ps1_fslimits` (default "95 100")
* 1min cpu load (colorized default `ps1_loadlimits` "10 20")
* Available memory (colorized default `ps1_memlimits` "300 100" MB)
* Time
## Install
* You can install using a plugin manager like sheldon / zgenom or the best [thefly](https://github.com/joknarf/thefly) : plugin joknarf/nerdp
```
fly add joknarf/nerdp
```
* Or you can get your local copy and source in your rc file:
```
curl -sL -o ~/nerdp https://raw.githubusercontent.com/joknarf/nerdp/main/nerdp
. ~/nerdp
```
* To test it you can activate the nerdp prompt directly using:
```
. <(curl -s https://raw.githubusercontent.com/joknarf/nerdp/main/nerdp)
```
## Font for prompt
For better experience, install a Nerd font on your system/console (Windows console / Windows terminal / putty / git-bash / CmdEr / iTerm2 / Terminator / MobaXterm / VScode terminal / Pycharm terminal...):
[Nerd Fonts](https://www.nerdfonts.com/)
on Unix, copy to `~/.fonts` and run `fc-cache -fv` then relaunch your terminal and set the font
## choose your style
set `ps1_style` variable to available styles in your .nerdrc
You can test using `ps1_style` function:

## Font rendering
If your terminal does not manage correctly nerd font symbols, you may switch to more commonly supported powerline font symbols, or even disable the segment separator symbols.
You can use : `ps1_display` function/var to switch prompt display symbol characters:
```
$ ps1_display -h
usage: ps1_display