<commit_before>current_version() {
  local plugin_name=$1

  check_if_plugin_exists $plugin_name

  local search_path=$(pwd)
  local version_and_path=$(find_version "$plugin_name" "$search_path")
  local version=$(cut -d '|' -f 1 <<< "$version_and_path");
  local version_file_path=$(cut -d '|' -f 2  <<< "$version_and_path");

  check_if_version_exists $plugin_name $version
  check_for_deprecated_plugin $plugin_name

  if [ -z "$version" ]; then
    echo "No version set for $plugin_name"
    exit 1
  else
    echo "$version"
  fi
}

which_command() {
  local plugin_name=$1
  local plugin_path=$(get_plugin_path $plugin_name)
  check_if_plugin_exists $plugin_name
  local install_type="version"

  local install_path=$(get_install_path $plugin_name $install_type $(current_version $plugin_name))

  if [ -d $install_path ]; then
    echo $install_path/bin/$plugin_name
    exit 0
  else
    echo "Version not installed"
    exit 1
  fi
}<commit_msg>Add missing function checking for deprecated plugins<commit_after>current_version() {
  local plugin_name=$1

  check_if_plugin_exists $plugin_name

  local search_path=$(pwd)
  local version_and_path=$(find_version "$plugin_name" "$search_path")
  local version=$(cut -d '|' -f 1 <<< "$version_and_path");
  local version_file_path=$(cut -d '|' -f 2  <<< "$version_and_path");

  check_if_version_exists $plugin_name $version
  check_for_deprecated_plugin $plugin_name

  if [ -z "$version" ]; then
    echo "No version set for $plugin_name"
    exit 1
  else
    echo "$version"
    exit 0
  fi
}

which_command() {
  local plugin_name=$1
  local plugin_path=$(get_plugin_path $plugin_name)
  check_if_plugin_exists $plugin_name
  local install_type="version"

  local install_path=$(get_install_path $plugin_name $install_type $(current_version $plugin_name))

  if [ -d $install_path ]; then
    echo $install_path/bin/$plugin_name
    exit 0
  else
    echo "Version not installed"
    exit 1
  fi
}

# Warn if the plugin isn't using the updated legacy file api.
check_for_deprecated_plugin() {
  local plugin_name=$1

  local plugin_path=$(get_plugin_path "$plugin_name")
  local legacy_config=$(get_asdf_config_value "legacy_version_file")
  local deprecated_script="${plugin_path}/bin/get-version-from-legacy-file"
  local new_script="${plugin_path}/bin/list-legacy-filenames"

  if [ "$legacy_config" = "yes" ] && [ -f $deprecated_script ] && [ ! -f $new_script ]; then
    echo "Heads up! It looks like your $plugin_name plugin is out of date. You can update it with:"
    echo ""
    echo "  asdf plugin-update $plugin_name"
    echo ""
  fi
}
{'fraction_non_alphanumeric': 0.11349693251533742, 'fraction_numerical': 0.006134969325153374, 'mean_word_length': 4.515856236786469, 'pattern_counts': {'":': 0, '<': 15, '<?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': '771507', 'n_tokens_mistral': 889, 'n_tokens_neox': 863, 'n_words': 217}