aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin/gpt/shellrc
blob: d7fcb618c850c522db4c3cf1dd5c71642ec887af (plain)
1
2
3
4
5
6
7
8
9
10
11
# 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