mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 12:15:29 +00:00
16 lines
442 B
Fish
16 lines
442 B
Fish
function copilot_git-assist --description "GitHub Copilot git assist"
|
|
set TMPFILE (mktemp)
|
|
trap 'rm -f $TMPFILE' EXIT
|
|
if github-copilot-cli git-assist $argv --shellout $TMPFILE
|
|
if test -e "$TMPFILE"
|
|
set FIXED_CMD (cat $TMPFILE)
|
|
echo -s "$FIXED_CMD"
|
|
eval "$FIXED_CMD"
|
|
else
|
|
echo "Apologies! Extracting command failed"
|
|
end
|
|
else
|
|
return 1
|
|
end
|
|
end
|