Inspired by https://dev.to/ricardomol/note-taking-from-the-command-line-156
Add the following to your ~/.bashrc
or ~/.bash_profile
# to take quick notes on useful commands
notes() {
echo $1 >> $HOME/notes.md
}
cheat() {
echo $(fc -ln -1) >> $HOME/notes.md
}
Remember ideas, commands, whatever :
$ notes "my_command -which -I -want -to remember"
$ notes "remember the milk"
$ notes "slow down and improve, then you will be more productive"
Or directly use this shortcut to remember the last executed command :
$ cheat
$ more ~/notes.md