3 ms·
In the spirit of the OP, I did a similar thing, but using a tag to initiate writing the script file. https://github.com/thatjpk/bashtag-save https://github.com/
by jpk 13y ago
In the spirit of the OP, I did a similar thing, but using a tag to initiate writing the script file. https://github.com/thatjpk/bashtag-save https://github.com/thatjpk/bashtag-save
So, tagging a command line with "#save:scriptname" will save the command to ~/scripts/saved/scriptname.sh That way you can get the history search token and a script on disk in one fell swoop.