2 ms·
I agree. But on the flip side if you only use functions you can't use them in xargs, parallel etc. So I often so use my own wrapper scripts in a dir in front
by ithkuil 3y ago
I agree.
But on the flip side if you only use functions you can't use them in xargs, parallel etc.
So I often so use my own wrapper scripts in a dir in front of PATH and I pay the price of occasionally sharing bad scripts with my coworkers. Most of the time those broken scripts are caught by CI but not all scripts are...
I know that technically I could wrap /bin/sh /bin/bash with a wrapper that strips my wrapper dir from PATH but that's too invasive and I don't want to do that.
I wonder if there is a trick? Perhaps some pre-run hook that one can register in some advanced shells (e.g. I actually use zsh)?