From 046c2d8253f98e19259280e0fff0634eb87bfa43 Mon Sep 17 00:00:00 2001 From: johannst Date: Sat, 7 Apr 2018 21:22:29 +0900 Subject: bashrc: reverted exit code formater in PS1 as I didn't get color escaping right which is returned from formater function --- bashrc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bashrc b/bashrc index f1987d0..203ff61 100644 --- a/bashrc +++ b/bashrc @@ -119,13 +119,13 @@ function save_exit_code() { echo "$1" > $2 } -#export PS1="\[${BCol_BrightRed}\]::\[${BCol_MediumGray}\]\u\[${BCol_BrightRed}\]::\[${BCol_LightGray}\]\H\[${BCol_BrightRed}\]:\[${BCol_DarkGray}\]$(tty) \[${BCol_LightGray}\] - \[${BCol_DarkBlue}\]\w\n\ -#\[${BCol_NoColor}\][\$(ret=\$?; if [[ \$ret == 0 ]]; then echo \"\[${BCol_BrightGreen}\]\$ret\"; else echo \"\[${BCol_BrightRed}\]\$ret\"; fi)\[${BCol_NoColor}\]] \$> " -export PS1="\$(save_exit_code \$? ~/.bash_exit)\ -\[${BCol_BrightRed}\]::\[${BCol_MediumGray}\]\u\[${BCol_BrightRed}\]\ -::\[${BCol_LightGray}\]\H\[${BCol_BrightRed}\]\ -:\[${BCol_DarkGray}\]$(tty)\[${BCol_LightGray}\] - \[${BCol_DarkBlue}\]\w\n\ -\[${BCol_NoColor}\][\$(return_val_formater \$(cat ~/.bash_exit))\[${BCol_NoColor}\]] \$> " +export PS1="\[${BCol_BrightRed}\]::\[${BCol_MediumGray}\]\u\[${BCol_BrightRed}\]::\[${BCol_LightGray}\]\H\[${BCol_BrightRed}\]:\[${BCol_DarkGray}\]$(tty) \[${BCol_LightGray}\] - \[${BCol_DarkBlue}\]\w\n\ +\[${BCol_NoColor}\][\$(ret=\$?; if [[ \$ret == 0 ]]; then echo \"\[${BCol_BrightGreen}\]\$ret\"; else echo \"\[${BCol_BrightRed}\]\$ret\"; fi)\[${BCol_NoColor}\]] \$> " +#export PS1="\$(save_exit_code \$? ~/.bash_exit)\ +#\[${BCol_BrightRed}\]::\[${BCol_MediumGray}\]\u\[${BCol_BrightRed}\]\ +#::\[${BCol_LightGray}\]\H\[${BCol_BrightRed}\]\ +#:\[${BCol_DarkGray}\]$(tty)\[${BCol_LightGray}\] - \[${BCol_DarkBlue}\]\w\n\ +#\[${BCol_NoColor}\][\$(return_val_formater \$(cat ~/.bash_exit))\[${BCol_NoColor}\]] \$> " #\[${BCol_NoColor}\][\$(ret=\$(cat ~/.bash_exit); if [[ \$ret == 0 ]]; then echo \"\[${BCol_BrightGreen}\]\$ret\"; else echo \"\[${BCol_BrightRed}\]\$ret\"; fi)\[${BCol_NoColor}\]] \$> " #$export PROMPT_COMMAND="echo -e ''" -- cgit v1.2.3