In order to become a card-carrying Linux user, I feel like you need to have spent a truly astounding amount of time fiddling with your dotfiles.
Me? I’ve gone way beyond the point of diminishing returns. Past the point where anyone who loves me can even feign interest. And now I’m quaffing the sweet nectar of victory, and that victory nectar is sweet. Oh yes, that’s right: my insanely customized prompt is now a part of Bobby Russell’s Oh-My-ZSH
I’m feeling the pride, joy, and anxiety that can only come from watching my little utf-8 baby move beyond my home directory and march deep into the uncharted home directories of what I can only assume are BILLIONS of users.
All your Oh-My-ZSH are belong to us! * ¶
…or it will when you update your theme. See, cause, oh-my-zsh uses themes to specify how your prompt looks. You can define what theme you’d like to use in your ~/.zshrc
file. On or around line 8 you’ll want to update the line that starts with ZSH_THEME=…
to look like this:
Almost, not quite… ¶
Like any good dotfile obsessive, I’ve continued to make changes to this prompt since I made my pull request to ole Robby! I’ve modified the prompt to show the same sort of branch information about SVN repos that it currently displays for git repos (e.g., current branch name and local modifications). That little code chestnut is available over on my fork of the oh-my-zsh build.
Bash Junkfood theme ¶
I also have a version of this prompt for Bash that I’ve made in preperation for the undoubted overwhelming demand that I expect to begin any time now:
# An extravagent PS1 http://blog.bigdinosaur.org/easy-ps1-colors/
function prompt {
# 30m - Black
# 31m - Red
# 32m - Green
# 33m - Yellow
# 34m - Blue
# 35m - Purple
# 36m - Cyan
# 37m - White
# 0 - Normal
# 1 - Bold
local BLACK="\[\033[0;30m\]"
local BLACKBOLD="\[\033[1;30m\]"
local RED="\[\033[0;31m\]"
local REDBOLD="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
local GREENBOLD="\[\033[1;32m\]"
local YELLOW="\[\033[0;33m\]"
local YELLOWBOLD="\[\033[1;33m\]"
local BLUE="\[\033[0;34m\]"
local BLUEBOLD="\[\033[1;34m\]"
local PURPLE="\[\033[0;35m\]"
local PURPLEBOLD="\[\033[1;35m\]"
local CYAN="\[\033[0;36m\]"
local CYANBOLD="\[\033[1;36m\]"
local WHITE="\[\033[0;37m\]"
local WHITEBOLD="\[\033[1;37m\]"
export PS1="$WHITEBOLD# $GREEN\u$WHITEBOLD. $BLUE\h$WHITEBOLD. $YELLOW\d$WHITE at $PURPLE\@$WHITEBOLD. $CYAN\w\n $WHITE"
}
prompt
Prompt Inspiration ¶
Most of the inspiration for moving to ZSH and for creating this extravagant (to borrow a phrase) prompt came from a blog post written by Mr. Steve Losh called, “My Extravagant ZSH Prompt”.