Skip to content

Instantly share code, notes, and snippets.

@mnewt
Created December 9, 2012 00:46
Show Gist options
  • Select an option

  • Save mnewt/4242782 to your computer and use it in GitHub Desktop.

Select an option

Save mnewt/4242782 to your computer and use it in GitHub Desktop.
modified version of prose theme prompt for zsh/oh-my-zsh
# virtualenv
VIRTUAL_ENV_DISABLE_PROMPT="true"
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
}
function vcprompt_info {
vcprompt --format-git "on ± %{$fg[magenta]%}%b%{$reset_color%}%{$fg[green]%}%u%m%a%{$reset_color%}" \
--format-hg "on ☿ %{$fg[magenta]%}%b%{$reset_color%}%{$fg[green]%}%u%m%{$reset_color%}" \
--format "on %s %{$fg[magenta]%}%b%{$reset_color%}%{$fg[green]%}%u%m%{$reset_color%}"
}
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name || hostname -s
}
PROMPT='%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}$(box_name)%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%} $(vcprompt_info) %{$fg_bold[blue]%}$(virtualenv_info)%{$reset_color%}
%(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )%# '
local return_status="%{$fg[red]%}%(?..✘)%{$reset_color%}"
RPROMPT='${return_status}%{$reset_color%}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment