I’ve been writing a lot of one-off functions recently. On the occasions that I go "hmm, I should save this" I use
type <function name> to show the code, and copy and paste it into .bashrc. Is there a faster way to do this, or some standard or command built for this purpose?
FWIW, I’m just doing this on my personal computer running Mint, so conveniences like copy and paste are easy. However, I’m also interested in answers specific to shell-only environments.