https://github.com/hypemc/bash-prompt
A simple bash prompt
https://github.com/hypemc/bash-prompt
bash-prompt git-prompt shell-prompt
Last synced: about 11 hours ago
JSON representation
A simple bash prompt
- Host: GitHub
- URL: https://github.com/hypemc/bash-prompt
- Owner: HypeMC
- License: mit
- Created: 2023-01-17T19:11:09.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-03T22:20:00.000Z (over 2 years ago)
- Last Synced: 2025-11-23T00:06:31.630Z (7 months ago)
- Topics: bash-prompt, git-prompt, shell-prompt
- Language: Shell
- Homepage:
- Size: 58.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple bash prompt
Clone the repo to your home folder:
```shell
cd ~
git clone https://github.com/HypeMC/bash-prompt.git .bash_prompt
```
Add the following to your `.bashrc`:
```shell
. ~/.bash_prompt/prompt.sh
PROMPT_COMMAND="__prompt $color_prompt"
```

With the hostname displayed:
```shell
. ~/.bash_prompt/prompt.sh
PROMPT_COMMAND="__prompt $color_prompt yes"
```

When the user is root:

When the last exit status iz not zero:
