Keep track of the current Git branch, Terraform workspace an so on with a fast, easy and extensible way.
Note
This program is in early stage of development and is subject to change.
However, good ideas are always welcome. Use issue to give me some feedback.
- Python 3.7+
This project has not been published to PyPI yet.
Thus, you can install by referencing this Git repo:
pip3 install git+https://github.com/jacky9813/super_prompt
# Install and enable plugins
Open the shell resource file (for example: ~/.bashrc
) and modify the PS1
prompt variable like:
# Original: PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]($(super-prompt run))\$ '
# Added Part: ^^^^^^^^^^^^^^^^^^^^^
After restarting the shell or reload resource file with source ~/.bashrc
, we should get a prompt like:
user@my-workstation:~/super_prompt(๐ master)$
The plugin needs to be enable manually after installation:
super-prompt config enable-plugin PLUGIN_NAME
You can also disable the plugin:
super-prompt config disable-plugin PLUGIN_NAME
You can check installed plugins with command:
super-prompt config list-plugins
The configuration is saved at ~/.config/super-prompt.toml
.
Although you can edit it manually, the program also provides basic configuration Interface for users not familiar with toml file.
For example:
super-prompt config set core.context_color 31
Option Name | Type | Description |
---|---|---|
core.context_color | color | The text color for showing current context. You can either use ANSI 3-bit color code or RGB color if your terminal support it. For example:
- |