File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 5353
5454PATH=/home/jgilmore/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/sbin:/usr/sbin
5555
56- local head
56+ local head CH USERCOLOR MACHINECOLOR
57+ # Set the color of the username depending on the md5sum, so each username will have a different color. Don't do white or black.
58+ CH=1
59+ while USERCOLOR=` echo $USER | md5sum | cut -c $CH -$CH ` ; echo $USERCOLOR | grep ' [07a-z]' > /dev/null; do
60+ CH=$(( $CH + 1 )) ;
61+ done
62+
63+ USERCOLOR=" $fg [$color [3$USERCOLOR ]]"
64+
5765# If using ssh, set machine name to red.
5866if [ " $SSH_TTY " ]; then
59- head= " %n@%{ $fg_bold [red]%}%m%{ $reset_color %} "
67+ MACHINECOLOR= " $fg_bold [red]"
6068else
61- head= ' %n@%m '
69+ MACHINECOLOR= " $reset_color "
6270fi
63- PROMPT=" $head %3~%(?.%{$fg [green]%}:%).%{$fg [red]%} %? :()%{$reset_color %}%#"
71+ head=" %{$USERCOLOR %}%n%{$reset_color %}@%{$MACHINECOLOR %}%m%{$reset_color %}"
72+
73+ PROMPT=" $head %3~%(?.%{$fg [green]%}:%).%{$fg [red]%} %? :()%{$reset_color %}%#"
6474
6575case $TERM in
6676 xterm* )
6777 precmd () {print -Pn " \e]0;zsh: %n@%m: %~\a" }
6878 preexec () { print -Pn " \e]0;zsh:%n@%m: %~,$1 \a" }
6979 ;;
7080esac
71-
81+ echo test
7282fortune Scripture\ Mastery
You can’t perform that action at this time.
0 commit comments