(no title)
zwp | 3 years ago
sqlite-utils create-table ~/commands.db commands id integer text text --pk id
PROMPT_COMMAND="( fc -n -l -1 | perl -p -e 's/^\s+//; chomp if eof' | sqlite-utils insert --text ~/commands.db commands - & )"
It's slow, has perl & python external deps, needs a timestamp column, call subshell to avoid job control messages, ...A nicer single "prompt command" wrapper is certainly possible though.
No comments yet.