Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Flags w/arguments broken when using short+long #3

Copy link
Copy link
@rootwork

Description

@rootwork
Issue body actions

boilerplate/options.sh uses getopts, mostly from Schotts' example, with the addition of long versions (e.g. both -t and --time).

While this works with both short and long options in general, it seems to break for short options when the option is more than a boolean and requires an argument (e.g. --time=5 works; -t=5 doesn't).

Other variants I had found worked with space-separated arguments (instead of =) but worked either with short or long options, not both. Another option would be to have no argument-based flags, and only accept these as position-based arguments the way we're doing with videos/markvid.sh and videos/trimvid.sh.

Investigate if there are better solutions.

Scripts this affects (i.e. currently-broken short options with arguments): images/imagedate.sh, images/modimg.sh, videos/fadevid.sh, videos/minsmvid.sh.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.