I'd like to keep track of all the programs I'm installing, so every time a command contains pacman -S (important space after -S) I'd like bash to append the command string to a file. Currently I'm using a function but it's annoying because I have to go to history and brace the line with the function and quotes. I could grep history but the general purpose solution would be handy.Is there a way to do that automatically in a single step install&log ?
How to automatically append a command to a file when called in a shell?
bash;package management;logs;pacman