News for hackers. Stuff that matters.
Re:How Bash Completion Works by mdaniel on Sunday October 06, 2019 @04:02PM (#21174695)
> `function _fizzbuzz () {`

I find that extra keyword distracting, when [POSIX.2 doesn't require it][1] and some folks going so far as to say to [actively avoid it][2]

Is there some good reason for it, or people are just used to a programming language requiring `fun` before a declaration, so it's programmer muscle memory?

_1: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...

_2: http://mywiki.wooledge.org/BashPitfalls#function_foo.28.29

Re:How Bash Completion Works by eurg on Sunday October 06, 2019 @05:01PM (#21175107)
Simple keywords for definitions can make grepping for stuff much easier. Given that shell allows other forms, it isn't that helpful in practice. I still use it because my eyes find start-of-definition faster with common patterns that are not just special-chars. YMMV.

Edit: I usually don't care for portability, and just use bash. Shell is so ugly already, I refuse to write my personal stuff in portability hell mode. Rather level up my Civilization skills instead.