<commit_before>function zaw-src-git-status() {
  git rev-parse --git-dir >/dev/null 2>&1
    if [[ $? == 0 ]]; then
      local file_list="$(git status --porcelain)"
      : ${(A)candidates::=${(f)${file_list}}}

      : ${(A)cand_descriptions::=${${(f)${file_list}}/ M /[modified]    }}
      : ${(A)cand_descriptions::=${${(M)cand_descriptions}/M  /[staged]      }}
      : ${(A)cand_descriptions::=${${(M)cand_descriptions}/A  /[staged(add)] }}
      : ${(A)cand_descriptions::=${${(M)cand_descriptions}/\?\? /[untracked]   }}

    fi

    actions=(zaw-src-git-status-add zaw-src-git-status-add-p zaw-src-git-status-reset zaw-src-git-status-checkout)
    act_descriptions=("add" "add -p" "reset" "checkout")
    options=()
}

function zaw-src-git-status-add() {
  local f_path=${1#(\?\? | M |M  |A  )}
  local git_base="$(git rev-parse --show-cdup)"
  BUFFER="git add $git_base$f_path"
  zle accept-line
}

function zaw-src-git-status-add-p() {
  local f_path=${1#(\?\? | M |M  |A  )}
  local git_base="$(git rev-parse --show-cdup)"
  BUFFER="git add -p $git_base$f_path"
  zle accept-line
}
<commit_msg>Add `AM` and `MM` status<commit_after>function zaw-src-git-status() {
  git rev-parse --git-dir >/dev/null 2>&1
    if [[ $? == 0 ]]; then
      local file_list="$(git status --porcelain)"
      : ${(A)candidates::=${(f)${file_list}}}

      : ${(A)cand_descriptions::=${${(f)${file_list}}/ M /[modified]    }}
      : ${(A)cand_descriptions::=${${(M)cand_descriptions}/M  /[staged]      }}
      : ${(A)cand_descriptions::=${${(M)cand_descriptions}/A  /[staged(add)] }}
      : ${(A)cand_descriptions::=${${(M)cand_descriptions}/MM /[staged][modified] }}
      : ${(A)cand_descriptions::=${${(M)cand_descriptions}/AM /[staged(add)][modified] }}
      : ${(A)cand_descriptions::=${${(M)cand_descriptions}/\?\? /[untracked]   }}

    fi

    actions=(zaw-src-git-status-add zaw-src-git-status-add-p zaw-src-git-status-reset zaw-src-git-status-checkout)
    act_descriptions=("add" "add -p" "reset" "checkout")
    options=()
}

function zaw-src-git-status-add() {
  local f_path=${1#(\?\? | M |M  |A  )}
  local git_base="$(git rev-parse --show-cdup)"
  BUFFER="git add $git_base$f_path"
  zle accept-line
}

function zaw-src-git-status-add-p() {
  local f_path=${1#(\?\? | M |M  |A  )}
  local git_base="$(git rev-parse --show-cdup)"
  BUFFER="git add -p $git_base$f_path"
  zle accept-line
}

{'fraction_non_alphanumeric': 0.2375, 'fraction_numerical': 0.004166666666666667, 'mean_word_length': 3.555977229601518, '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': '6922834', 'n_tokens_mistral': 1004, 'n_tokens_neox': 981, 'n_words': 144}