#!/usr/bin/env zsh# Clear any existing env vars that can cause conflictsunset YSU_MESSAGE_POSITION
unset YSU_HARDCORE_ALIASES
unset YSU_HARDCORE
# Create isolated git environment using only GIT_CONFIG_GLOBALexportGIT_CONFIG_GLOBAL="$(mktemp)"exportGIT_CONFIG_NOSYSTEM=1# Simplify format for testsexportYSU_MESSAGE_FORMAT='Found existing %alias_type for "%command". You should use: "%alias"'# Exit code for hardcore modeexportHARDCORE_EXIT_CODE=130# Mock the kill command to avoid killing the test processfunction kill(){echo"kill called with: $*"return$HARDCORE_EXIT_CODE}# Source the pluginsource"$PWD/you-should-use.plugin.zsh"function cleanup(){# Ensure the temporary git config file is removedif[[ -n "$GIT_CONFIG_GLOBAL"&& -f "$GIT_CONFIG_GLOBAL"]]; thenecho"Removing temporary git config file:" rm -v -f "$GIT_CONFIG_GLOBAL"fi}trap cleanup EXIT