{"action":"created","issue":{"url":"https://api.github.com/repos/chocolatey/choco/issues/312","repository_url":"https://api.github.com/repos/chocolatey/choco","labels_url":"https://api.github.com/repos/chocolatey/choco/issues/312/labels{/name}","comments_url":"https://api.github.com/repos/chocolatey/choco/issues/312/comments","events_url":"https://api.github.com/repos/chocolatey/choco/issues/312/events","html_url":"https://github.com/chocolatey/choco/issues/312","id":85495770,"number":312,"title":"Enhancement: Install helpers - Parse-Args PS function for parsing Package Parameters","user":{"login":"sitano","id":564610,"avatar_url":"https://avatars.githubusercontent.com/u/564610?v=3","gravatar_id":"","url":"https://api.github.com/users/sitano","html_url":"https://github.com/sitano","followers_url":"https://api.github.com/users/sitano/followers","following_url":"https://api.github.com/users/sitano/following{/other_user}","gists_url":"https://api.github.com/users/sitano/gists{/gist_id}","starred_url":"https://api.github.com/users/sitano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sitano/subscriptions","organizations_url":"https://api.github.com/users/sitano/orgs","repos_url":"https://api.github.com/users/sitano/repos","events_url":"https://api.github.com/users/sitano/events{/privacy}","received_events_url":"https://api.github.com/users/sitano/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chocolatey/choco/labels/0%20-%20Backlog","name":"0 - Backlog","color":"CCCCCC"},{"url":"https://api.github.com/repos/chocolatey/choco/labels/Enhancement","name":"Enhancement","color":"0052cc"},{"url":"https://api.github.com/repos/chocolatey/choco/labels/Up%20For%20Grabs","name":"Up For Grabs","color":"159818"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/chocolatey/choco/milestones/15","html_url":"https://github.com/chocolatey/choco/milestones/0.10.x","labels_url":"https://api.github.com/repos/chocolatey/choco/milestones/15/labels","id":1121599,"number":15,"title":"0.10.x","description":"","creator":{"login":"ferventcoder","id":63502,"avatar_url":"https://avatars.githubusercontent.com/u/63502?v=3","gravatar_id":"","url":"https://api.github.com/users/ferventcoder","html_url":"https://github.com/ferventcoder","followers_url":"https://api.github.com/users/ferventcoder/followers","following_url":"https://api.github.com/users/ferventcoder/following{/other_user}","gists_url":"https://api.github.com/users/ferventcoder/gists{/gist_id}","starred_url":"https://api.github.com/users/ferventcoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferventcoder/subscriptions","organizations_url":"https://api.github.com/users/ferventcoder/orgs","repos_url":"https://api.github.com/users/ferventcoder/repos","events_url":"https://api.github.com/users/ferventcoder/events{/privacy}","received_events_url":"https://api.github.com/users/ferventcoder/received_events","type":"User","site_admin":false},"open_issues":92,"closed_issues":1,"state":"open","created_at":"2015-05-20T17:09:50Z","updated_at":"2016-09-07T20:34:47Z","due_on":null,"closed_at":null},"comments":45,"created_at":"2015-06-05T10:01:09Z","updated_at":"2016-09-09T20:03:30Z","closed_at":null,"body":"I am heavily using `-ia` parser for a bunch of packages i've developed. \r\n\r\nUse cases:\r\n\r\n1) Almost always `chocolateyInstall.ps1` script wants some advanced control options to be passes with predefined _default_ values. Actually, it is sad that `choco` requires additional flag to pass anything inside, but ok.\r\n2) When a package installs service, it is usual some parameters to be passed to the service args. Still parser required to process input args with predefined imports.\r\n\r\nWhat i have:\r\n\r\n1) `Parse-Args -Arg $env:ChocolateyAdvanceArgs -Default @{ option = \"default value\" }` -> [hashtable]\r\n2) `Merge-Args -To $A -From $B`\r\n\r\nArgs format:\r\n\r\n```\r\n-something => flag, argv[something] = \"\"\r\n-key=name => kv, argv[key] = name\r\n-key=name1 -key=name2 => kv, argv[key] = @( name1, name2 )\r\n-key=\"name\" => kv, argv[key] = name\r\n-key=\"name \"\" name\" => kv, argv[key] = name \" name\r\n```\r\n\r\nExample:\r\n\r\n`choco install package -y -ia '-flag -key=value -key2=\"value 123 -key3=1 -key3=2\"'`"},"comment":{"url":"https://api.github.com/repos/chocolatey/choco/issues/comments/246024078","html_url":"https://github.com/chocolatey/choco/issues/312#issuecomment-246024078","issue_url":"https://api.github.com/repos/chocolatey/choco/issues/312","id":246024078,"user":{"login":"dragon788","id":487774,"avatar_url":"https://avatars.githubusercontent.com/u/487774?v=3","gravatar_id":"","url":"https://api.github.com/users/dragon788","html_url":"https://github.com/dragon788","followers_url":"https://api.github.com/users/dragon788/followers","following_url":"https://api.github.com/users/dragon788/following{/other_user}","gists_url":"https://api.github.com/users/dragon788/gists{/gist_id}","starred_url":"https://api.github.com/users/dragon788/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dragon788/subscriptions","organizations_url":"https://api.github.com/users/dragon788/orgs","repos_url":"https://api.github.com/users/dragon788/repos","events_url":"https://api.github.com/users/dragon788/events{/privacy}","received_events_url":"https://api.github.com/users/dragon788/received_events","type":"User","site_admin":false},"created_at":"2016-09-09T20:03:30Z","updated_at":"2016-09-09T20:03:30Z","body":"Definitely finding this discussion interesting as I look at modifying a package installer to handle parameters that modify how it installs."}}
{"actor":{"display_login":"dragon788"}}