mirror of
https://github.com/rwxrob/dot
synced 2024-11-04 18:00:18 +00:00
add scripts/gpt
This commit is contained in:
parent
652050e453
commit
9bca64b08d
16
scripts/gpt
16
scripts/gpt
@ -2,19 +2,5 @@
|
||||
|
||||
_have() { type "$1" &>/dev/null; }
|
||||
|
||||
declare OPENAI_API_KEY
|
||||
OPENAI_API_KEY="$(head -1 "$HOME/.config/gpt/token")"
|
||||
export OPENAI_API_KEY
|
||||
|
||||
! _have mods && echo "requires charmbracelet/mods" && exit 1
|
||||
|
||||
#if test -t 0; then
|
||||
# if _have glow; then
|
||||
# mods --status-text "Ummm" -f "$*" | glow
|
||||
# else
|
||||
mods --status-text "Ummm" "$*"
|
||||
# fi
|
||||
#else
|
||||
# mods --quiet "$*" | sed -E 's,[?25l [0D[2K[?25h[?1002l[?1003l,,g'
|
||||
# |sed 's/\x1B\[[0-9;\?]*[a-zA-Z]//g'
|
||||
#fi
|
||||
mods "$*"
|
||||
|
Loading…
Reference in New Issue
Block a user