Taming Repetitive & Hard-to-Remember Console Commands
Or, “How to Quell Your Complicated and Repetitive Command-Line Actions with Easy Aliases and Short Shell Scripts”, if you like long titles.
Sometimes I feel as if I end up typing a single handful of command-line commands over and over again all day. That’s a bit of an exaggeration, but I do spend a goodly amount of my day at the command line. As part of my workflow, I always have at least three terminal windows open in order to run the various portions of whatever web app I have my hands on:
- One terminal running the front-end web server
- Another running the back-end service,
- And a third running a database inside of a Docker vm.
My little story about forgetfulness
The front-end and back-end processes can be launched once and left running for most of the day without any extra intervention. The Docker container running the database, on the other hand, needs to be stopped and re-started every time I or a coworker alters the format of the project’s database. If I don’t re-start the container, then I won’t see the changes that were made to the database.