diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2023-05-25 12:34:25 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2023-05-25 12:34:25 +0800 |
commit | aa4f32a2eec77e95f53788de010c2c74ac050ea8 (patch) | |
tree | f01e5b392fae4c2d45a84809464d27835b4c53e5 /bin/gpt | |
parent | 97680e698f4f977119b46cd97dd21898214e52d5 (diff) |
Update
Diffstat (limited to 'bin/gpt')
-rw-r--r-- | bin/gpt/shellrc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/gpt/shellrc b/bin/gpt/shellrc index 1cdbce9..eeeec5d 100644 --- a/bin/gpt/shellrc +++ b/bin/gpt/shellrc | |||
@@ -1,3 +1,8 @@ | |||
1 | # Use vim to handle input | ||
2 | gptt() { | ||
3 | file=`mktemp` | ||
4 | vim $file && cat $file | gpt --skip | ||
5 | } | ||
1 | # Ask GPT what's wrong with the last command | 6 | # Ask GPT what's wrong with the last command |
2 | h() { | 7 | h() { |
3 | printf '%s\n\n%s' "$(fc -s 2>&1 >/dev/null)" "Tell me what's wrong with the command above" | \ | 8 | printf '%s\n\n%s' "$(fc -s 2>&1 >/dev/null)" "Tell me what's wrong with the command above" | \ |