question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Different bash function syntaxes are tolerated

See original GitHub issue

Hi, I noticed that beautysh is not enforcing any specific style for the function declarations:

A)

function myfunc()
{
    ...
}

is accepted as well as B)

function myfunc
{
    ...
}

and as well as C)

myfunc()
{
    ...
}

I think beautysh should stick with one and enforce it. What do you think?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
f18mcommented, Jan 16, 2019

@bemeurer great, I’m looking forward to test version 3.12 in my “production” 😃

Btw I just cleaned up a PR for this issue… maybe it can still be improved a little bit, but should be a good start…

0reactions
lovesegfaultcommented, Jan 15, 2019

@f18m I just cut a new release (3.12) with all of the changes you’ve been making. If this eventually gets built I will add it to a 4.0 release 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Obsolete and deprecated syntax - Bash Hackers Wiki
This first table lists syntax that is tolerated by Bash but has few if any legitimate uses. These features exist mostly for Bourne,...
Read more >
Shell Style Guide - Google
SUID and SGID are forbidden on shell scripts. There are too many security issues with shell that make it nearly impossible to secure...
Read more >
Bash Function & How to Use It {Variables, Arguments, Return}
Bash Function Syntax. There are two different ways to declare a bash function: 1. The most widely used format is:
Read more >
Advanced Bash-Scripting Guide
This tutorial assumes no previous knowledge of scripting or programming, yet progresses rapidly toward an intermediate/advanced level of ...
Read more >
Difference between sh and Bash - Stack Overflow
TL;DR: Bash is a superset of sh with a more elegant syntax and more functionality. It is safe to use a Bash shebang...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found