Commit 6fd0b73e authored by zghember's avatar zghember
Browse files

Merge commit '141c2e59'

parents 6f70d288 141c2e59
if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi if [ "$USER" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
......
if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="magenta"; fi if [ "$USER" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="magenta"; fi
local return_code="%(?..%{$fg_bold[red]%}:( %?%{$reset_color%})" local return_code="%(?..%{$fg_bold[red]%}:( %?%{$reset_color%})"
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
# git untracked files modification from Brian Carper: # git untracked files modification from Brian Carper:
# http://briancarper.net/blog/570/git-info-in-your-zsh-prompt # http://briancarper.net/blog/570/git-info-in-your-zsh-prompt
export VIRTUAL_ENV_DISABLE_PROMPT=1
function virtualenv_info { function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('$fg[blue]`basename $VIRTUAL_ENV`%{$reset_color%}') ' [ $VIRTUAL_ENV ] && echo '('$fg[blue]`basename $VIRTUAL_ENV`%{$reset_color%}') '
} }
......
...@@ -10,7 +10,7 @@ Y=$fg_no_bold[yellow] ...@@ -10,7 +10,7 @@ Y=$fg_no_bold[yellow]
B=$fg_no_bold[blue] B=$fg_no_bold[blue]
RESET=$reset_color RESET=$reset_color
if [ "$(whoami)" = "root" ]; then if [ "$USER" = "root" ]; then
PROMPTCOLOR="%{$R%}" PREFIX="-!-"; PROMPTCOLOR="%{$R%}" PREFIX="-!-";
else else
PROMPTCOLOR="" PREFIX="---"; PROMPTCOLOR="" PREFIX="---";
......
# Grab the current version of ruby in use (via RVM): [ruby-1.8.7] # Grab the current version of ruby in use: [ruby-1.8.7]
if [ -e ~/.rvm/bin/rvm-prompt ]; then JARIN_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[red]%}\$(ruby_prompt_info)%{$fg[white]%}]%{$reset_color%}"
JARIN_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt i v)%{$fg[white]%}]%{$reset_color%}"
else
if which rbenv &> /dev/null; then
JARIN_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[red]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg[white]%}]%{$reset_color%}"
fi
fi
# Grab the current filepath, use shortcuts: ~/Desktop # Grab the current filepath, use shortcuts: ~/Desktop
# Append the current git branch, if in a git repository # Append the current git branch, if in a git repository
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# Machine name. # Machine name.
function box_name { function box_name {
[ -f ~/.box-name ] && cat ~/.box-name || hostname [ -f ~/.box-name ] && cat ~/.box-name || echo $HOST
} }
# Directory info. # Directory info.
...@@ -33,7 +33,7 @@ ${git_info} \ ...@@ -33,7 +33,7 @@ ${git_info} \
%{$fg[white]%}[%*] %{$fg[white]%}[%*]
%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}" %{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"
if [[ "$(whoami)" == "root" ]]; then if [[ "$USER" == "root" ]]; then
PROMPT=" PROMPT="
%{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \ %{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \
%{$bg[yellow]%}%{$fg[cyan]%}%n%{$reset_color%} \ %{$bg[yellow]%}%{$fg[cyan]%}%n%{$reset_color%} \
......
#!/bin/sh #!/usr/bin/env zsh
zmodload zsh/datetime
function _current_epoch() { function _current_epoch() {
echo $(($(date +%s) / 60 / 60 / 24)) echo $(( $EPOCHSECONDS / 60 / 60 / 24 ))
} }
function _update_zsh_update() { function _update_zsh_update() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment