sup
Go PS1 Status Updater
Motivation
The prompt is a good place for contextual information, but other tools were slow. So I wrote this instead!
This work was inspired by the venerable Powerline, but does not share any code.
Goals
- Spin up and down as fast as reasonable
- A+ Rating on Report Card
Screenshots
Context-Sensitive Status Reporting:
Working Directory Truncation:
- SSH Hostname
- Username
- Python Virtual Environment
- Version Control
- Working Directory
- Exit codes (including pipelines)
Requirements
Compile-Time
Runtime
- powerline-fonts for special glyphs
- VCS/SCM Reporting:
- (Optional) Git
- (Optional) Subversion
Installation
- Clone repo and enter its directory
make
sudo make install
Usage
Bash
Add the following line exactly to your bashrc
:
source /usr/share/sup/bash.sh
Reload your bashrc
or open a new terminal. Enjoy!
Zsh
Add the following line exactly to your zshrc
:
source /usr/share/sup/sup.zsh
Reload your zshrc
or open a new terminal. Enjoy!
Themes
Theming may be enabled by setting an environment variable, e.g."
export SUP_THEME=warm
Where warm.json
in one of the theme directories corresponds with the desired theme.
See the examples in:
/usr/share/sup/themes/
For your convenience, per-user themes may be installed in:
~/.config/sup/themes/
License
Copyright 2021 Bryan T. Meyers root@datadrake.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.