Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/PhilippMolitor/abbr-zsh-theme
A fast and simple ZSH theme with abbreviated expressions and sane information.
https://github.com/PhilippMolitor/abbr-zsh-theme
oh-my-zsh oh-my-zsh-theme prompt zsh zsh-prompt zsh-theme zshell zshrc
Last synced: about 2 months ago
JSON representation
A fast and simple ZSH theme with abbreviated expressions and sane information.
- Host: GitHub
- URL: https://github.com/PhilippMolitor/abbr-zsh-theme
- Owner: PhilippMolitor
- License: gpl-3.0
- Created: 2018-10-22T21:14:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-03-06T09:34:22.000Z (about 5 years ago)
- Last Synced: 2024-04-09T04:43:08.159Z (about 2 months ago)
- Topics: oh-my-zsh, oh-my-zsh-theme, prompt, zsh, zsh-prompt, zsh-theme, zshell, zshrc
- Language: Shell
- Homepage:
- Size: 91.8 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-zsh-plugins - abbr (theme) - Displays an abbreviated version of the current directory path, shows the Python virtualenv, Rust version, `git` status, and the exit code of last command. Works well on dark backgrounds by default but colors can be easily customized. (Themes / ZSH on Windows)
README
# ABBR ZSH theme
### Screenshots
![Screenshot](./screenshots/01.jpg)### Information
If you like the theme, or even better, you are using it, please consider giving
this repository a star to let me know! :smiley:
Also, if you have got any improvements to the theme, feel free to send a pull request!### Segments
* Exit code (tick on 0, else exit code) with colorization
* hostname/username
* Abbreviated PWD
* $ or # (privilege)### Badges
* Python (works with `virtualenv`, `venv` and `Pipenv` shell)
* Rust version (detects Cargo.toml)
* Git status (branch name, untracked, dirty)### Variables
|Variable |Default |
|--------------------------------|---------|
|ABBR_BADGE_PYTHON_PREFIX |`empty` |
|ABBR_BADGE_RUST_PREFIX |`empty` |
|ABBR_BADGE_GIT_PREFIX |`\u00b1` |
|ABBR_BADGE_GIT_UNTRACKED_SYMBOL |? |
|ABBR_BADGE_GIT_DIRTY_SYMBOL |! |### Colors
You can change the prompt colors by changing these variables in your `.zshrc`.|Variable |Default |
|----------------------------|-----------------|
|ABBR_FG_RETVAL_GOOD |white |
|ABBR_BG_RETVAL_GOOD |green |
|ABBR_FG_RETVAL_BAD |yellow |
|ABBR_BG_RETVAL_BAD |black |
|ABBR_FG_LOGON |black |
|ABBR_BG_LOGON |cyan |
|ABBR_FG_PWD |white |
|ABBR_BG_PWD |none |
|ABBR_FG_PROMPT_ROOT |red |
|ABBR_BG_PROMPT_ROOT |none |
|ABBR_FG_PROMPT_DEFAULT |`$ABBR_BG_LOGON` |
|ABBR_BG_PROMPT_DEFAULT |none |
|ABBR_FG_BADGE_PYTHON |blue |
|ABBR_BG_BADGE_PYTHON |yellow |
|ABBR_FG_BADGE_RUST |white |
|ABBR_BG_BADGE_RUST |blue |
|ABBR_FG_BADGE_GIT |yellow |
|ABBR_BG_BADGE_GIT |black |
|ABBR_FG_BADGE_GIT_UNTRACKED |red |
|ABBR_FG_BADGE_GIT_DIRTY |red |### How does the path abbreviation work?
Basically, similar to the one you find in `vim`.
Every path inside the home directory will start with `~` rather than the absolute path.
Each directory in the current PWD will be shortened to one character,
execept it starts with a `.`, then, two characters will be displayed.
The current folder will not be abbreviated.Examples (username is phil):
* `/home/phil` -> `~`
* `/home/phil/test/abc` -> `~/t/abc`
* `/home/phil/.local/share/nano` -> `~/.l/s/nano`
* `/home/phil_butnotphil/test` -> `/h/p/test`
* `/home/linus` -> `/h/linus`