Some Relatively Obscure Bash Tips
zwischenzugs.com
Some Relatively Obscure Bash Tips
1–5 of 5 posts
Re: Some Relatively Obscure Bash Tips
#2The first tip works because : is a bash builtin that just returns 0, so all the comments are unused arguments. The copy/paste warning example is nice but I can't find ant other usecases for it.
The coprocess look very interesting, just yesterday I spent 2 hours trying setting up a bash script with 2 tasks: 1. open mupdf 2. recompile a pdf when sources change, and then send an update signal to mupdf
I ended up giving up because the signalling was too complex for such a simple idea and installed a latex plugin in vim. I'm excited to try again with coprocesses!
Re: Some Relatively Obscure Bash Tips
#3#didyouknowbashsupportshashtags
Re: Some Relatively Obscure Bash Tips
#4My biggest bash QOL improvement has been pointing my HISTFILE different places depending on what I'm doing. I do this as part of a more complicate setup, but if I had to pick between the separate HISTFILEs and all the rest of it, I'd probably take the HISTFILEs.
Re: Some Relatively Obscure Bash Tips
#5Inline comments can be written as,
cmd --longopt=val `# opt does foo with val` arg
instead, which I find more readable.