matejak / argbash

Bash argument parsing code generator
Other
1.39k stars 63 forks source link

howto argbash-init posix-script #103

Closed the-real-neil closed 5 years ago

the-real-neil commented 5 years ago

Am I doing something wrong or expecting too much?

$ ~/.local/bin/argbash-init --opt o - | ~/.local/bin/argbash -t posix-script -
stdin:38: error: Optional arguments '--o' don't have a short option, which is not supported in POSIX mode.
stdin:38: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
Error during autom4te run, aborting!
matejak commented 5 years ago

Argbash POSIX output allows only optional arguments with short options, which argbash-init doesn't support - you can't specify short options - you have to edit the template to specify short options. So to answer the question - you are not doing anything wrong, argbash-init can't produce the POSIX template. Now when this is known, let's think what would make it more understandable to you?

the-real-neil commented 5 years ago

@matejak I think understand completely that what I'm trying to do is unsupported by argbash-init in its current form. And that's fine by me; I can make my own templates with a little bit of hackery. Thanks for your help!