<commit_before># shellcheck shell=bash

# push a command to the prompt command
function __push_prompt_command() {
  local command="${1/%;/}"
  PROMPT_COMMAND="$(echo "$(echo "${PROMPT_COMMAND/%;/}" | tr ';' '\n' | grep -v -F "${command}" | grep -v '^ *$' | tr '\n' ';')${command};" | sed 's/;;/;/' | sed 's/^;//')"
}

# internal prompt command stack to simplify the PROMPT_COMMAND variable
declare -a __prompt_actions
function __push_internal_prompt_command() {
  local command="${1/%;/}"
  __prompt_actions+=("${command}")
}
function __run_prompt_command() {
  for l in "${__prompt_actions[@]}"; do
    eval "$l"
  done
}

# Count the number of files in a directory<commit_msg>lib: add function to update dotfiles<commit_after># shellcheck shell=bash

# push a command to the prompt command
function __push_prompt_command() {
  local command="${1/%;/}"
  PROMPT_COMMAND="$(echo "$(echo "${PROMPT_COMMAND/%;/}" | tr ';' '\n' | grep -v -F "${command}" | grep -v '^ *$' | tr '\n' ';')${command};" | sed 's/;;/;/' | sed 's/^;//')"
}

# internal prompt command stack to simplify the PROMPT_COMMAND variable
declare -a __prompt_actions
function __push_internal_prompt_command() {
  local command="${1/%;/}"
  __prompt_actions+=("${command}")
}
function __run_prompt_command() {
  for l in "${__prompt_actions[@]}"; do
    eval "$l"
  done
}

# update the dotfiles repo
function dotfiles-update() (
  # shellcheck disable=SC2164
  cd "${DOTFILES__ROOT}/.dotfiles"
  git pull origin master
  ./bootstrap.sh
)

# Count the number of files in a directory
{'fraction_non_alphanumeric': 0.1831715210355987, 'fraction_numerical': 0.005177993527508091, 'mean_word_length': 4.4822695035460995, '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': '69535', 'n_tokens_mistral': 542, 'n_tokens_neox': 521, 'n_words': 153}