-
-
Notifications
You must be signed in to change notification settings - Fork 93
Avoid conflict with run()
function with another bash frameworks
#630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for the contribution. I do have a few concerns, mainly around the potential for breaking changes - this could have a significant impact. Also, if I’m remembering correctly, I'm curious about the reasoning behind mixing frameworks here — could you clarify what Bashmatic brings to the table in this context? If there's a use case that truly requires this approach and can’t be addressed in a less disruptive way, I’d definitely be open to exploring it further. |
I pushed a different solution - simply allow customizing the names of some internal functions. Currently, only It has the advantages of a) being explicit, b) maintaining backwards compatibility. Thoughts? |
I am beginner in writing bash scripts. I have created draft installer script with Bashmatic as framework for UI. I decided to use Bashly to create better parameters for my script. Majority Bashmatic functions are grouped and have unique names inside a group. Typical Bashmatic function name is 'group-name.function-name()'. It is helping avoid conflicts when such framework are sourced. At least 'run()' function is exception. It is without group. Do you know better solution how use several frameworks together and avoid conflicts with function names? |
Thanks for the additional information. While bashly is designed to be the primary foundation, you should be able to add functions from other frameworks to it. Here are my thoughts, in general (as I am not fully familiar with bashmatic).
If this makes sense, I can merge it. |
I pulled your latest changes. Added next lines in my settings file: After rebuild an install modified gem I am getting next error when 'bashly generate' for my project: Visual Studio Code is showing next error in my settings file: Probably modified yaml-schema file is not committed yet. |
The schema was not yet updated, but it shouldn't matter. Your YAML is inorrect, you need indentation and bash function names should not contain a hyphen. function_names:
run: bashly_run
initialize: bashly_initialize |
I am going to merge this, as I want to work on the schema, and perhaps other related changes. I believe this should solve your use case easily - if you need help, feel free to open a discussion or issue. Thanks for bringing this to our attention. |
run()
function with another bash frameworks
This is released now in v1.2.12. |
When I am trying to use 'bashmatic' framework for my new bash script, run() function from this framework is conflicting with run() function from bashly generated script