Avoid conflict with run() function with another bash frameworks#630
Conversation
|
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

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