{"action":"created","issue":{"url":"https://api.github.com/repos/caskroom/homebrew-cask/issues/28977","repository_url":"https://api.github.com/repos/caskroom/homebrew-cask","labels_url":"https://api.github.com/repos/caskroom/homebrew-cask/issues/28977/labels{/name}","comments_url":"https://api.github.com/repos/caskroom/homebrew-cask/issues/28977/comments","events_url":"https://api.github.com/repos/caskroom/homebrew-cask/issues/28977/events","html_url":"https://github.com/caskroom/homebrew-cask/issues/28977","id":200540566,"number":28977,"title":"Can we make HB flags not interfere with `cask`?","user":{"login":"vitorgalvao","id":1699443,"avatar_url":"https://avatars2.githubusercontent.com/u/1699443?v=3","gravatar_id":"","url":"https://api.github.com/users/vitorgalvao","html_url":"https://github.com/vitorgalvao","followers_url":"https://api.github.com/users/vitorgalvao/followers","following_url":"https://api.github.com/users/vitorgalvao/following{/other_user}","gists_url":"https://api.github.com/users/vitorgalvao/gists{/gist_id}","starred_url":"https://api.github.com/users/vitorgalvao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitorgalvao/subscriptions","organizations_url":"https://api.github.com/users/vitorgalvao/orgs","repos_url":"https://api.github.com/users/vitorgalvao/repos","events_url":"https://api.github.com/users/vitorgalvao/events{/privacy}","received_events_url":"https://api.github.com/users/vitorgalvao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-01-13T03:37:30Z","updated_at":"2017-06-06T11:46:33Z","closed_at":null,"body":"I’m building an [external command](https://github.com/caskroom/homebrew-cask/blob/master/doc/development/hacking.md#external-commands) for cask. However, I’m running into a snag caused by Homebrew (related: https://github.com/caskroom/homebrew-cask/issues/16265). Basically, short flag options become not viable.\r\n\r\nSteps to reproduce:\r\n\r\n```\r\n# Make a simple temporary executable script\r\necho '#!/bin/bash\r\n[[ \"${1}\" == \"--flag\" ]] && echo \"long flag given\"\r\n[[ \"${1}\" == \"-a\" ]] && echo \"short flag given\"\r\n[[ -z \"${1}\" ]] && echo \"no flag given\"' > /tmp/brewcask-example\r\nchmod +x /tmp/brewcask-example\r\n\r\n# Add its directory to your PATH\r\nPATH=/tmp:$PATH\r\n\r\n# Run it as an external command, with and without the flags\r\nbrew cask example\r\nbrew cask example --flag\r\nbrew cask example -a\r\n\r\n# You’ll get (in order)\r\nno flag given # correct\r\nlong flag given # correct\r\nError: There is more than one possible option that starts with '-a' # incorrect\r\n```\r\n\r\nThat last option is being “stolen” by Homebrew itself. Try something like `brew cask example --help` and you’ll get their help, not even ours.\r\n\r\nHB flags shouldn’t interfere with HBC commands. That `--help` example would be particularly confusing to a user.\r\n\r\nPinging @reitermarkus @claui @jawshooah @mwean."},"comment":{"url":"https://api.github.com/repos/caskroom/homebrew-cask/issues/comments/306461900","html_url":"https://github.com/caskroom/homebrew-cask/issues/28977#issuecomment-306461900","issue_url":"https://api.github.com/repos/caskroom/homebrew-cask/issues/28977","id":306461900,"user":{"login":"MikeMcQuaid","id":125011,"avatar_url":"https://avatars1.githubusercontent.com/u/125011?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeMcQuaid","html_url":"https://github.com/MikeMcQuaid","followers_url":"https://api.github.com/users/MikeMcQuaid/followers","following_url":"https://api.github.com/users/MikeMcQuaid/following{/other_user}","gists_url":"https://api.github.com/users/MikeMcQuaid/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeMcQuaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeMcQuaid/subscriptions","organizations_url":"https://api.github.com/users/MikeMcQuaid/orgs","repos_url":"https://api.github.com/users/MikeMcQuaid/repos","events_url":"https://api.github.com/users/MikeMcQuaid/events{/privacy}","received_events_url":"https://api.github.com/users/MikeMcQuaid/received_events","type":"User","site_admin":true},"created_at":"2017-06-06T11:46:33Z","updated_at":"2017-06-06T11:46:33Z","body":"@vitorgalvao No idea then, sorry."}}
{"actor":{"display_login":"MikeMcQuaid"}}