Browse Source

tput probs

master
Taylor Bockman 4 years ago
parent
commit
3dede74c0b
  1. 28
      dotfiles/bash/bashrc

28
dotfiles/bash/bashrc

@ -157,26 +157,30 @@ fi
# ------------------------------------------ FORMATTING ------------------------------------------ #
# Better color handling so scrolling doesn't get broken.
# Note for Cygwin you need ncurses for this to work.
reset=$(tput sgr0)
green=$(tput setaf 2)
blue=$(tput setaf 4)
white=$(tput setaf 7)
if [[ $- == *i* ]]
then
# Better color handling so scrolling doesn't get broken.
# Note for Cygwin you need ncurses for this to work.
reset=$(tput sgr0)
green=$(tput setaf 2)
blue=$(tput setaf 4)
white=$(tput setaf 7)
bold=$(tput bold || tput md)
bold=$(tput bold || tput md)
export PROMPT_DIRTRIM=2
export PROMPT_DIRTRIM=2
# Important note for PS1 modification - everything non-printable must be escaped with `\[` and `\]`. Otherwise readline
# fails to track the prompt right and things get messed up when you input long strings.
# Important note for PS1 modification - everything non-printable must be escaped with `\[` and `\]`. Otherwise readline
# fails to track the prompt right and things get messed up when you input long strings.
if [[ "$OSTYPE" == "linux-gnu" ]]; then
if [[ "$OSTYPE" == "linux-gnu" ]]; then
# I had some rendering issues running in XFCE unless I added an extra space at the end.
export PS1='\[$bold\]\[$white\]\u@\h\[$reset\]: \[$bold\]\[$blue\]\w\[$reset\] \[$green\]$(parse_git_branch)\[$reset\]\[$bold\]\[$white\]⇨\[$reset\] '
else
else
export PS1='\[$bold\]\[$white\]\u@\h\[$reset\]: \[$bold\]\[$blue\]\w\[$reset\] \[$green\]$(parse_git_branch)\[$reset\]\[$bold\]\[$white\]⇨\[$reset\] '
fi
fi
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"

Loading…
Cancel
Save