Skip to content

Commit

Permalink
Expose prompt colors and custom MySQL prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
mal committed Jul 5, 2016
1 parent dd7497f commit fc8320a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .common.d/mysql.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export MYSQL_PS1="$(echo -e "\\e[38;5;${PROMPT_USER_COLOUR}m\\\\u\\e[0m at \\e[38;5;${PROMPT_HOST_COLOUR}m\\\\h\\e[0m in \\e[38;5;${PROMPT_PATH_COLOUR}m\\\\d\\e[0m\\\\n> ")"
6 changes: 5 additions & 1 deletion .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@ case $TERM in
;;
esac

PROMPT_USER_COLOUR=200
PROMPT_HOST_COLOUR=202
PROMPT_PATH_COLOUR=220

PROMPT='
%F{200}%n%f at %F{202}%m%f in %F{220}${PWD/#$HOME/~}%f${vcs_info_msg_0_}
%F{$PROMPT_USER_COLOUR}%n%f at %F{$PROMPT_HOST_COLOUR}%m%f in %F{$PROMPT_PATH_COLOUR}${PWD/#$HOME/~}%f${vcs_info_msg_0_}
$(prompt) '

# common
Expand Down

0 comments on commit fc8320a

Please sign in to comment.