<commit_before># name: fishy-drupal
function _git_branch_name
  echo (command git symbolic-ref HEAD 2> /dev/null | sed -e 's|^refs/heads/||')
end

function _is_git_dirty
  echo (command git status -s --ignore-submodules=dirty 2> /dev/null)
end

function _drush_alias_name
  set -l pid %self
  if test -f "$TMPDIR/drush-env/drush-drupal-site-$pid"
    echo (command cat $TMPDIR/drush-env/drush-drupal-site-$pid)
  end
end

function fish_prompt
  set -l code $status

  set -l cyan (set_color -o cyan)
  set -l yellow (set_color -o yellow)
  set -l red (set_color -o red)
  set -l blue (set_color -o blue)
  set -l normal (set_color normal)

  set -l arrow (test $code = 0; and echo "$blue➜ "; or echo "$red➜ ")
  set -l cwd (set_color $fish_color_cwd)(prompt_pwd)

  if [ (_git_branch_name) ]
    set -l git_branch $red(_git_branch_name)
    set git_info "$blue git:($git_branch$blue)"

    if [ (_is_git_dirty) ]
      set -l dirty "$yellow ✗"
      set git_dirty "$dirty"
    end
  end

  if [ (_drush_alias_name) ]
    set -l drush_alias $blue(_drush_alias_name)
    set drush_info "$green drush:($drush_alias$green)"
  end

  echo -n -s $arrow $cwd $git_info $drush_info $git_dirty $normal ' '
end
<commit_msg>Update functions/fish_prompt.fish<commit_after># name: fishy-drupal
function _git_branch_name
  echo (command git symbolic-ref HEAD 2> /dev/null | sed -e 's|^refs/heads/||')
end

function _is_git_dirty
  echo (command git status -s --ignore-submodules=dirty 2> /dev/null)
end

function _drush_alias_name
  set -l pid %self
  if test -f "$TMPDIR/drush-env/drush-drupal-site-$pid"
    echo (command cat $TMPDIR/drush-env/drush-drupal-site-$pid)
  end
end

function fish_prompt
  set -l code $status

  set -l cyan (set_color -o cyan)
  set -l yellow (set_color -o yellow)
  set -l red (set_color -o red)
  set -l blue (set_color -o blue)
  set -l normal (set_color normal)

  test $code = 0; and set -l arrow "$blue➜ "; or set -l arrow "$red➜ "
  set -l cwd (set_color $fish_color_cwd)(prompt_pwd)

  if [ (_git_branch_name) ]
    set -l git_branch $red(_git_branch_name)
    set git_info "$blue git:($git_branch$blue)"

    if [ (_is_git_dirty) ]
      set -l dirty "$yellow ✗"
      set git_dirty "$dirty"
    end
  end

  if [ (_drush_alias_name) ]
    set -l drush_alias $blue(_drush_alias_name)
    set drush_info "$green drush:($drush_alias$green)"
  end

  echo -n -s $arrow $cwd $git_info $drush_info $git_dirty $normal ' '
end

{'fraction_non_alphanumeric': 0.1238250919493257, 'fraction_numerical': 0.002451982018798529, 'mean_word_length': 3.3404255319148937, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2981198', 'n_tokens_mistral': 984, 'n_tokens_neox': 950, 'n_words': 278}