<commit_before>
COL_BLUE='\001\033[0;94m\002'
COL_GREEN='\001\033[0;32m\002'
COL_RED='\001\033[0;91m\002'
COL_YELLOW='\001\033[0;33m\002'
COL_BOLD_YELLOW='\001\033[0;1;33m\002'
COL_OFF='\001\033[0m\002'

function __update_ps1() {
  local STATUS="$?"
  local USER="$1"
  local HOST="$2"
  local DIR="$3"

  local PS="${COL_BLUE}($USER@$HOST)${COL_OFF} "

  if git branch &>/dev/null && type -t __git_ps1 &>/dev/null; then
    if [[ -z $(git status --porcelain 2>/dev/null) ]]; then
      PS+="${COL_GREEN}$(__git_ps1 '(%s)')${COL_OFF} "
    else
      PS+="${COL_RED}$(__git_ps1 '{%s}')${COL_OFF} "
    fi
    PS+="${COL_BOLD_YELLOW}$DIR${COL_OFF} "
  else<commit_msg>[bash] zsh-compatible PS1 generation<commit_after>
COL_BLUE='\001\033[0;94m\002'
COL_GREEN='\001\033[0;32m\002'
COL_RED='\001\033[0;91m\002'
COL_YELLOW='\001\033[0;33m\002'
COL_BOLD_YELLOW='\001\033[0;1;33m\002'
COL_OFF='\001\033[0m\002'

function __update_ps1() {
  local STATUS="$?"
  local USER="$1"
  local HOST="$2"
  local DIR="$3"

  local PS="${COL_BLUE}($USER@$HOST)${COL_OFF} "

  if git branch &>/dev/null && type __git_ps1 &>/dev/null; then
    if [[ -z $(git status --porcelain 2>/dev/null) ]]; then
      PS+="${COL_GREEN}$(__git_ps1 '(%s)')${COL_OFF} "
    else
      PS+="${COL_RED}$(__git_ps1 '{%s}')${COL_OFF} "
    fi
    PS+="${COL_BOLD_YELLOW}$DIR${COL_OFF} "
  else
{'fraction_non_alphanumeric': 0.23485967503692762, 'fraction_numerical': 0.11742983751846381, 'mean_word_length': 4.4417670682730925, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4494173', 'n_tokens_mistral': 719, 'n_tokens_neox': 622, 'n_words': 87}