Merge branch 'master' of git://github.com/revans/bash-it
commit
65dfcaa00b
|
|
@ -1,3 +1,4 @@
|
|||
aliases/enabled
|
||||
plugins/enabled
|
||||
.DS_Store
|
||||
custom/*.bash
|
||||
|
|
|
|||
|
|
@ -17,9 +17,10 @@ fi
|
|||
|
||||
alias c='clear'
|
||||
alias k='clear'
|
||||
alias cls='clear'
|
||||
|
||||
alias edit="$EDITOR"
|
||||
alias page="$PAGER"
|
||||
alias pager="$PAGER"
|
||||
|
||||
alias q="exit"
|
||||
|
||||
|
|
@ -48,22 +49,25 @@ alias rd=rmdir
|
|||
function aliases-help() {
|
||||
echo "Generic Alias Usage"
|
||||
echo
|
||||
echo " sl = ls"
|
||||
echo " ls = ls -G"
|
||||
echo " la = ls -AF"
|
||||
echo " ll = ls -al"
|
||||
echo " l = ls -a"
|
||||
echo " c/k = clear"
|
||||
echo " .. = cd .."
|
||||
echo " ... = cd ../.."
|
||||
echo " - = cd -"
|
||||
echo " h = history"
|
||||
echo " md = mkdir -p"
|
||||
echo " rd = rmdir"
|
||||
echo " editor = $EDITOR"
|
||||
echo " pager = $PAGER"
|
||||
echo " piano = pianobar"
|
||||
echo " q = exit"
|
||||
echo " irc = $IRC_CLIENT"
|
||||
echo
|
||||
echo " sl = ls"
|
||||
echo " ls = ls -G"
|
||||
echo " la = ls -AF"
|
||||
echo " ll = ls -al"
|
||||
echo " l = ls -a"
|
||||
echo " c/k/cls = clear"
|
||||
echo " .. = cd .."
|
||||
echo " ... = cd ../.."
|
||||
echo " - = cd -"
|
||||
echo " h = history"
|
||||
echo " md = mkdir -p"
|
||||
echo " rd = rmdir"
|
||||
echo " editor = $EDITOR"
|
||||
echo " pager = $PAGER"
|
||||
echo " piano = pianobar"
|
||||
echo " q = exit"
|
||||
echo " irc = $IRC_CLIENT"
|
||||
echo " md = mkdir -p"
|
||||
echo " rd = rmdir"
|
||||
echo " rb = ruby"
|
||||
echo
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
# Some aliases for Homebrew
|
||||
|
||||
alias bup="brew update && brew upgrade"
|
||||
alias bout="brew outdated"
|
||||
alias bin="brew install"
|
||||
alias brm="brew uninstall"
|
||||
alias bls="brew list"
|
||||
alias bsr="brew search"
|
||||
alias binf="brew info"
|
||||
alias bdr="brew doctor"
|
||||
|
||||
function brew-help() {
|
||||
echo "Homebrew Alias Usage"
|
||||
echo
|
||||
echo "bup = brew update && brew upgrade"
|
||||
echo "bout = brew outdated"
|
||||
echo "bin = brew install"
|
||||
echo "brm = brew uninstall"
|
||||
echo "bls = brew list"
|
||||
echo "bsr = brew search"
|
||||
echo "binf = brew info"
|
||||
echo "bdr = brew doctor"
|
||||
echo
|
||||
}
|
||||
13
bash_it.sh
13
bash_it.sh
|
|
@ -37,12 +37,22 @@ do
|
|||
done
|
||||
|
||||
# Aliases
|
||||
FUNCTIONS="${BASH}/aliases/*.bash"
|
||||
if [ ! -d "${BASH}/aliases/enabled" ]
|
||||
then
|
||||
mkdir "${BASH}/aliases/enabled"
|
||||
ln -s ${BASH}/aliases/available/* "${BASH}/aliases/enabled"
|
||||
fi
|
||||
FUNCTIONS="${BASH}/aliases/enabled/*.bash"
|
||||
for config_file in $FUNCTIONS
|
||||
do
|
||||
source $config_file
|
||||
done
|
||||
|
||||
if [ -e "${BASH}/aliases/custom.aliases.bash" ]
|
||||
then
|
||||
source "${BASH}/aliases/custom.aliases.bash"
|
||||
fi
|
||||
|
||||
# Custom
|
||||
CUSTOM="${BASH}/custom/*.bash"
|
||||
for config_file in $CUSTOM
|
||||
|
|
@ -73,6 +83,7 @@ function bash-it() {
|
|||
echo " rails-help This will list out all the aliases you can use with rails."
|
||||
echo " git-help This will list out all the aliases you can use with git."
|
||||
echo " todo-help This will list out all the aliases you can use with todo.txt-cli"
|
||||
echo " brew-help This will list out all the aliases you can use with Homebrew"
|
||||
echo " aliases-help Generic list of aliases."
|
||||
echo " plugins-help This will list out all the plugins and functions you can use with bash-it"
|
||||
echo
|
||||
|
|
|
|||
|
|
@ -69,11 +69,11 @@ battery_charge(){
|
|||
local F_C='▸'
|
||||
# Depleted char
|
||||
local D_C='▹'
|
||||
local DEPLETED_COLOR='\[${normal}\]'
|
||||
local FULL_COLOR='\[${green}\]'
|
||||
local HALF_COLOR='\[${yellow}\]'
|
||||
local DANGER_COLOR='\[${red}\]'
|
||||
local BATTERY_OUTPUT='${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${D_C}'
|
||||
local DEPLETED_COLOR="${normal}"
|
||||
local FULL_COLOR="${green}"
|
||||
local HALF_COLOR="${yellow}"
|
||||
local DANGER_COLOR="${red}"
|
||||
local BATTERY_OUTPUT="${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${D_C}"
|
||||
local BATTERY_PERC=$(battery_percentage)
|
||||
|
||||
case $BATTERY_PERC in
|
||||
|
|
@ -123,7 +123,7 @@ battery_charge(){
|
|||
echo "${HALF_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${normal}"
|
||||
;;
|
||||
*)
|
||||
echo "${DANGER_COLOR}UNPLG\[${normal}\]"
|
||||
echo "${DANGER_COLOR}UNPLG${normal}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,15 +3,30 @@
|
|||
# The install directory is hard-coded. TOOD: allow the directory to be specified on the command line.
|
||||
#
|
||||
|
||||
[[ -z "$JQUERY_VERSION_NUMBER" ]] && JQUERY_VERSION_NUMBER="1.6.1"
|
||||
[[ -z "$JQUERY_UI_VERSION_NUMBER" ]] && JQUERY_UI_VERSION_NUMBER="1.8.13"
|
||||
|
||||
function rails_jquery {
|
||||
curl -o public/javascripts/rails.js http://github.com/rails/jquery-ujs/raw/master/src/rails.js
|
||||
}
|
||||
|
||||
function jquery_install {
|
||||
curl -o public/javascripts/jquery.js http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
version=$JQUERY_VERSION_NUMBER
|
||||
else
|
||||
version="$1"
|
||||
fi
|
||||
curl -o public/javascripts/jquery.js "http://ajax.googleapis.com/ajax/libs/jquery/$version/jquery.min.js"
|
||||
}
|
||||
|
||||
function jquery_ui_install {
|
||||
curl -o public/javascripts/jquery_ui.js http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js
|
||||
}
|
||||
function jquery_ui_install {
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
version=$JQUERY_UI_VERSION_NUMBER
|
||||
else
|
||||
version="$1"
|
||||
fi
|
||||
|
||||
curl -o public/javascripts/jquery_ui.js "http://ajax.googleapis.com/ajax/libs/jqueryui/$version/jquery-ui.min.js"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,29 @@
|
|||
#!/bin/bash
|
||||
switch () {
|
||||
rvm $1
|
||||
local v=$(rvm_version)
|
||||
rvm wrapper $1 textmate
|
||||
echo "Switch to Ruby version: "$v
|
||||
}
|
||||
|
||||
rvm_default () {
|
||||
rvm --default $1
|
||||
rvm wrapper $1 textmate
|
||||
}
|
||||
# Load RVM, if you are using it
|
||||
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
|
||||
|
||||
function rvm_version () {
|
||||
ruby --version
|
||||
}
|
||||
# Check to make sure that RVM is actually loaded before adding
|
||||
# the customizations to it.
|
||||
if [ "$rvm_path" ]
|
||||
then
|
||||
# Load the auto-completion script if RVM was loaded.
|
||||
[[ -r $rvm_path/scripts/completion ]] && . $rvm_path/scripts/completion
|
||||
|
||||
switch () {
|
||||
rvm $1
|
||||
local v=$(rvm_version)
|
||||
rvm wrapper $1 textmate
|
||||
echo "Switch to Ruby version: "$v
|
||||
}
|
||||
|
||||
rvm_default () {
|
||||
rvm --default $1
|
||||
rvm wrapper $1 textmate
|
||||
}
|
||||
|
||||
function rvm_version () {
|
||||
ruby --version
|
||||
}
|
||||
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -20,10 +20,14 @@ SCM_NONE_CHAR='○'
|
|||
RVM_THEME_PROMPT_PREFIX=' |'
|
||||
RVM_THEME_PROMPT_SUFFIX='|'
|
||||
|
||||
VIRTUALENV_THEME_PROMPT_PREFIX=' |'
|
||||
VIRTUALENV_THEME_PROMPT_SUFFIX='|'
|
||||
|
||||
function scm {
|
||||
if [[ -d .git ]]; then SCM=$GIT
|
||||
elif [[ -n "$(git symbolic-ref HEAD 2> /dev/null)" ]]; then SCM=$GIT
|
||||
elif [[ -d .hg ]]; then SCM=$HG
|
||||
elif [[ -n "$(hg root 2> /dev/null)" ]]; then SCM=$HG
|
||||
elif [[ -d .svn ]]; then SCM=$SVN
|
||||
else SCM='NONE'
|
||||
fi
|
||||
|
|
@ -78,9 +82,30 @@ function svn_prompt_info {
|
|||
echo -e "$prefix$ref$state$suffix"
|
||||
}
|
||||
|
||||
function hg_prompt_info() {
|
||||
if [[ -n $(hg status 2> /dev/null) ]]; then
|
||||
state=${HG_THEME_PROMPT_DIRTY:-$SCM_THEME_PROMPT_DIRTY}
|
||||
else
|
||||
state=${HG_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN}
|
||||
fi
|
||||
prefix=${HG_THEME_PROMPT_PREFIX:-$SCM_THEME_PROMPT_PREFIX}
|
||||
suffix=${HG_THEME_PROMPT_SUFFIX:-$SCM_THEME_PROMPT_SUFFIX}
|
||||
branch=$(hg summary 2> /dev/null | grep branch | awk '{print $2}')
|
||||
changeset=$(hg summary 2> /dev/null | grep parent | awk '{print $2}')
|
||||
|
||||
echo -e "$prefix$branch:${changeset#*:}$state$suffix"
|
||||
}
|
||||
|
||||
function rvm_version_prompt {
|
||||
if which rvm &> /dev/null; then
|
||||
rvm=$(rvm tools identifier) || return
|
||||
echo -e "$RVM_THEME_PROMPT_PREFIX$rvm$RVM_THEME_PROMPT_SUFFIX"
|
||||
fi
|
||||
}
|
||||
|
||||
function virtualenv_prompt {
|
||||
if which virtualenv &> /dev/null; then
|
||||
virtualenv=$([ ! -z "$VIRTUAL_ENV" ] && echo "`basename $VIRTUAL_ENV`") || return
|
||||
echo -e "$VIRTUALENV_THEME_PROMPT_PREFIX$virtualenv$VIRTUALENV_THEME_PROMPT_SUFFIX"
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,15 +4,6 @@ SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓"
|
|||
SCM_THEME_PROMPT_PREFIX=" |"
|
||||
SCM_THEME_PROMPT_SUFFIX="${green}|"
|
||||
|
||||
|
||||
# PROMPT="\[${bold_cyan}\]\[\$(scm_char)\]\[${green}\]\[\$(scm_prompt_info)\]\[${purple}\]\[\$(rvm_version_prompt)\] \[${yellow}\]\h \[${reset_color}\]in \[${green}\]\w \[${reset_color}\]\[\n\[${green}\]→\[${reset_color}\] "
|
||||
|
||||
|
||||
PROMPT="\n\[${yellow}\]\[\$(rvm_version_prompt)\] \[${purple}\]\h \[${reset_color}\]in \[${green}\]\w\n\[${bold_cyan}\]\[\$(scm_char)\]\[${green}\]\[\$(scm_prompt_info)\] \[\[${green}\]→\[${reset_color}\] "
|
||||
|
||||
|
||||
|
||||
# git theming
|
||||
GIT_THEME_PROMPT_DIRTY=" ${red}✗"
|
||||
GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓"
|
||||
GIT_THEME_PROMPT_PREFIX=" ${green}|"
|
||||
|
|
@ -21,3 +12,9 @@ GIT_THEME_PROMPT_SUFFIX="${green}|"
|
|||
RVM_THEME_PROMPT_PREFIX="|"
|
||||
RVM_THEME_PROMPT_SUFFIX="|"
|
||||
|
||||
function prompt_command() {
|
||||
#PS1="${bold_cyan}$(scm_char)${green}$(scm_prompt_info)${purple}$(rvm_version_prompt) ${yellow}\h ${reset_color}in ${green}\w ${reset_color}\n${green}→${reset_color} "
|
||||
PS1="\n${yellow}$(rvm_version_prompt) ${purple}\h ${reset_color}in ${green}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} "
|
||||
}
|
||||
|
||||
PROMPT_COMMAND=prompt_command;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,6 @@
|
|||
#!/bin/bash
|
||||
PROMPT="${green}\u@\h ${blue}\T ${reset_color}${white}\w${reset_color}\[\$(scm_prompt_info)\]${blue} →${bold_blue} \$${reset_color} "
|
||||
function prompt_command() {
|
||||
PS1="${green}\u@\h ${blue}\T ${reset_color}${white}\w${reset_color}$(scm_prompt_info)\]${blue} →${bold_blue} ${reset_color} ";
|
||||
}
|
||||
|
||||
PROMPT_COMMAND=prompt_command;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,3 @@
|
|||
if [ "$(whoami)" = root ]; then no_color=$red; else no_color=$white; fi
|
||||
|
||||
PROMPT="${no_color}\u${reset_color}:${blue}\W/${reset_color} \[\$(scm_prompt_info)\]$ "
|
||||
RPROMPT='[\t]'
|
||||
|
||||
|
||||
# git theming
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="${bold_blue}(${yellow}%B"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%b${bold_blue})${reset_color} "
|
||||
|
|
@ -13,4 +7,14 @@ ZSH_THEME_GIT_PROMPT_DIRTY="${bold_red}✗"
|
|||
|
||||
# LS colors, made with http://geoff.greer.fm/lscolors/
|
||||
export LSCOLORS="Gxfxcxdxbxegedabagacad"
|
||||
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
|
||||
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
|
||||
|
||||
function prompt_command() {
|
||||
|
||||
if [ "$(whoami)" = root ]; then no_color=$red; else no_color=$white; fi
|
||||
|
||||
PS1="${no_color}\u${reset_color}:${blue}\W/${reset_color} \[\$(scm_prompt_info)\]$ "
|
||||
RPROMPT='[\t]'
|
||||
}
|
||||
|
||||
PROMPT_COMMAND=prompt_command;
|
||||
|
|
|
|||
|
|
@ -1,44 +1,44 @@
|
|||
#!/bin/bash
|
||||
|
||||
black=$'\e[0;30m'
|
||||
red=$'\e[0;31m'
|
||||
green=$'\e[0;32m'
|
||||
yellow=$'\e[0;33m'
|
||||
blue=$'\e[0;34m'
|
||||
purple=$'\e[0;35m'
|
||||
cyan=$'\e[0;36m'
|
||||
white=$'\e[1;37m'
|
||||
orange=$'\e[33;40m'
|
||||
black="\[\e[0;30m\]"
|
||||
red="\[\e[0;31m\]"
|
||||
green="\[\e[0;32m\]"
|
||||
yellow="\[\e[0;33m\]"
|
||||
blue="\[\e[0;34m\]"
|
||||
purple="\[\e[0;35m\]"
|
||||
cyan="\[\e[0;36m\]"
|
||||
white="\[\e[1;37m\]"
|
||||
orange="\[\e[33;40m\]"
|
||||
|
||||
bold_black=$'\e[1;30m'
|
||||
bold_red=$'\e[1;31m'
|
||||
bold_green=$'\e[1;32m'
|
||||
bold_yellow=$'\e[1;33m'
|
||||
bold_blue=$'\e[1;34m'
|
||||
bold_purple=$'\e[1;35m'
|
||||
bold_cyan=$'\e[1;36m'
|
||||
bold_white=$'\e[1;37m'
|
||||
bold_orange=$'\e[1;33;40m'
|
||||
bold_black="\[\e[1;30m\]"
|
||||
bold_red="\[\e[1;31m\]"
|
||||
bold_green="\[\e[1;32m\]"
|
||||
bold_yellow="\[\e[1;33m\]"
|
||||
bold_blue="\[\e[1;34m\]"
|
||||
bold_purple="\[\e[1;35m\]"
|
||||
bold_cyan="\[\e[1;36m\]"
|
||||
bold_white="\[\e[1;37m\]"
|
||||
bold_orange="\[\e[1;33;40m\]"
|
||||
|
||||
underline_black=$'\e[4;30m'
|
||||
underline_red=$'\e[4;31m'
|
||||
underline_green=$'\e[4;32m'
|
||||
underline_yellow=$'\e[4;33m'
|
||||
underline_blue=$'\e[4;34m'
|
||||
underline_purple=$'\e[4;35m'
|
||||
underline_cyan=$'\e[4;36m'
|
||||
underline_white=$'\e[4;37m'
|
||||
underline_orange=$'\e[4;33;40m'
|
||||
underline_black="\[\e[4;30m\]"
|
||||
underline_red="\[\e[4;31m\]"
|
||||
underline_green="\[\e[4;32m\]"
|
||||
underline_yellow="\[\e[4;33m\]"
|
||||
underline_blue="\[\e[4;34m\]"
|
||||
underline_purple="\[\e[4;35m\]"
|
||||
underline_cyan="\[\e[4;36m\]"
|
||||
underline_white="\[\e[4;37m\]"
|
||||
underline_orange="\[\e[4;33;40m\]"
|
||||
|
||||
background_black=$'\e[40m'
|
||||
background_red=$'\e[41m'
|
||||
background_green=$'\e[42m'
|
||||
background_yellow=$'\e[43m'
|
||||
background_blue=$'\e[44m'
|
||||
background_purple=$'\e[45m'
|
||||
background_cyan=$'\e[46m'
|
||||
background_white=$'\e[47m'
|
||||
background_black="\[\e[40m\]"
|
||||
background_red="\[\e[41m\]"
|
||||
background_green="\[\e[42m\]"
|
||||
background_yellow="\[\e[43m\]"
|
||||
background_blue="\[\e[44m\]"
|
||||
background_purple="\[\e[45m\]"
|
||||
background_cyan="\[\e[46m\]"
|
||||
background_white="\[\e[47m\]"
|
||||
|
||||
|
||||
normal=$'\e[00m'
|
||||
reset_color=$'\e[39m'
|
||||
normal="\[\e[00m\]"
|
||||
reset_color="\[\e[39m\]"
|
||||
|
|
|
|||
|
|
@ -33,22 +33,22 @@
|
|||
#*color7: #E5E5E5
|
||||
|
||||
# ----------------------------------------------------------------- COLOR CONF
|
||||
D_DEFAULT_COLOR='\[${normal}\]'
|
||||
D_INTERMEDIATE_COLOR='\[${white}\]'
|
||||
D_USER_COLOR='\[${purple}\]'
|
||||
D_SUPERUSER_COLOR='\[${red}\]'
|
||||
D_MACHINE_COLOR='\[${cyan}\]'
|
||||
D_DIR_COLOR='\[${green}\]'
|
||||
D_SCM_COLOR='\[${yellow}\]'
|
||||
D_BRANCH_COLOR='\[${yellow}\]'
|
||||
D_CHANGES_COLOR='\[${white}\]'
|
||||
D_CMDFAIL_COLOR='\[${red}\]'
|
||||
D_VIMSHELL_COLOR='\[${cyan}\]'
|
||||
D_DEFAULT_COLOR="${normal}"
|
||||
D_INTERMEDIATE_COLOR="${white}"
|
||||
D_USER_COLOR="${purple}"
|
||||
D_SUPERUSER_COLOR="${red}"
|
||||
D_MACHINE_COLOR="${cyan}"
|
||||
D_DIR_COLOR="${green}"
|
||||
D_SCM_COLOR="${yellow}"
|
||||
D_BRANCH_COLOR="${yellow}"
|
||||
D_CHANGES_COLOR="${white}"
|
||||
D_CMDFAIL_COLOR="${red}"
|
||||
D_VIMSHELL_COLOR="${cyan}"
|
||||
|
||||
# ------------------------------------------------------------------ FUNCTIONS
|
||||
case $TERM in
|
||||
xterm*)
|
||||
TITLEBAR="\[\033]0;\w\007\]"
|
||||
TITLEBAR="\033]0;\w\007"
|
||||
;;
|
||||
*)
|
||||
TITLEBAR=""
|
||||
|
|
@ -84,10 +84,10 @@ ${D_BRANCH_COLOR}%b %r ${D_CHANGES_COLOR}%m%u ${D_DEFAULT_COLOR}"
|
|||
|
||||
# -------------------------------------------------------------- PROMPT OUTPUT
|
||||
prompt() {
|
||||
local SAVE_CURSOR='\[\033[s\]'
|
||||
local RESTORE_CURSOR='\[\033[u\]'
|
||||
local MOVE_CURSOR_RIGHTMOST='\[\033[500C\]'
|
||||
local MOVE_CURSOR_5_LEFT='\[\033[5D\]'
|
||||
local SAVE_CURSOR='\033[s'
|
||||
local RESTORE_CURSOR='\033[u'
|
||||
local MOVE_CURSOR_RIGHTMOST='\033[500C'
|
||||
local MOVE_CURSOR_5_LEFT='\033[5D'
|
||||
|
||||
if [ $(uname) = "Linux" ];
|
||||
then
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#!/bin/bash
|
||||
SCM_THEME_PROMPT_DIRTY=''
|
||||
SCM_THEME_PROMPT_CLEAN=''
|
||||
SCM_GIT_CHAR='${bold_cyan}±${normal}'
|
||||
SCM_SVN_CHAR='${bold_cyan}⑆${normal}'
|
||||
SCM_HG_CHAR='${bold_red}☿${normal}'
|
||||
SCM_GIT_CHAR="${bold_cyan}±${normal}"
|
||||
SCM_SVN_CHAR="${bold_cyan}⑆${normal}"
|
||||
SCM_HG_CHAR="${bold_red}☿${normal}"
|
||||
SCM_THEME_PROMPT_PREFIX=""
|
||||
SCM_THEME_PROMPT_SUFFIX=""
|
||||
RVM_THEME_PROMPT_PREFIX=" ("
|
||||
|
|
@ -32,14 +32,20 @@ virtualenv_prompt() {
|
|||
fi
|
||||
}
|
||||
|
||||
prompt_setter() {
|
||||
function prompt_setter() {
|
||||
# Save history
|
||||
history -a
|
||||
history -c
|
||||
history -r
|
||||
if [[ -z "$THEME_PROMPT_CLOCK_FORMAT" ]]
|
||||
then
|
||||
clock="\t"
|
||||
else
|
||||
clock=$THEME_PROMPT_CLOCK_FORMAT
|
||||
fi
|
||||
PS1="
|
||||
\t $(scm_char) [\[$THEME_PROMPT_HOST_COLOR\]\u@${THEME_PROMPT_HOST}\[$reset_color\]] $(virtualenv_prompt)\w
|
||||
$(doubletime_scm_prompt)\[$reset_color\] $ "
|
||||
$clock $(scm_char) [$THEME_PROMPT_HOST_COLOR\u@${THEME_PROMPT_HOST}$reset_color] $(virtualenv_prompt)\w
|
||||
$(doubletime_scm_prompt)$reset_color $ "
|
||||
PS2='> '
|
||||
PS4='+ '
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,187 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# This theme was obviously inspired a lot by
|
||||
#
|
||||
# - Demula theme
|
||||
#
|
||||
# which in itself was inspired by :
|
||||
#
|
||||
# - Ronacher's dotfiles (mitsuhikos) - http://github.com/mitsuhiko/dotfiles/tree/master/bash/
|
||||
# - Glenbot - http://theglenbot.com/custom-bash-shell-for-development/
|
||||
# - My extravagant zsh - http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/
|
||||
# - Monokai colors - http://monokai.nl/blog/2006/07/15/textmate-color-theme/
|
||||
# - Bash_it modern theme
|
||||
#
|
||||
# Hawaii50 theme supports :
|
||||
#
|
||||
# - configurable directory length
|
||||
# - hg, svn, git detection (I work in all of them)
|
||||
# - virtualenv, rvm + gemsets
|
||||
#
|
||||
# Screenshot: http://i.imgur.com/4IAMJ.png
|
||||
#
|
||||
# by Ryan Kanno <ryankanno@localkinegrinds.com>
|
||||
#
|
||||
# And yes, we code out in Hawaii. :D
|
||||
#
|
||||
# Note: I also am really new to this bash scripting game, so if you see things
|
||||
# that are flat out wrong, or if you think of something neat, just send a pull
|
||||
# request. This probably only works on a Mac - as some functions are OS
|
||||
# specific like getting ip, etc.
|
||||
#
|
||||
|
||||
# COLORS ======================================================================
|
||||
ORANGE='\[\e[0;33m\]'
|
||||
|
||||
DEFAULT_COLOR="${white}"
|
||||
|
||||
USER_COLOR="${purple}"
|
||||
SUPERUSER_COLOR="${red}"
|
||||
MACHINE_COLOR=$ORANGE
|
||||
IP_COLOR=$ORANGE
|
||||
DIRECTORY_COLOR="${green}"
|
||||
|
||||
VE_COLOR="${cyan}"
|
||||
RVM_COLOR="${cyan}"
|
||||
|
||||
REF_COLOR="${purple}"
|
||||
|
||||
# SCM prompts
|
||||
SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}"
|
||||
SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}"
|
||||
SCM_THEME_PROMPT_PREFIX=' on '
|
||||
SCM_THEME_PROMPT_SUFFIX=''
|
||||
|
||||
# rvm prompts
|
||||
RVM_THEME_PROMPT_PREFIX=''
|
||||
RVM_THEME_PROMPT_SUFFIX=''
|
||||
|
||||
# virtualenv prompts
|
||||
VIRTUALENV_THEME_PROMPT_PREFIX=''
|
||||
VIRTUALENV_THEME_PROMPT_SUFFIX=''
|
||||
|
||||
# virtual prompts
|
||||
VIRTUAL_PROMPT_ENABLED=1
|
||||
|
||||
VIRTUAL_THEME_PROMPT_PREFIX=' using '
|
||||
VIRTUAL_THEME_PROMPT_SUFFIX=''
|
||||
|
||||
# Max length of PWD to display
|
||||
MAX_PWD_LENGTH=20
|
||||
|
||||
# Max length of Git Hex to display
|
||||
MAX_GIT_HEX_LENGTH=5
|
||||
|
||||
# IP address
|
||||
IP_SEPARATOR=', '
|
||||
|
||||
# FUNCS =======================================================================
|
||||
|
||||
function ip {
|
||||
myip=$(curl -s checkip.dyndns.org | grep -Eo '[0-9\.]+')
|
||||
echo -e "$(ips | sed -e :a -e '$!N;s/\n/${IP_SEPARATOR}/;ta' | sed -e 's/127\.0\.0\.1\${IP_SEPARATOR}//g'), ${myip}"
|
||||
}
|
||||
|
||||
# Displays virtual info prompt (virtualenv/rvm)
|
||||
function virtual_prompt_info() {
|
||||
local virtual_env_info=$(virtualenv_prompt)
|
||||
local rvm_info=$(rvm_version_prompt)
|
||||
local virtual_prompt=""
|
||||
|
||||
local prefix=${VIRTUAL_THEME_PROMPT_PREFIX}
|
||||
local suffix=${VIRTUAL_THEME_PROMPT_SUFFIX}
|
||||
|
||||
# If no virtual info, just return
|
||||
[[ -z "$virtual_env_info" && -z "$rvm_info" ]] && return
|
||||
|
||||
# If virtual_env info present, append to prompt
|
||||
[[ -n "$virtual_env_info" ]] && virtual_prompt="virtualenv: ${VE_COLOR}$virtual_env_info${DEFAULT_COLOR}"
|
||||
|
||||
if [[ -n "$rvm_info" ]]
|
||||
then
|
||||
[[ -n "$virtual_env_info" ]] && virtual_prompt="$virtual_prompt, "
|
||||
virtual_prompt="${virtual_prompt}rvm: ${RVM_COLOR}$rvm_info${DEFAULT_COLOR}"
|
||||
fi
|
||||
echo -e "$prefix$virtual_prompt$suffix"
|
||||
}
|
||||
|
||||
# Parse git info
|
||||
function git_prompt_info() {
|
||||
if [[ -n $(git status -s 2> /dev/null |grep -v ^# |grep -v "working directory clean") ]]; then
|
||||
state=${GIT_THEME_PROMPT_DIRTY:-$SCM_THEME_PROMPT_DIRTY}
|
||||
else
|
||||
state=${GIT_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN}
|
||||
fi
|
||||
prefix=${GIT_THEME_PROMPT_PREFIX:-$SCM_THEME_PROMPT_PREFIX}
|
||||
suffix=${GIT_THEME_PROMPT_SUFFIX:-$SCM_THEME_PROMPT_SUFFIX}
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
||||
commit_id=$(git rev-parse HEAD 2>/dev/null) || return
|
||||
|
||||
echo -e "$prefix${REF_COLOR}${ref#refs/heads/}${DEFAULT_COLOR}:${commit_id:0:$MAX_GIT_HEX_LENGTH}$state$suffix"
|
||||
}
|
||||
|
||||
# Parse hg info
|
||||
function hg_prompt_info() {
|
||||
if [[ -n $(hg status 2> /dev/null) ]]; then
|
||||
state=${HG_THEME_PROMPT_DIRTY:-$SCM_THEME_PROMPT_DIRTY}
|
||||
else
|
||||
state=${HG_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN}
|
||||
fi
|
||||
prefix=${HG_THEME_PROMPT_PREFIX:-$SCM_THEME_PROMPT_PREFIX}
|
||||
suffix=${HG_THEME_PROMPT_SUFFIX:-$SCM_THEME_PROMPT_SUFFIX}
|
||||
branch=$(hg summary 2> /dev/null | grep branch | awk '{print $2}')
|
||||
changeset=$(hg summary 2> /dev/null | grep parent | awk '{print $2}')
|
||||
|
||||
echo -e "$prefix${REF_COLOR}${branch}${DEFAULT_COLOR}:${changeset#*:}$state$suffix"
|
||||
}
|
||||
|
||||
# Parse svn info
|
||||
function svn_prompt_info() {
|
||||
if [[ -n $(svn status --ignore-externals -q 2> /dev/null) ]]; then
|
||||
state=${SVN_THEME_PROMPT_DIRTY:-$SCM_THEME_PROMPT_DIRTY}
|
||||
else
|
||||
state=${SVN_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN}
|
||||
fi
|
||||
prefix=${SVN_THEME_PROMPT_PREFIX:-$SCM_THEME_PROMPT_PREFIX}
|
||||
suffix=${SVN_THEME_PROMPT_SUFFIX:-$SCM_THEME_PROMPT_SUFFIX}
|
||||
ref=$(svn info 2> /dev/null | awk -F/ '/^URL:/ { for (i=0; i<=NF; i++) { if ($i == "branches" || $i == "tags" ) { print $(i+1); break }; if ($i == "trunk") { print $i; break } } }') || return
|
||||
[[ -z $ref ]] && return
|
||||
|
||||
revision=$(svn info 2> /dev/null | sed -ne 's#^Revision: ##p' )
|
||||
|
||||
echo -e "$prefix${REF_COLOR}$ref${DEFAULT_COLOR}:$revision$state$suffix"
|
||||
}
|
||||
|
||||
# Displays last X characters of pwd
|
||||
function limited_pwd() {
|
||||
|
||||
# Replace $HOME with ~ if possible
|
||||
RELATIVE_PWD=${PWD/#$HOME/\~}
|
||||
|
||||
local offset=$((${#RELATIVE_PWD}-$MAX_PWD_LENGTH))
|
||||
|
||||
if [ $offset -gt "0" ]
|
||||
then
|
||||
local truncated_symbol="..."
|
||||
TRUNCATED_PWD=${RELATIVE_PWD:$offset:$MAX_PWD_LENGTH}
|
||||
echo -e "${truncated_symbol}/${TRUNCATED_PWD#*/}"
|
||||
else
|
||||
echo -e "${RELATIVE_PWD}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Displays the current prompt
|
||||
function prompt() {
|
||||
local UC=$USER_COLOR
|
||||
[ $UID -eq "0" ] && UC=$SUPERUSER_COLOR
|
||||
|
||||
if [[ $VIRTUAL_PROMPT_ENABLED == 1 ]]; then
|
||||
PS1="$(scm_char) ${UC}\u ${DEFAULT_COLOR}at ${MACHINE_COLOR}\h ${DEFAULT_COLOR}(${IP_COLOR}$(ip)${DEFAULT_COLOR}) in ${DIRECTORY_COLOR}$(limited_pwd)${DEFAULT_COLOR}$(virtual_prompt_info)$(scm_prompt_info)${reset_color} \$ "
|
||||
else
|
||||
PS1="$(scm_char) ${UC}\u ${DEFAULT_COLOR}at ${MACHINE_COLOR}\h ${DEFAULT_COLOR}(${IP_COLOR}$(ip)${DEFAULT_COLOR}) in ${DIRECTORY_COLOR}$(limited_pwd)${DEFAULT_COLOR}$(scm_prompt_info)${reset_color} \$ "
|
||||
fi
|
||||
PS2='> '
|
||||
PS4='+ '
|
||||
}
|
||||
|
||||
PROMPT_COMMAND=prompt
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
SCM_THEME_PROMPT_PREFIX=""
|
||||
SCM_THEME_PROMPT_SUFFIX=""
|
||||
|
||||
SCM_THEME_PROMPT_DIRTY=' ${bold_red}✗${normal}'
|
||||
SCM_THEME_PROMPT_CLEAN=' ${bold_green}✓${normal}'
|
||||
SCM_GIT_CHAR='${bold_green}±${normal}'
|
||||
SCM_SVN_CHAR='${bold_cyan}⑆${normal}'
|
||||
SCM_HG_CHAR='${bold_red}☿${normal}'
|
||||
SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}"
|
||||
SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}"
|
||||
SCM_GIT_CHAR="${bold_green}±${normal}"
|
||||
SCM_SVN_CHAR="${bold_cyan}⑆${normal}"
|
||||
SCM_HG_CHAR="${bold_red}☿${normal}"
|
||||
|
||||
case $TERM in
|
||||
xterm*)
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
SCM_THEME_PROMPT_PREFIX=""
|
||||
SCM_THEME_PROMPT_SUFFIX=""
|
||||
|
||||
SCM_THEME_PROMPT_DIRTY=' ${bold_red}✗${normal}'
|
||||
SCM_THEME_PROMPT_CLEAN=' ${bold_green}✓${normal}'
|
||||
SCM_GIT_CHAR='${bold_green}±${normal}'
|
||||
SCM_SVN_CHAR='${bold_cyan}⑆${normal}'
|
||||
SCM_HG_CHAR='${bold_red}☿${normal}'
|
||||
SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}"
|
||||
SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}"
|
||||
SCM_GIT_CHAR="${bold_green}±${normal}"
|
||||
SCM_SVN_CHAR="${bold_cyan}⑆${normal}"
|
||||
SCM_HG_CHAR="${bold_red}☿${normal}"
|
||||
|
||||
case $TERM in
|
||||
xterm*)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,11 @@
|
|||
# host directory (branch*)»
|
||||
# for example:
|
||||
# ananas ~/Code/bash-it/themes (master*)»
|
||||
PROMPT="${bold_blue}\[\$(hostname)\]${normal} \w${normal} ${bold_white}\[\$(git_prompt_info)\]${normal}» "
|
||||
function prompt_command() {
|
||||
PS1="${bold_blue}[$(hostname)]${normal} \w${normal} ${bold_white}[$(git_prompt_info)]${normal}» "
|
||||
}
|
||||
|
||||
PROMPT_COMMAND=prompt_command;
|
||||
|
||||
## git-theme
|
||||
# feel free to change git chars.
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ prompt_setter() {
|
|||
history -a
|
||||
history -c
|
||||
history -r
|
||||
PS1="(\t) $(scm_char) [\[$blue\]\u\[$reset_color\]@\[$green\]\H\[$reset_color\]] \[$yellow\]\w\[$reset_color\]$(scm_prompt_info)$(rvm_version_prompt) $\[$reset_color\] "
|
||||
PS1="(\t) $(scm_char) [$blue\u$reset_color@$green\H$reset_color] $yellow\w${reset_color}$(scm_prompt_info)$(rvm_version_prompt) $reset_color "
|
||||
PS2='> '
|
||||
PS4='+ '
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
# based off of n0qorg
|
||||
# looks like, if you're in a git repo:
|
||||
# ± ~/path/to (branch ✓) $
|
||||
# in glorious red / blue / yellow color scheme
|
||||
|
||||
prompt_setter() {
|
||||
# Save history
|
||||
history -a
|
||||
history -c
|
||||
history -r
|
||||
# displays user@server in purple
|
||||
# PS1="$red$(scm_char) $purple\u@\h$reset_color:$blue\w$yellow$(scm_prompt_info)$(rvm_version_prompt) $black\$$reset_color "
|
||||
# no user@server
|
||||
PS1="$red$(scm_char) $blue\w$yellow$(scm_prompt_info)$(rvm_version_prompt) $black\$$reset_color "
|
||||
PS2='> '
|
||||
PS4='+ '
|
||||
}
|
||||
|
||||
PROMPT_COMMAND=prompt_setter
|
||||
|
||||
SCM_NONE_CHAR='·'
|
||||
SCM_THEME_PROMPT_DIRTY=" ${red}✗"
|
||||
SCM_THEME_PROMPT_CLEAN=" ${green}✓"
|
||||
SCM_THEME_PROMPT_PREFIX=" ("
|
||||
SCM_THEME_PROMPT_SUFFIX="${yellow})"
|
||||
RVM_THEME_PROMPT_PREFIX=" ("
|
||||
RVM_THEME_PROMPT_SUFFIX=")"
|
||||
|
|
@ -13,6 +13,10 @@ function rvm_version_prompt {
|
|||
|
||||
[ "$full" != "" ] && echo "$full"
|
||||
}
|
||||
|
||||
function prompt_command() {
|
||||
# Check http://github.com/Sirupsen/dotfiles for screenshot
|
||||
PS1="$blue\W/$bold_blue$(rvm_version_prompt)$bold_green$(__git_ps1 " (%s)") ${normal}$ "
|
||||
}
|
||||
|
||||
# Check http://github.com/Sirupsen/dotfiles for screenshot
|
||||
PS1='\[$blue\]\W/\[$bold_blue\]$(rvm_version_prompt)\[$bold_green\]$(__git_ps1 " (%s)") \[${normal}\]$ '
|
||||
PROMPT_COMMAND=prompt_command;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
PROMPT='\[${green}\]\u\[${normal}\]@\[${green}\]\h\[${normal}\]:\[${blue}\]\w\[${normal}\]\[${red}\]$(prompt_char)$(git_prompt_info)\[${normal}\]\$ '
|
||||
|
||||
|
||||
|
||||
# scm themeing
|
||||
SCM_THEME_PROMPT_DIRTY="×"
|
||||
SCM_THEME_PROMPT_CLEAN="✓"
|
||||
|
|
@ -19,4 +15,10 @@ case $TERM in
|
|||
*)
|
||||
TITLEBAR=""
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
function prompt_command() {
|
||||
PROMPT='${green}\u${normal}@${green}\h${normal}:${blue}\w${normal}${red}$(prompt_char)$(git_prompt_info)${normal}\$ '
|
||||
}
|
||||
|
||||
PROMPT_COMMAND=prompt_command;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,6 @@
|
|||
#!/bin/bash
|
||||
# zitron theme by Florian Baumann <flo@noqqe.de>
|
||||
|
||||
## look-a-like
|
||||
# user:host:pwd git-branch(*)$
|
||||
# for example:
|
||||
# noqqe:deathstar:themes master*$
|
||||
PROMPT="${no_color}\u:\[\$(hostname)\]${normal}:${bold_yellow}\W/${normal} \[\$(git_prompt_info)\]${reset_color}$ "
|
||||
|
||||
## git-theme
|
||||
# feel free to change git chars.
|
||||
GIT_THEME_PROMPT_DIRTY="${bold_yellow}*${normal}"
|
||||
|
|
@ -18,3 +12,13 @@ GIT_THEME_PROMPT_SUFFIX=""
|
|||
# thanks a lot to http://geoff.greer.fm/lscolors/
|
||||
export LSCOLORS="Gxfxcxdxbxegedabagacad"
|
||||
export LS_COLORS="no=00:fi=00:di=01;33:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;34:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:"
|
||||
|
||||
function prompt_command() {
|
||||
## look-a-like
|
||||
# user:host:pwd git-branch(*)$
|
||||
# for example:
|
||||
# noqqe:deathstar:themes master*$
|
||||
PS1="${no_color}\u:$(hostname)${normal}:${bold_yellow}\W/${normal} $(git_prompt_info)${reset_color}$ "
|
||||
}
|
||||
|
||||
PROMPT_COMMAND=prompt_command;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
SCM_THEME_PROMPT_PREFIX=""
|
||||
SCM_THEME_PROMPT_SUFFIX=""
|
||||
|
||||
SCM_THEME_PROMPT_DIRTY=' ${bold_red}✗${normal}'
|
||||
SCM_THEME_PROMPT_CLEAN=' ${bold_green}✓${normal}'
|
||||
SCM_GIT_CHAR='${bold_green}±${normal}'
|
||||
SCM_SVN_CHAR='${bold_cyan}⑆${normal}'
|
||||
SCM_HG_CHAR='${bold_red}☿${normal}'
|
||||
SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}"
|
||||
SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}"
|
||||
SCM_GIT_CHAR="${bold_green}±${normal}"
|
||||
SCM_SVN_CHAR="${bold_cyan}⑆${normal}"
|
||||
SCM_HG_CHAR="${bold_red}☿${normal}"
|
||||
|
||||
#Mysql Prompt
|
||||
export MYSQL_PS1="(\u@\h) [\d]> "
|
||||
|
|
|
|||
Loading…
Reference in New Issue