3 ms·
I thought I new Bash pretty well, but the leading underlines in function names is throwing me for a loop. Is this a unique stylistic thing to the author, or is
by AdmiralAsshat 9y ago
I thought I new Bash pretty well, but the leading underlines in function names is throwing me for a loop.
Is this a unique stylistic thing to the author, or is _foo() versus foo() as a function name following an established convention?
- rmgraham 9y agoI asked someone when I saw them doing similar things. They adopted the style after reading Google's style guide for shell scripts. Not sure if that's where this author got it from, but it's one possible source.
- xiaomai 9y agoI think this is the perl-style "private" convention. Those functions are helpers that aren't intended to be used on their own so he prefixes them with _.