Replies: 1 comment
-
Moved to #592 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
request
I suggest to put in the default script template header an information saying that the code in that file is going to be put inside a function.
Something like the second line below:
I'm not really suggesting this exact text, but the message I'd like to be conveyed.
reasoning
I'm used to put all bash code inside functions. Even for simple scripts, I create a
main
function and then call it withmain "$@"
.The very first time I was trying bashly, I've coded my
src/root_command.sh
as I would do with my usual way of coding, and it generated this:That is actually valid and really works, but the "function inside a function" situation wasn't what I was expecting.
Beta Was this translation helpful? Give feedback.
All reactions