{"action":"created","issue":{"url":"https://api.github.com/repos/kvz/bash3boilerplate/issues/20","repository_url":"https://api.github.com/repos/kvz/bash3boilerplate","labels_url":"https://api.github.com/repos/kvz/bash3boilerplate/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/kvz/bash3boilerplate/issues/20/comments","events_url":"https://api.github.com/repos/kvz/bash3boilerplate/issues/20/events","html_url":"https://github.com/kvz/bash3boilerplate/issues/20","id":144324071,"number":20,"title":"Defaults don't work when using short options strings","user":{"login":"zbeekman","id":279612,"avatar_url":"https://avatars.githubusercontent.com/u/279612?v=3","gravatar_id":"","url":"https://api.github.com/users/zbeekman","html_url":"https://github.com/zbeekman","followers_url":"https://api.github.com/users/zbeekman/followers","following_url":"https://api.github.com/users/zbeekman/following{/other_user}","gists_url":"https://api.github.com/users/zbeekman/gists{/gist_id}","starred_url":"https://api.github.com/users/zbeekman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zbeekman/subscriptions","organizations_url":"https://api.github.com/users/zbeekman/orgs","repos_url":"https://api.github.com/users/zbeekman/repos","events_url":"https://api.github.com/users/zbeekman/events{/privacy}","received_events_url":"https://api.github.com/users/zbeekman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-29T16:54:23Z","updated_at":"2016-04-29T22:08:58Z","closed_at":"2016-04-29T21:41:26Z","body":"This may be the same bug as #5 and I think I have found a fix.... but it's possible they are distinct.\r\n\r\n`./main.sh -f foo -t` should populate `arg_t` with the value parsed from the usage string default. However, `opt` is set to `?`, the `help` function is called and `getopts` aborts.\r\n\r\nAs detailed on [this SO post](http://stackoverflow.com/a/14798704/403516) you can actually put `getopts` into silent mode an explicitly test for missing option arguments. Here is some more info from bash hackers wiki: http://wiki.bash-hackers.org/howto/getopts_tutorial#error_reporting\r\n\r\nThis technique will allow b3bp to not barf when optional option arguments are missing."},"comment":{"url":"https://api.github.com/repos/kvz/bash3boilerplate/issues/comments/215894873","html_url":"https://github.com/kvz/bash3boilerplate/issues/20#issuecomment-215894873","issue_url":"https://api.github.com/repos/kvz/bash3boilerplate/issues/20","id":215894873,"user":{"login":"rouson","id":13108868,"avatar_url":"https://avatars.githubusercontent.com/u/13108868?v=3","gravatar_id":"","url":"https://api.github.com/users/rouson","html_url":"https://github.com/rouson","followers_url":"https://api.github.com/users/rouson/followers","following_url":"https://api.github.com/users/rouson/following{/other_user}","gists_url":"https://api.github.com/users/rouson/gists{/gist_id}","starred_url":"https://api.github.com/users/rouson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rouson/subscriptions","organizations_url":"https://api.github.com/users/rouson/orgs","repos_url":"https://api.github.com/users/rouson/repos","events_url":"https://api.github.com/users/rouson/events{/privacy}","received_events_url":"https://api.github.com/users/rouson/received_events","type":"User","site_admin":false},"created_at":"2016-04-29T22:08:58Z","updated_at":"2016-04-29T22:08:58Z","body":"👏 Glad to hear it.  That makes sense because I haven't observed any problematic behaviors recently except on occasion when I deviated from the expected syntax of the usage line. Unfortunately, I didn't write down the details of what those deviations were, but in every case, I was able to edit the line and get behavior that seemed non-problematic to me."}}