aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin/gpt/shellrc
blob: eeeec5d0e7d8532a2f9ae720b33670d46e82f9c3 (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
h() {
  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