Skip to content

ymulenll/oh-my-zsh-better-robbyrussell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

oh-my-zsh-better-robbyrussell

A modernized twist on the default robbyrussell theme for Oh My Zsh.
It keeps the simplicity of the original theme while adding AWS profile awareness and a clean Git branch indicator (with optional truncation).


✨ Features

  • ✅ AWS profile indicator (in yellow, hidden if using default)
  • ✅ Git branch display (optional truncation, disabled by default)
  • ✅ Directory name display (optional truncation, disabled by default)
  • ✅ Minimal look inspired by robbyrussell
  • ✅ Green arrow if last command succeeded, red arrow if it failed
  • ✅ Current directory in cyan

📦 Installation

curl -fsSL https://raw.githubusercontent.com/ymulenll/oh-my-zsh-better-robbyrussell/main/better-robbyrussell.zsh-theme -o $ZSH_CUSTOM/themes/better-robbyrussell.zsh-theme

Then edit your ~/.zshrc:

ZSH_THEME="better-robbyrussell"
plugins=(git aws)  # required

Reload with:

source ~/.zshrc

⚠️ Requirements

This theme requires the following Oh My Zsh plugins to function properly:

Make sure they’re listed in your plugins=(...) inside ~/.zshrc.


⚙️ Configuration

Truncation is disabled by default. To enable truncation, add these variables to your ~/.zshrc:

Git branch truncation:

TRUNCATED_BRANCH_NAME_LENGTH=10

(Only truncates if this variable is set)

Git branch start word:

TRUNCATED_BRANCH_NAME_START_WITH="CR-"

Extract branch name starting from a specific word/prefix. For example, with TRUNCATED_BRANCH_NAME_START_WITH="CR-" and TRUNCATED_BRANCH_NAME_LENGTH=7, a branch like bugfix/CR-7777-fix-bug will display as CR-7777.

Directory name truncation:

TRUNCATED_DIR_NAME_LENGTH=15

(Only truncates if this variable is set)


📸 Preview

🎯 Clean State - Default appearance

Simple and clean with no additional indicators

Clean theme preview showing basic prompt with green arrow and directory

🌿 Git Branch Truncation - Long branch names

Branch names can be truncated by setting TRUNCATED_BRANCH_NAME_LENGTH

Long branch name preview showing truncated git branch in blue parentheses

☁️ AWS Profile Indicator - Custom profile awareness

Yellow indicator shows when using non-default AWS profiles

Custom AWS profile preview showing yellow profile indicator

💡 Tip: The theme automatically adapts to your environment - AWS profiles only show when not using default. Truncation is optional and can be enabled by setting TRUNCATED_BRANCH_NAME_LENGTH and/or TRUNCATED_DIR_NAME_LENGTH in your ~/.zshrc.


🤝 Contributing

PRs and issues are welcome!
If you’d like to add improvements (extra indicators, right prompt, colors, etc.), feel free to open a pull request.


📜 License

MIT


🔖 Tags

zsh · oh-my-zsh · theme · robbyrussell · git · aws

About

Robbyrussell inspired theme but tweaked to work with aws and truncate large github branch names

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages