(no title)
balnaphone | 11 months ago
Add this to ~/.bashrc :
# bind Alt-e on the command line to replace text with command
_aichat_bash() {
if [[ -n "$READLINE_LINE" ]]; then
READLINE_LINE=$(aichat -e "$READLINE_LINE")
READLINE_POINT=${#READLINE_LINE}
fi
}
bind -x '"\ee": _aichat_bash'
In the example you gave i get: find . -type f -name "*.mp4" -exec ffmpeg -i {} -c:v libaom-av1 -crf 30 -b:v 0 -c:a copy ~/Videos/{}.mkv \;
But if you don't like that you can press Ctrl-Shift-_ (bash has emacs keybindings) to undo and try something else. You can also put a # mark in front and hit enter, then up arrow then Alt-e so you know what created the command.
No comments yet.