https://github.com/artbycrunk/hyper-prompt
Highly Customize-able prompt for your shell
https://github.com/artbycrunk/hyper-prompt
bash developer-tools hacktoberfest prompts python3 shell zsh
Last synced: 3 months ago
JSON representation
Highly Customize-able prompt for your shell
- Host: GitHub
- URL: https://github.com/artbycrunk/hyper-prompt
- Owner: artbycrunk
- License: mit
- Created: 2019-04-26T12:55:35.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-16T17:38:34.000Z (almost 5 years ago)
- Last Synced: 2025-03-24T09:46:49.800Z (4 months ago)
- Topics: bash, developer-tools, hacktoberfest, prompts, python3, shell, zsh
- Language: Python
- Homepage:
- Size: 223 KB
- Stars: 6
- Watchers: 1
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Hyper-prompt
[](https://pypi.org/project/hyper-prompt/)
[](https://pypi.org/project/hyper-prompt/)
[](https://github.com/artbycrunk/hyper-prompt/blob/master/LICENSE)[](https://hyper-prompt.readthedocs.io/en/latest/?badge=latest)
[](https://github.com/artbycrunk/hyper-prompt)[](https://isitmaintained.com/project/artbycrunk/hyper-prompt "Average time to resolve an issue")
[](https://isitmaintained.com/project/artbycrunk/hyper-prompt "Percentage of issues still open")[](https://twitter.com/artbycrunk)
[](https://gitter.im/hyper-prompt/hyper-prompt)A Highly Customize-able prompt for your shell

## Requirements
- Python3
- Powerline Fonts : https://github.com/powerline/fonts## Getting Started
* from pip
```bash
pip install hyper-prompt
```* from github
```
git clone https://github.com/artbycrunk/hyper-prompt
cd hyper-prompt
python setup.py install
```## Configure for your desired shell
### * Bash
Add the following to your `.bashrc` file:
```bash
# enable hyper-prompt if executable exists
if hash hyper-prompt 2>/dev/null; then
function _update_ps1() {
PS1=$(hyper-prompt --shell bash $?)
}if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi
fi
```### * Zsh
Add the following to your `.zshrc`:
```zsh
function prompt_precmd() {
PS1="$(hyper-prompt --shell zsh $?)"
}function add_prompt_precmd() {
for s in "${precmd_fn[@]}"; do
if [ "$s" = "prompt_precmd" ]; then
return
fi
done
precmd_fn+=(prompt_precmd)
}if [ "$TERM" != "linux" ]; then
add_prompt_precmd
fi
```### * Fish
Add the following to your `~/.config/fish/config.fish`:
```shell
function fish_prompt
hyper-prompt --shell bare $status
end
```### * tcsh
Add the following to your `.tcshrc`:
```bash
alias precmd 'set prompt="`hyper-prompt --shell tcsh $?`"'
```## Customization Options
### Config File
Hyper prompt will lookup multiple locations for a config file for options on how to display your prompt..
It will first look for a `hyper_prompt.json` in your current project/folder, if it doesn't exists look for `$HOME/.hyper_prompt.json` else finally look for `$HOME/.config/hyper_prompt/config.json`
Use `~/.config/hyper-prompt/config.json` as a config file for customizations.
Example of a default config
```json
"theme": "default",
"mode":"patched",
"segments": [
"username",
{
"type": "virtual",
// a user built segment which is discoverable via the python path
"module": "hyper_prompt.segments.virtual"
}
]
```### Segments
Segments are the building blocks of hyper-prompt
You can mix and match different segments to build your prompt.
## Issues, feature requests, and contributions
* If you come across a problem with the extension, please [file an issue](https://github.com/artbycrunk/hyper-prompt/issues/new)
* Contributions are always welcome!
* Any and all feedback is appreciated and welcome!
- If someone has already [filed an issue](https://github.com/artbycrunk/hyper-prompt/issues) that encompasses your feedback, please leave a 👍/👎 reaction on the issue
- Otherwise please file a new issue## Release Notes
See [CHANGELOG.md](https://github.com/artbycrunk/hyper-prompt/blob/master/CHANGELOG.md)
See [Recent Releases](https://github.com/artbycrunk/hyper-prompt/releases)
**Enjoy!**