Re:Ask HN: What are your favorite developer-efficiency tips?
by misev on Saturday May 09, 2020 @01:13PM
(#23126475)
You may find prm useful for this purpose, it lets you create projects with start/stop scripts that get executed when you do `prm start project` or `prm stop project`. I use it to quickly switch to the right directories, open editors, services, etc. needed by a project.
Re:Ask HN: What are your favorite developer-efficiency tips?
by NateEag on Wednesday May 13, 2020 @07:58AM
(#23165927)
`direnv` will automatically activate and deactivate a project-specific shell env for you when you change directories.
I like to put scripts for the project in a `bin/` directory then use direnv to put the project's `bin/` on PATH.
I've leaned more and more towards mirroring the *nix directory structure in my projects. `etc/` and `bin/` are two top-level folders in a lot of my projects at work.
Another "super power" for shell scripts is writing completion scripts (https://iridakos.com/programming/2018/03/01/bash-programmabl...). I've had some insanely useful one's do things like look up database values to mimic a large complicated third party product, going through it's UI inputting repetitive info, copying files around, etc was reduced to fake-tool<tab><tab><tab><tab>.