Skip to content

Commit

Permalink
portable PS1 colors support
Browse files Browse the repository at this point in the history
  • Loading branch information
ambv committed Sep 23, 2010
1 parent a12e1c9 commit eff702f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 8 additions & 1 deletion profile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
# for common variables look at profile_common.
#

#
# the prompt
#
if [ -e ~/.pscolors ]; then
source ~/.pscolors
fi
export PS1="$PS_USERCOLOR\\u$PS_ATCOLOR@$PS_HOSTCOLOR\\H$PS_COLONCOLOR:$PS_PATHCOLOR\\w$PS_PROMPTCOLOR $ $PS_NOCOLOR"

#
# my Bash modifications
#
Expand All @@ -13,7 +21,6 @@ bind -m vi-insert "\C-p":dynamic-complete-history
bind -m vi-insert "\C-a":vi-append-eol
export HISTCONTROL=erasedups
export HISTSIZE=10000
export PS1="\\u@\\H:\\w $ "
set -o vi

source ~/.profile_common
Expand Down
6 changes: 4 additions & 2 deletions zshrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Zsh-specific profile. For Bash specific look at profile,
# for common variables look at profile_common.
#

setopt allexport

PS1='%n@%m:%~ $ '
if [ -e ~/.pscolors ]; then
source ~/.pscolors
fi
PS1="%{$PS_USERCOLOR%}%n%{$PS_ATCOLOR%}@%{$PS_HOSTCOLOR%}%m%{$PS_COLONCOLOR%}:%{$PS_PATHCOLOR%}%~%{$PS_PROMPTCOLOR%} $ %{$PS_NOCOLOR%}"
HISTFILE=~/.zhistory
HISTSIZE=10000
SAVEHIST=10000
Expand Down

0 comments on commit eff702f

Please sign in to comment.