Skip to content

Conversation

@DannyBen
Copy link
Member

@DannyBen DannyBen commented Feb 20, 2021

This PR adds --wrap FUNCTION_NAME option to bashly generate.
When used, the output will be wrapped in a function, so that the script is both executable and sourceable.

In order to do it properly, the script header (shebang and "do not modify" comment) were extracted to a separate model (Script) which is now the main entrypoint, instead of the master_script view.

Closes #59

@DannyBen DannyBen merged commit 1373894 into master Feb 20, 2021
@DannyBen DannyBen deleted the add/function-wrapper branch February 20, 2021 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants