<commit_before>autoload zsh/terminfo

# format titles for screen and rxvt
function title() {
  # escape '%' chars in $1, make nonprintables visible
  a=${(V)1//\%/\%\%}

  # Truncate command, and join lines.
  a=$(print -Pn "%40>...>$a" | tr -d "\n")

  case $TERM in
  screen)
    print -Pn "\ek$a:$3\e\\"      # screen title (in ^A")
    ;;
  xterm*|rxvt)
    print -Pn "\e]0;$2 | $a:$3\a" # plain xterm title
    ;;
  esac
}

pr_reset="%f%u%k%s%b" # reset all codes

if [ "$terminfo[colors]" -eq 256 ]; then
  pr_red="%F{52}"
  pr_blue="%F{25}"
  pr_green="%F{28}"
  pr_grey="%F{59}"
else
  if [ "$terminfo[colors]" -eq 8 ]; then
    pr_red="%F{red}"
    pr_blue="%F{blue}"
    pr_green="%F{green}"
    pr_grey="%B%F{black}"
  fi
fi

# VCS configuration
autoload vcs_info
zstyle ':vcs_info:*'      enable             git hg svn
zstyle ':vcs_info:*'      get-revision       true
zstyle ':vcs_info:*'      formats            "(%s) %b" "%r"
zstyle ':vcs_info:*'      actionformats      "(%s) %i|%a"
zstyle ':vcs_info:*'      branchformat       "%b:%r"
zstyle ':vcs_info:hg*:*'  use-simple         true
zstyle ':vcs_info:svn:*'  formats            "(%s) %b:r%i" "%r"
zstyle ':vcs_info:svn:*'  branchformat       "%b"

function prompt_pwd() {
  local repo="$vcs_info_msg_1_"

  parts=(${(s:/:)${${PWD}/#${HOME}/\~}})

  i=0
  while (( i++ < ${#parts} )); do
    part="$parts[i]"
    if [[ "$part" == "$repo" ]]; then
      # if this part of the path represents the repo,
      # underline it, and skip truncating the component
      parts[i]="%U$part%u"
    else
      # Shorten the path as long as it isn't the last piece
      if [[ "$parts[${#parts}]" != "$part" ]]; then
        parts[i]="$part[1,1]"<commit_msg>Remove those damned counters from vcs_info<commit_after>autoload zsh/terminfo

# format titles for screen and rxvt
function title() {
  # escape '%' chars in $1, make nonprintables visible
  a=${(V)1//\%/\%\%}

  # Truncate command, and join lines.
  a=$(print -Pn "%40>...>$a" | tr -d "\n")

  case $TERM in
  screen)
    print -Pn "\ek$a:$3\e\\"      # screen title (in ^A")
    ;;
  xterm*|rxvt)
    print -Pn "\e]0;$2 | $a:$3\a" # plain xterm title
    ;;
  esac
}

pr_reset="%f%u%k%s%b" # reset all codes

if [ "$terminfo[colors]" -eq 256 ]; then
  pr_red="%F{52}"
  pr_blue="%F{25}"
  pr_green="%F{28}"
  pr_grey="%F{59}"
else
  if [ "$terminfo[colors]" -eq 8 ]; then
    pr_red="%F{red}"
    pr_blue="%F{blue}"
    pr_green="%F{green}"
    pr_grey="%B%F{black}"
  fi
fi

# VCS configuration
autoload vcs_info
zstyle ':vcs_info:*'      enable             git hg svn
zstyle ':vcs_info:*'      get-revision       true
zstyle ':vcs_info:*'      formats            "(%s) %b" "%r"
zstyle ':vcs_info:*'      actionformats      "(%s) %a"
zstyle ':vcs_info:*'      branchformat       "%b:%r"
zstyle ':vcs_info:hg*:*'  use-simple         true
zstyle ':vcs_info:svn:*'  formats            "(%s) %b" "%r"
zstyle ':vcs_info:svn:*'  branchformat       "%b"

function prompt_pwd() {
  local repo="$vcs_info_msg_1_"

  parts=(${(s:/:)${${PWD}/#${HOME}/\~}})

  i=0
  while (( i++ < ${#parts} )); do
    part="$parts[i]"
    if [[ "$part" == "$repo" ]]; then
      # if this part of the path represents the repo,
      # underline it, and skip truncating the component
      parts[i]="%U$part%u"
    else
      # Shorten the path as long as it isn't the last piece
      if [[ "$parts[${#parts}]" != "$part" ]]; then
        parts[i]="$part[1,1]"
{'fraction_non_alphanumeric': 0.20405797101449274, 'fraction_numerical': 0.01391304347826087, 'mean_word_length': 2.800660792951542, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '1148079', 'n_tokens_mistral': 1451, 'n_tokens_neox': 1383, 'n_words': 336}