timo-reymann / bash-tui-toolkit

Toolkit to create simple Terminal UIs using plain bash builtins
Apache License 2.0
44 stars 4 forks source link

Syntax error #11

Closed fearlessgeekmedia closed 1 year ago

fearlessgeekmedia commented 1 year ago

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

timo-reymann commented 1 year ago

Cam you provide a bit more information please?

fearlessgeekmedia commented 1 year ago

I 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.

fearlessgeekmedia commented 1 year ago

Bash 5.1.16

fearlessgeekmedia commented 1 year ago

So even after running set +x, I still get this syntax error.

fearlessgeekmedia commented 1 year ago

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. :)

timo-reymann commented 1 year ago

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:

fearlessgeekmedia commented 1 year ago

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.

timo-reymann commented 1 year ago

Alrighty than if something comes up, feel free to create an issue and I will have a look.

Thanks for using it! :)