Closed fearlessgeekmedia closed 1 year ago
Cam you provide a bit more information please?
set +x
before sourcing and provide outputI downloaded the latest version.
I use ArcoLinux, a rolling release version based on Arch, so it should be the latest version of Bash. I update every couple of days.
I'll try setting +x. Think I had done that but I'll double check.
Bash 5.1.16
So even after running set +x, I still get this syntax error.
OK, I think the issue was I was testing this without actually using it in a bash script. It seems to work fine when sourcing it from a bash script, which is clearly the intention. I just thought I could test this straight from the bash prompt, and it appears that's not the case.
But sourcing it from within a bash script, no problems. :)
So even after running set +x, I still get this syntax error.
That's just for more verbose output :)
OK, I think the issue was I was testing this without actually using it in a bash script. It seems to work fine when sourcing it from a bash script, which is clearly the intention. I just thought I could test this straight from the bash prompt, and it appears that's not the case.
That should work though, and also works on my machine(s) :tm:
Oh, ok. Well I'm not sure why I was getting the syntax error then. But it seems fine when I source it from a bash script, at least.
Alrighty than if something comes up, feel free to create an issue and I will have a look.
Thanks for using it! :)
What happened?
source bundle.bash
Problem description
bash: bundle.bash: line 74: syntax error near unexpected token
(' bash: bundle.bash: line 74:
list() {'Expected behaviour
No syntax errors
Actual behaviour
Syntax errors
bash: bundle.bash: line 74: syntax error near unexpected token
(' bash: bundle.bash: line 74:
list() {'Steps to Reproduce
source bundle.bash
Important Factoids
Doing this on ArcoLinux.
References
No
I read and aggree to the contribution guidelines