3 ms·
I wrote a small python script, that I alias in my shell to "b" (for build). When I run it in a given directory, it prompts me for a command, if it doesn't have
by wheybags 6y ago
I wrote a small python script, that I alias in my shell to "b" (for build). When I run it in a given directory, it prompts me for a command, if it doesn't have one already saved. Subsequent runs just run the saved command, but it can save a different command for each folder. I use it to clear and remake my build directory using cmake on my c++ projects, with the various compile options saved in as well. It's basically a persistent version of what you describe.
Here's the script, if you're interested. It's not super complex. https://github.com/wheybags/stuff/blob/master/build-dir-command.py https://github.com/wheybags/stuff/blob/master/build-dir-comm...