This release of the flag script includes improvements to its functionality and readability. Color variables are now defined locally within the print_help function, ensuring better scoping. Default value handling for flags without specified values has been enhanced, and the script retains its logic for concatenating values for flags with multiple arguments. These updates enhance the overall usability and maintainability of the script.
You can now use the script as follow:
flag -a hello world -b --text "world-hello" --TEXT Some text
this will initialize the following variables:
flag_a="hello world"
flag_b="1"
flag_text="world-hello"
flag_TEXT="Some text"