Hyper-prompt
A Highly Customize-able prompt for your shell
Requirements
- Python3
- Powerline Fonts : https://github.com/powerline/fonts
Getting Started
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:
function _update_ps1() {
PS1=$(hyper-prompt $?)
}
if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi
* Zsh
Add the following to your .zshrc:
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:
function fish_prompt
hyper-prompt --shell bare $status
end
* tcsh
Add the following to your .tcshrc:
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
"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
- Contributions are always welcome!
- Any and all feedback is appreciated and welcome!
- If someone has already filed an issue that encompasses your feedback, please leave a 👍/👎 reaction on the issue
- Otherwise please file a new issue
Release Notes
See CHANGELOG.md
See Recent Releases
Enjoy!
Metadata
Release files for hyper-prompt 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hyper-prompt-1.1.1.tar.gz | 12.3 kB | Without provenance | Details for hyper-prompt-1.1.1.tar.gz |
Release files / hyper-prompt-1.1.1.tar.gz
| Download URL | hyper-prompt-1.1.1.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4cd62c49fb75182fa955761afcc653a79f6627e138edc744892c018e07266640
|
|
BLAKE2b-256 checksum How to use checksums |
44166f6c0ab9b3aa1730e9a185e7601106c94ff2464bd061bb04d97c42e1e06d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
|
Security for hyper-prompt 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.