Comment Comment by zwp Slightly silly sketch (bash): 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. parent zwp 4 years ago
A nicer single "prompt command" wrapper is certainly possible though.