<commit_before># prompt function
function __set_prompt() {
  exit_code=$?
  hostname_prefix=""
  directory_prefix=""

  # bold prompts
  echo -n "%B"

  # if we're not mpcsh, display the username
  if [[ $USER != "mpcsh" ]]; then
    hostname_prefix="%bat%B "

    if [[ $USER == "root" ]]; then
      echo -n "%F{red}"
    else
      echo -n "%F{green}"
    fi

    echo -n "%n%f "
  fi

  # if we're ssh'ed, display the hostname
  if [[ -v $SSH_CONNECTION || -v $SSH_CLIENT || -v $SSH_TTY ]]; then
    directory_prefix="%bin%B "
    echo -n "$hostname_prefix%F{yellow}%M%f "
  fi

  # print PWD
  echo -n "$directory_prefix%F{blue}%~%f "
<commit_msg>Properly detect ssh connections<commit_after># prompt function
function __set_prompt() {
  exit_code=$?
  hostname_prefix=""
  directory_prefix=""

  # bold prompts
  echo -n "%B"

  # if we're not mpcsh, display the username
  if [[ $USER != "mpcsh" ]]; then
    hostname_prefix="%bat%B "

    if [[ $USER == "root" ]]; then
      echo -n "%F{red}"
    else
      echo -n "%F{green}"
    fi

    echo -n "%n%f "
  fi

  # if we're ssh'ed, display the hostname
  if [[ -n $SSH_CONNECTION || -n $SSH_CLIENT || -n $SSH_TTY ]]; then
    directory_prefix="%bin%B "
    echo -n "$hostname_prefix%F{yellow}%M%f "
  fi

  # print PWD
  echo -n "$directory_prefix%F{blue}%~%f "

{'fraction_non_alphanumeric': 0.1664145234493192, 'fraction_numerical': 0.0, 'mean_word_length': 2.9375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3785158', 'n_tokens_mistral': 531, 'n_tokens_neox': 505, 'n_words': 133}