# Use vim to handle input
gptt() {
file=`mktemp`
vim $file && cat $file | gpt --skip
}
# Ask GPT what's wrong with the last command
gpth() {
printf '%s\n\n%s' "$(fc -s 2>&1 >/dev/null)" "Tell me what's wrong with the command above" | \
gpt --skip
}
#trap 'echo -e "\e[31m---Error: press h to get help from AI---\e[0m"' ERR