7 ms·
I have a similar setup, and it is relatively easy to set up using .bashrc and terminal color variables.
by tbirrell 9y ago
I have a similar setup, and it is relatively easy to set up using .bashrc and terminal color variables.
- throwanem 9y agoI did something similar with a shell script for MySQL databases, both to support shorthand invocation (i.e. "mysql foo-bar-baz" to look up the named configuration, expand it into whatever set of arguments is defined therein, and invoke mysql(1) accordingly), and to allow for detailed and environment-specific prompts which warn me when I'm targeting production. It's hideous, of course. But it works very well for me, and I don't suppose I'd be averse, if interest becomes evident, to sharing it somewhere for others to benefit from and/or peruse in horrified fascination.
- throwanem 9y agoIt's more hideous than I remembered! But for anyone interested, here you are: https://gist.github.com/anonymous/8ec128e88dac85d93ed58fb518b2c705 https://gist.github.com/anonymous/8ec128e88dac85d93ed58fb518... Outside GNU coreutils, the only dependencies are mysql(1) (of course) and jq(1), which is more or less "awk for JSON" and which I strongly recommend to anyone who regularly deals with that file format. Share and Enjoy!