<commit_before>_ant_does_target_list_need_generating () {
  if [ ! -f .ant_targets ]; then return 0;
  else
    accurate=$(stat -f%m .ant_targets)
    changed=$(stat -f%m build.xml)
    return $(expr $accurate '>=' $changed)
  fi
}

_ant () {
  if [ -f build.xml ]; then
    if _ant_does_target_list_need_generating; then
     sed -n '/<target/s/<target.*name="\([^"]*\).*$/\1/p' build.xml > .ant_targets
    fi
    compadd `cat .ant_targets`
  fi
}

compdef _ant ant
<commit_msg>Added compatibility for the linux 'stat' command for the ant plugin<commit_after>stat -f%m . > /dev/null 2>&1
if [ "$?" = 0 ]; then
	stat_cmd=(stat -f%m)
else
	stat_cmd=(stat -L --format=%y)
fi

_ant_does_target_list_need_generating () {
  if [ ! -f .ant_targets ]; then return 0;
  else
    accurate=$($stat_cmd -f%m .ant_targets)
    changed=$($stat_cmd -f%m build.xml)
    return $(expr $accurate '>=' $changed)
  fi
}

_ant () {
  if [ -f build.xml ]; then
    if _ant_does_target_list_need_generating; then
     sed -n '/<target/s/<target.*name="\([^"]*\).*$/\1/p' build.xml > .ant_targets
    fi
    compadd `cat .ant_targets`
  fi
}

compdef _ant ant

{'fraction_non_alphanumeric': 0.1695957820738137, 'fraction_numerical': 0.006151142355008787, 'mean_word_length': 3.156934306569343, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '1045180', 'n_tokens_mistral': 461, 'n_tokens_neox': 447, 'n_words': 104}