Created
October 2, 2020 17:07
-
-
Save buu700/72d0461d318bfe8c11e36d2316882b2a to your computer and use it in GitHub Desktop.
argbash function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parseArgs () { | |
argbash-init "${@}" - | | |
argbash - | | |
tr '\n' '☁' | | |
perl -pe 's/.*START OF CODE GENERATED BY Argbash(.*)END OF CODE GENERATED BY Argbash.*/#$1/g' | | |
tr '☁' '\n' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have fixed the link. It leads to an Argbash issues that links to the prototype implementation.
I think that I am slowly starting to see your point - you don't like the generated code in your script.
Therefore, I think that the "interpreter" is the best option for you - instead of calling that function, you could declare the interface in a standard Argbash way, i.e. using comments, which is more descriptive, and you get support for additional goodies s.a. short options, default values, help and manpage output, while the "interpreter" will add the generated code for you.